labels fixed

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@131042 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-08-30 13:36:19 +00:00
parent 2c55cfe4b2
commit c6c9ddaa3d
2 changed files with 14 additions and 8 deletions

View File

@ -77,6 +77,11 @@ public class StatisticsPanel extends Composite {
private final static String LIKES_COMMENTS_GOT_LABEL = "Others";
private final static String STORAGE_LABEL = "Space Used";
private final static String PROFILE_STRENGTH_LABEL = "Profile Strength";
private final static String SHOW_STATISTICS_OPTION_LABEL = "Show my statistics to VRE Members";
/**
* Some tooltips
*/
private final static String TOOLTIP_POSTS_ROOT_PROFILE = "Posts done during the last year";
private final static String TOOLTIP_POSTS_VRE = "Posts done in the last year in this VRE";
private final static String TOOLTIP_FAVORITES_REPLIES_ROOT_PROFILE = "Likes and post replies done during the last year";
@ -84,7 +89,8 @@ public class StatisticsPanel extends Composite {
private final static String TOOLTIP_GOT_ROOT_PROFILE = "Likes and post replies got during the last year";
private final static String TOOLTIP_GOT_VRE = "Likes and post replies got during the last year in this VRE";
private final static String TOOLTIP_INFRASTRUCTURE_SPACE = "Total amount of space used in the infrastructure";
private final static String TOOLTIP_PROFILE_STRENGHT = "Your profile strength";
private final static String TOOLTIP_PROFILE_STRENGHT = "Profile strength evaluated taking into account contacts, professional summary and current position information";
private final static String SHOW_STATISTICS_OPTION_TOOLTIP = "Show Statistics to members viewing your profile";
/**
* Specific tooltips
@ -176,7 +182,7 @@ public class StatisticsPanel extends Composite {
* Saved current user information bean
*/
UserInformation informationBeanRetrieved;
public StatisticsPanel() {
//init this object
@ -228,7 +234,7 @@ public class StatisticsPanel extends Composite {
// save it
informationBeanRetrieved = information;
// is a user profile page? or a vre/home one (this portlet can be also deployed in a vre)
final boolean isProfilePage = isProfilePage();
@ -593,8 +599,8 @@ public class StatisticsPanel extends Composite {
if(information.isOwner() && getUserToShowId() == null && isProfilePage){
// add a checkbox with the settable privacy option
CheckBox privacyOption = new CheckBox("Show my statistics to VRE Members");
privacyOption.setTitle("Show Statistics to members viewing your profile");
CheckBox privacyOption = new CheckBox(SHOW_STATISTICS_OPTION_LABEL);
privacyOption.setTitle(SHOW_STATISTICS_OPTION_TOOLTIP);
privacyOption.setValue(information.isProfileShowable());
privacyOption.addStyleName("privacy-checkbox-statistics-style");
@ -643,12 +649,12 @@ public class StatisticsPanel extends Composite {
// get current url
String currentUrl = Window.Location.getHref();
// if it is a profile page, we have to move the user to the sitelandingpage
if(isProfilePage()){
currentUrl = event.getLandingPage();
}
String[] splittedUrl = currentUrl.split("\\?");
Window.Location.assign(splittedUrl[0] + "?" + Encoder.encode(GCubeSocialNetworking.SHOW_STATISTICS_ACTION_OID) + "=" + Encoder.encode(actionToTake.toString()));

View File

@ -48,7 +48,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
// Cassandra connection
private DatabookStore store;
// custom field' name to remember action to take for the portlet deployed in the user profile
// custom field' name to remember action to take for the portlet deployed in the user profile TODO (make it a resource?)
private static final String CUSTOM_FIELD_NAME_USER_STATISTICS_VISIBILITY = "show_user_statistics_other_people";
@Override