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:
parent
2c55cfe4b2
commit
c6c9ddaa3d
|
@ -77,6 +77,11 @@ public class StatisticsPanel extends Composite {
|
||||||
private final static String LIKES_COMMENTS_GOT_LABEL = "Others";
|
private final static String LIKES_COMMENTS_GOT_LABEL = "Others";
|
||||||
private final static String STORAGE_LABEL = "Space Used";
|
private final static String STORAGE_LABEL = "Space Used";
|
||||||
private final static String PROFILE_STRENGTH_LABEL = "Profile Strength";
|
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_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_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";
|
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_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_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_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
|
* Specific tooltips
|
||||||
|
@ -176,7 +182,7 @@ public class StatisticsPanel extends Composite {
|
||||||
* Saved current user information bean
|
* Saved current user information bean
|
||||||
*/
|
*/
|
||||||
UserInformation informationBeanRetrieved;
|
UserInformation informationBeanRetrieved;
|
||||||
|
|
||||||
public StatisticsPanel() {
|
public StatisticsPanel() {
|
||||||
|
|
||||||
//init this object
|
//init this object
|
||||||
|
@ -228,7 +234,7 @@ public class StatisticsPanel extends Composite {
|
||||||
|
|
||||||
// save it
|
// save it
|
||||||
informationBeanRetrieved = information;
|
informationBeanRetrieved = information;
|
||||||
|
|
||||||
// is a user profile page? or a vre/home one (this portlet can be also deployed in a vre)
|
// is a user profile page? or a vre/home one (this portlet can be also deployed in a vre)
|
||||||
final boolean isProfilePage = isProfilePage();
|
final boolean isProfilePage = isProfilePage();
|
||||||
|
|
||||||
|
@ -593,8 +599,8 @@ public class StatisticsPanel extends Composite {
|
||||||
if(information.isOwner() && getUserToShowId() == null && isProfilePage){
|
if(information.isOwner() && getUserToShowId() == null && isProfilePage){
|
||||||
|
|
||||||
// add a checkbox with the settable privacy option
|
// add a checkbox with the settable privacy option
|
||||||
CheckBox privacyOption = new CheckBox("Show my statistics to VRE Members");
|
CheckBox privacyOption = new CheckBox(SHOW_STATISTICS_OPTION_LABEL);
|
||||||
privacyOption.setTitle("Show Statistics to members viewing your profile");
|
privacyOption.setTitle(SHOW_STATISTICS_OPTION_TOOLTIP);
|
||||||
privacyOption.setValue(information.isProfileShowable());
|
privacyOption.setValue(information.isProfileShowable());
|
||||||
privacyOption.addStyleName("privacy-checkbox-statistics-style");
|
privacyOption.addStyleName("privacy-checkbox-statistics-style");
|
||||||
|
|
||||||
|
@ -643,12 +649,12 @@ public class StatisticsPanel extends Composite {
|
||||||
|
|
||||||
// get current url
|
// get current url
|
||||||
String currentUrl = Window.Location.getHref();
|
String currentUrl = Window.Location.getHref();
|
||||||
|
|
||||||
// if it is a profile page, we have to move the user to the sitelandingpage
|
// if it is a profile page, we have to move the user to the sitelandingpage
|
||||||
if(isProfilePage()){
|
if(isProfilePage()){
|
||||||
currentUrl = event.getLandingPage();
|
currentUrl = event.getLandingPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] splittedUrl = currentUrl.split("\\?");
|
String[] splittedUrl = currentUrl.split("\\?");
|
||||||
|
|
||||||
Window.Location.assign(splittedUrl[0] + "?" + Encoder.encode(GCubeSocialNetworking.SHOW_STATISTICS_ACTION_OID) + "=" + Encoder.encode(actionToTake.toString()));
|
Window.Location.assign(splittedUrl[0] + "?" + Encoder.encode(GCubeSocialNetworking.SHOW_STATISTICS_ACTION_OID) + "=" + Encoder.encode(actionToTake.toString()));
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
||||||
// Cassandra connection
|
// Cassandra connection
|
||||||
private DatabookStore store;
|
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";
|
private static final String CUSTOM_FIELD_NAME_USER_STATISTICS_VISIBILITY = "show_user_statistics_other_people";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue