Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SAK-19444 merge trunk r89154

git-svn-id: https://source.sakaiproject.org/svn/user/branches/sakai-2.8.x@89510 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information...
commit b387902e49174316212791e7457e9b6e15dd859a 1 parent 7c81d23
arwhyte@umich.edu authored
View
1  user-tool-prefs/tool/src/bundle/user-tool-prefs.properties
@@ -88,6 +88,7 @@ privacy_check_hide=Hide Me
privacy_check_show=Show Me
privacy_update=Update
privacy_choose=Choose a site
+privacy_no_choices=No sites to choose from, you must be a member in at least one site.
privacy_show_all=Show Me in All Sites
privacy_hide_all=Hide Me in All Sites
View
8 user-tool-prefs/tool/src/java/org/sakaiproject/user/tool/PrivacyBean.java
@@ -253,6 +253,14 @@ public void setCheckboxText(String checkboxText) {
return sites;
}
+ /**
+ * @return true if there are no sites for the current user OR false otherwise
+ */
+ public boolean getSitesEmpty() {
+ // sites has 1 item in it even if there are no sites in it
+ return (this.sites == null || this.sites.length <= 1);
+ }
+
/** ========== processes iteraction on UI ========== */
/**
View
8 user-tool-prefs/tool/src/webapp/prefs/privacy.jsp
@@ -70,10 +70,12 @@
<h:outputText value="#{privacyBean.changeAllMsg}" styleClass="success" rendered="#{privacyBean.allChanged}" />
<f:verbatim></div><br /></f:verbatim>
- <h:outputText value="#{msgs.privacy_choose}" />
+ <h:outputText value="#{msgs.privacy_no_choices}" rendered="#{privacyBean.sitesEmpty}" />
+ <h:outputText value="#{msgs.privacy_choose}" rendered="#{not privacyBean.sitesEmpty}" />
<h:selectOneMenu value="#{privacyBean.selectedSite}" immediate="true" onchange="this.form.submit( );"
- valueChangeListener="#{privacyBean.processSiteSelected}" id="siteSelect">
+ valueChangeListener="#{privacyBean.processSiteSelected}"
+ id="siteSelect" rendered="#{not privacyBean.sitesEmpty}">
<f:selectItems value="#{privacyBean.sites}" />
</h:selectOneMenu>
@@ -140,7 +142,7 @@
</h:panelGroup>
- <h:panelGroup rendered="#{privacyBean.myWorkspace}" >
+ <h:panelGroup rendered="#{privacyBean.myWorkspace && not privacyBean.sitesEmpty}" >
<sakai:button_bar>
<sakai:button_bar_item action="#{privacyBean.processUpdate}" value="#{msgs.privacy_update}"
accesskey="u" title="#{msgs.privacy_update_title}" styleClass="active" />
Please sign in to comment.
Something went wrong with that request. Please try again.