made tiles smaller of 1/3
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/my-vres@101034 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c5de6a6549
commit
8260b28982
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/my-vres-1.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/my-vres-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
@ -34,5 +34,5 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/my-vres-1.3.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/my-vres-1.4.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
jarsExcludedFromWebInfLib=
|
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
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||||
<dependent-module archiveName="guided-tour-widget-1.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/guided-tour-widget/guided-tour-widget">
|
|
||||||
<dependency-type>uses</dependency-type>
|
|
||||||
</dependent-module>
|
|
||||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||||
<property name="context-root" value="my-vres"/>
|
<property name="context-root" value="my-vres"/>
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
<Changeset component="org.gcube.portlet.user.my-vres.1-3-0"
|
<Changeset component="org.gcube.portlet.user.my-vres.1-4-0"
|
||||||
|
date="2014-10-27">
|
||||||
|
<Change>Made tiles smaller of one third</Change>
|
||||||
|
</Changeset>
|
||||||
|
<Changeset component="org.gcube.portlet.user.my-vres.1-3-0"
|
||||||
date="2014-06-08">
|
date="2014-06-08">
|
||||||
<Change>Adapted to gCire Free Portal</Change>
|
<Change>Adapted to gCore Free Portal</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlet.user.my-vres.1-2-0"
|
<Changeset component="org.gcube.portlet.user.my-vres.1-2-0"
|
||||||
date="2014-04-08">
|
date="2014-04-08">
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -10,10 +10,10 @@
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.gcube.portlet.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>my-vres</artifactId>
|
<artifactId>my-vres</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>1.3.0-SNAPSHOT</version>
|
<version>1.4.0-SNAPSHOT</version>
|
||||||
<name>My VREs Portlet</name>
|
<name>My VREs Portlet</name>
|
||||||
<description>
|
<description>
|
||||||
gCube My VREs Portlet shows only the VO and VREs a user is member of.
|
gCube My VREs Portlet shows only the VO and VREs a user is member of.
|
||||||
|
|
|
@ -19,8 +19,8 @@ import com.google.gwt.user.client.ui.Image;
|
||||||
*/
|
*/
|
||||||
public class ClickableVRE extends HTML {
|
public class ClickableVRE extends HTML {
|
||||||
|
|
||||||
private final static int WIDTH = 115;
|
private final static int WIDTH = 85;
|
||||||
private final static int HEIGHT = 120;
|
private final static int HEIGHT = 95;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private String imageUrl;
|
private String imageUrl;
|
||||||
|
@ -36,12 +36,12 @@ public class ClickableVRE extends HTML {
|
||||||
public ClickableVRE(final VRE vre, final MyVREsServiceAsync service) {
|
public ClickableVRE(final VRE vre, final MyVREsServiceAsync service) {
|
||||||
super.setPixelSize(WIDTH, HEIGHT);
|
super.setPixelSize(WIDTH, HEIGHT);
|
||||||
setPixelSize(WIDTH, HEIGHT);
|
setPixelSize(WIDTH, HEIGHT);
|
||||||
imageWidth = WIDTH - 20;
|
imageWidth = WIDTH - 12;
|
||||||
name = (vre.getName().length() > 23) ? vre.getName().substring(0, 23) : vre.getName();
|
name = (vre.getName().length() > 15) ? vre.getName().substring(0, 13) + ".." : vre.getName();
|
||||||
imageUrl = vre.getImageURL();
|
imageUrl = vre.getImageURL();
|
||||||
this.setTitle("Enter");
|
this.setTitle("Enter");
|
||||||
String html = "<div class=\"vreCaption\">" + name + "</div>";
|
String html = "<div class=\"vreCaption\">" + name + "</div>";
|
||||||
html += "<div style=\"display: table; text-align:center; width: 100%; height: 95px;\">" +
|
html += "<div style=\"display: table; text-align:center; width: 100%; height: 75px;\">" +
|
||||||
"<span style=\"vertical-align:middle; display: table-cell;\"><img style=\"width: " + imageWidth + "px;\" src=\"" +imageUrl + "\" /></span>" +
|
"<span style=\"vertical-align:middle; display: table-cell;\"><img style=\"width: " + imageWidth + "px;\" src=\"" +imageUrl + "\" /></span>" +
|
||||||
"</div>";
|
"</div>";
|
||||||
setHTML(html);
|
setHTML(html);
|
||||||
|
|
|
@ -29,6 +29,7 @@ import com.liferay.portal.model.Group;
|
||||||
import com.liferay.portal.model.Organization;
|
import com.liferay.portal.model.Organization;
|
||||||
import com.liferay.portal.model.User;
|
import com.liferay.portal.model.User;
|
||||||
import com.liferay.portal.service.OrganizationLocalServiceUtil;
|
import com.liferay.portal.service.OrganizationLocalServiceUtil;
|
||||||
|
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||||
import com.liferay.portal.theme.ThemeDisplay;
|
import com.liferay.portal.theme.ThemeDisplay;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,7 +52,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer
|
||||||
|
|
||||||
private VO rootVO = new VO();
|
private VO rootVO = new VO();
|
||||||
|
|
||||||
private boolean withinPortal = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the current ASLSession
|
* the current ASLSession
|
||||||
|
@ -66,18 +67,30 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_log.info("LIFERAY PORTAL DETECTED user=" + user);
|
_log.info("LIFERAY PORTAL DETECTED user=" + user);
|
||||||
withinPortal = true;
|
|
||||||
}
|
}
|
||||||
return SessionManager.getInstance().getASLSession(sessionID, user);
|
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
|
* first method called by the UI
|
||||||
*/
|
*/
|
||||||
public ArrayList<VO> getInfrastructureVOs() {
|
public ArrayList<VO> getInfrastructureVOs() {
|
||||||
getASLSession();
|
getASLSession();
|
||||||
//_log.trace("getInfrastructureVOs method called");
|
//_log.trace("getInfrastructureVOs method called");
|
||||||
if (!withinPortal)
|
if (!isWithinPortal())
|
||||||
return getFakeVOs();
|
return getFakeVOs();
|
||||||
//return new ArrayList<VO>();
|
//return new ArrayList<VO>();
|
||||||
else
|
else
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
|
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
|
||||||
<portlet>
|
<portlet>
|
||||||
<portlet-name>MyVREs</portlet-name>
|
<portlet-name>MyVREs</portlet-name>
|
||||||
<display-name>gCube MyVREs Login Portlet</display-name>
|
<display-name>Your Virtual Research Environments</display-name>
|
||||||
<portlet-class>org.gcube.portlet.user.my_vres.server.portlet.MyVREsPortlet</portlet-class>
|
<portlet-class>org.gcube.portlet.user.my_vres.server.portlet.MyVREsPortlet</portlet-class>
|
||||||
<expiration-cache>0</expiration-cache>
|
<expiration-cache>0</expiration-cache>
|
||||||
<supports>
|
<supports>
|
||||||
<mime-type>text/html</mime-type>
|
<mime-type>text/html</mime-type>
|
||||||
</supports>
|
</supports>
|
||||||
<portlet-info>
|
<portlet-info>
|
||||||
<title>My Virtual Research Environments</title>
|
<title>Your Virtual Research Environments</title>
|
||||||
<short-title>gCube MyVREs Login</short-title>
|
<short-title>VREs Login</short-title>
|
||||||
<keywords>gCube MyVREs Login</keywords>
|
<keywords>VRE</keywords>
|
||||||
</portlet-info>
|
</portlet-info>
|
||||||
<security-role-ref>
|
<security-role-ref>
|
||||||
<role-name>administrator</role-name>
|
<role-name>administrator</role-name>
|
||||||
|
|
Loading…
Reference in New Issue