diff --git a/.classpath b/.classpath index f9b25c5..548cc3b 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + @@ -34,5 +34,5 @@ - + diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs index 7815924..b50c9de 100644 --- a/.settings/com.google.gdt.eclipse.core.prefs +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 jarsExcludedFromWebInfLib= -lastWarOutDir=/Users/massi/Documents/workspace/my-vres/target/my-vres-1.3.0-SNAPSHOT +lastWarOutDir=/Users/massi/Documents/workspace/my-vres/target/my-vres-1.4.0-SNAPSHOT warSrcDir=src/main/webapp warSrcDirIsOutput=false diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index d73aced..bcb4989 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -4,9 +4,6 @@ - - uses - diff --git a/distro/changelog.xml b/distro/changelog.xml index e3e5106..6cf296e 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,7 +1,11 @@ - + Made tiles smaller of one third + + - Adapted to gCire Free Portal + Adapted to gCore Free Portal diff --git a/pom.xml b/pom.xml index 3d452f6..1d6b646 100644 --- a/pom.xml +++ b/pom.xml @@ -10,10 +10,10 @@ - org.gcube.portlet.user + org.gcube.portlets.user my-vres war - 1.3.0-SNAPSHOT + 1.4.0-SNAPSHOT My VREs Portlet gCube My VREs Portlet shows only the VO and VREs a user is member of. diff --git a/src/main/java/org/gcube/portlet/user/my_vres/client/widgets/ClickableVRE.java b/src/main/java/org/gcube/portlet/user/my_vres/client/widgets/ClickableVRE.java index 3dff5fb..ab25a7a 100644 --- a/src/main/java/org/gcube/portlet/user/my_vres/client/widgets/ClickableVRE.java +++ b/src/main/java/org/gcube/portlet/user/my_vres/client/widgets/ClickableVRE.java @@ -19,8 +19,8 @@ import com.google.gwt.user.client.ui.Image; */ public class ClickableVRE extends HTML { - private final static int WIDTH = 115; - private final static int HEIGHT = 120; + private final static int WIDTH = 85; + private final static int HEIGHT = 95; private String name; private String imageUrl; @@ -36,12 +36,12 @@ public class ClickableVRE extends HTML { public ClickableVRE(final VRE vre, final MyVREsServiceAsync service) { super.setPixelSize(WIDTH, HEIGHT); setPixelSize(WIDTH, HEIGHT); - imageWidth = WIDTH - 20; - name = (vre.getName().length() > 23) ? vre.getName().substring(0, 23) : vre.getName(); + imageWidth = WIDTH - 12; + name = (vre.getName().length() > 15) ? vre.getName().substring(0, 13) + ".." : vre.getName(); imageUrl = vre.getImageURL(); this.setTitle("Enter"); String html = "
" + name + "
"; - html += "
" + + html += "
" + "" + "
"; setHTML(html); diff --git a/src/main/java/org/gcube/portlet/user/my_vres/server/MyVREsServiceImpl.java b/src/main/java/org/gcube/portlet/user/my_vres/server/MyVREsServiceImpl.java index 0f1e324..4a562a8 100644 --- a/src/main/java/org/gcube/portlet/user/my_vres/server/MyVREsServiceImpl.java +++ b/src/main/java/org/gcube/portlet/user/my_vres/server/MyVREsServiceImpl.java @@ -29,6 +29,7 @@ import com.liferay.portal.model.Group; import com.liferay.portal.model.Organization; import com.liferay.portal.model.User; import com.liferay.portal.service.OrganizationLocalServiceUtil; +import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.theme.ThemeDisplay; /** @@ -51,7 +52,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer private VO rootVO = new VO(); - private boolean withinPortal = false; + /** * the current ASLSession @@ -66,18 +67,30 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer } else { _log.info("LIFERAY PORTAL DETECTED user=" + user); - withinPortal = true; } return SessionManager.getInstance().getASLSession(sessionID, user); } - + /** + * + * @return true if you're running into the portal, false if in development + */ + private boolean isWithinPortal() { + try { + UserLocalServiceUtil.getService(); + return true; + } + catch (com.liferay.portal.kernel.bean.BeanLocatorException ex) { + _log.trace("Development Mode ON"); + return false; + } + } /** * first method called by the UI */ public ArrayList getInfrastructureVOs() { getASLSession(); //_log.trace("getInfrastructureVOs method called"); - if (!withinPortal) + if (!isWithinPortal()) return getFakeVOs(); //return new ArrayList(); else diff --git a/src/main/webapp/WEB-INF/portlet.xml b/src/main/webapp/WEB-INF/portlet.xml index d606c6d..5dc6d95 100644 --- a/src/main/webapp/WEB-INF/portlet.xml +++ b/src/main/webapp/WEB-INF/portlet.xml @@ -3,16 +3,16 @@ MyVREs - gCube MyVREs Login Portlet + Your Virtual Research Environments org.gcube.portlet.user.my_vres.server.portlet.MyVREsPortlet 0 text/html - My Virtual Research Environments - gCube MyVREs Login - gCube MyVREs Login + Your Virtual Research Environments + VREs Login + VRE administrator