Bug fix for too long vre names.

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@122443 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-01-22 09:56:03 +00:00
parent cff58c2c1a
commit 1cff3c981d
4 changed files with 12 additions and 8 deletions

View File

@ -6,7 +6,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/user-statistics-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry kind="src" output="target/user-statistics-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
lastWarOutDir=/home/costantino/workspace/user-statistics-portlet/target/user-statistics-portlet-0.0.1-SNAPSHOT
lastWarOutDir=/home/costantino/workspace/user-statistics/target/user-statistics-1.0.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -125,9 +125,13 @@ public class StatisticsPanel extends Composite {
if(!isRoot){
// add the border to the panel and the VRE name
// add the border to the panel and the VRE name (check for VRE name lenght)
mainPanel.addStyleName("user-stats-frame-border");
final HTML name = new HTML(DISPLAY_NAME + " in " + information.getActualVre());
String nameToShow = DISPLAY_NAME + " in " + information.getActualVre();
nameToShow = nameToShow.length() > 30 ?
nameToShow.substring(0, 27) + "..." : information.getActualVre();
final HTML name = new HTML(nameToShow);
name.setTitle(DISPLAY_NAME + " in " + information.getActualVre());
name.setStyleName("user-stats-title");
mainPanel.add(name);
@ -145,7 +149,7 @@ public class StatisticsPanel extends Composite {
// set the style for the user image
userImage.setStyleName("user-image");
// set the right margin according isRoot variable value
if(isRoot)
userImage.addStyleName("user-image-margin-right-root");
@ -336,7 +340,7 @@ public class StatisticsPanel extends Composite {
feeds.clearPanelValues();
Label numberOfFeedsLabel = new Label(formattedNumbers(postsBean.getFeedsNumber()));
if(isRoot)
numberOfFeedsLabel.setTitle("Your posts during the last year (" + postsBean.getFeedsNumber() + ").");
numberOfFeedsLabel.setTitle("Your posts during the last year (" + postsBean.getFeedsNumber() + ").");
else
numberOfFeedsLabel.setTitle("Your posts during the last year in this VRE (" + postsBean.getFeedsNumber() + ").");
numberOfFeedsLabel.setStyleName("statistic-value");

View File

@ -120,7 +120,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
*/
public String getDevelopmentUser() {
String user = userid;
// user = "massimiliano.assante";
user = "massimiliano.assante";
return user;
}
@ -257,7 +257,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
return new UserInformation(isInfrastructure, thumbnailURL, userName, actualVre, accountURL);
}
else return new UserInformation(true, null, userName, null, null);
else return new UserInformation(false, null, userName, vreID, null);
}
@SuppressWarnings("deprecation")