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
This commit is contained in:
Costantino Perciante 2016-07-19 13:10:45 +00:00
parent 66de3cc66a
commit 5f1e6c6de6
1 changed files with 4 additions and 2 deletions

View File

@ -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");