Skip to content

Commit

Permalink
SAK-46234 Add the ability to hide the filter membership by another gr…
Browse files Browse the repository at this point in the history
…oup in manage groups
  • Loading branch information
josecebe authored and Miguel Pellicer committed Sep 21, 2021
1 parent 1396393 commit c1f17ba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3425,6 +3425,11 @@
# DEFAULT: true
# user_audit_log_display=true

# SAK-34034 Filter by group in the Site Info Groups Management screen
# DEFAULT: true (enabled)
# Set to false to hide the filter in the Site Info Groups Management screen
# siteinfo.group.filter.enabled=false

### Sites admin permissions tool
## You may want to adjust these values up if you have a massive number of sites
## or a lot of load on your server. These values are probably OK for maybe 10k sites.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.sakaiproject.site.util.SiteConstants;
import org.sakaiproject.site.util.SiteGroupHelper;
import org.sakaiproject.sitemanage.api.SiteHelper;
import org.sakaiproject.sitemanage.api.SiteManageConstants;
import org.sakaiproject.user.api.User;
import org.sakaiproject.util.comparator.UserSortNameComparator;

Expand Down Expand Up @@ -193,7 +194,8 @@ public String showGroup(Model model,
model.addAttribute("joinableSetList", joinableSetList);
model.addAttribute("siteMemberList", siteMemberList);
model.addAttribute("groupList", groupList);
model.addAttribute("sectionList", sectionList);
model.addAttribute("sectionList", sectionList);
model.addAttribute("groupFilterEnabled", sakaiService.getBooleanProperty(SiteManageConstants.PROP_SITEINFO_GROUP_FILTER_ENABLED, true));

return GroupManagerConstants.GROUP_TEMPLATE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h1 th:if="${groupForm.groupId != null}" th:text="#{groups.header.edit}"></h1>
</div>
</div>
</div>
<div class="form-group row" th:if="${!groupList.isEmpty() || !sectionList.isEmpty()}">
<div class="form-group row" th:if="${groupFilterEnabled && (!groupList.isEmpty() || !sectionList.isEmpty())}">
<div class="col-sm-8">
<label for="groupMembershipFilter" class="form-control-label block" th:text="#{groups.filter.membership}">Filter membership</label>
<select class="form-control" id="groupMembershipFilter" th:field="*{filterByGroupId}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class SiteManageConstants {
public static final String RESOURCES_TOOL_ID = "sakai.resources";
public static final String GRADEBOOK_TOOL_ID = "sakai.gradebookng";
public static final String CALENDAR_TOOL_ID = "sakai.calendar";
public static final String PROP_SITEINFO_GROUP_FILTER_ENABLED = "siteinfo.group.filter.enabled";

private SiteManageConstants() {
throw new RuntimeException(this.getClass().getCanonicalName() + " is not to be instantiated");
Expand Down

0 comments on commit c1f17ba

Please sign in to comment.