From 5f1e6c6de63898fe9c5bb97e6ba6505b7f13df72 Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Tue, 19 Jul 2016 13:10:45 +0000 Subject: [PATCH] the checkbox to set the statistics visible to other vre members is made visible only when the current user is visiting his My Profile page git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@130539 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../user/userstatisticsportlet/client/StatisticsPanel.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java index 4b353dc..a295260 100644 --- a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java +++ b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java @@ -12,6 +12,7 @@ import org.gcube.portlet.user.userstatisticsportlet.client.ui.CommentsAndLikesWi import org.gcube.portlet.user.userstatisticsportlet.client.ui.StatisticWidget; import org.gcube.portlet.user.userstatisticsportlet.shared.PostsStatsBean; import org.gcube.portlet.user.userstatisticsportlet.shared.UserInformation; + import com.github.gwtbootstrap.client.ui.AlertBlock; import com.github.gwtbootstrap.client.ui.Button; import com.github.gwtbootstrap.client.ui.CheckBox; @@ -459,8 +460,9 @@ public class StatisticsPanel extends Composite { }); - // check if we need to show the checkbox to allow the user's profile owner to edit privacy options - if(information.isOwner() && (isProfilePage)){ + // check if we need to show the checkbox to allow the user's profile owner to edit privacy options + // If the user is visiting his profile from within a vre, the checkbox WON'T be shown. + if(information.isOwner() && getUserToShowId() == null && isProfilePage){ // add a checkbox with the settable privacy option CheckBox privacyOption = new CheckBox("Show my statistics to VRE Members");