<%-- The contents of this file are subject to the license and copyright detailed in the LICENSE and NOTICE files at the root of the source tree and available online at http://www.dspace.org/license/ --%> <%-- - Display list of Groups, with 'edit' and 'delete' buttons next to them - - Attributes: - - groups - Group [] of groups to work on --%> <%@ page contentType="text/html;charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> <%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %> <%@ page import="org.dspace.eperson.EPerson" %> <%@ page import="org.dspace.eperson.Group" %> <%@ page import="java.util.List" %> <% List groups = (List) request.getAttribute("groups"); // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); Boolean communityAdmin = (Boolean)request.getAttribute("is.communityAdmin"); boolean isCommunityAdmin = (communityAdmin == null ? false : communityAdmin.booleanValue()); Boolean collectionAdmin = (Boolean)request.getAttribute("is.collectionAdmin"); boolean isCollectionAdmin = (collectionAdmin == null ? false : collectionAdmin.booleanValue()); String naviAdmin = "admin"; String link = "/dspace-admin"; if(!isAdmin && (isCommunityAdmin || isCollectionAdmin)) { naviAdmin = "community-or-collection-admin"; link = "/tools"; } %> <%--

Group Editor

--%>

<%-- Help... --%> ">

<% if(isAdmin){ %>
" />
<% } %>

<% String row = "even"; for (int i = 0; i < groups.size(); i++) { %> <% row = (row.equals("odd") ? "even" : "odd"); } %>
 
<%= groups.get(i).getID() %> <%= groups.get(i).getName() %> <% // no edit button for group anonymous if (!groups.get(i).getName().equals(Group.ANONYMOUS)) { %>
" />
<% } // no delete button for group Anonymous 0 and Administrator 1 to avoid accidental deletion if (!groups.get(i).getName().equals(Group.ANONYMOUS) && !groups.get(i).getName().equals(Group.ADMIN)) { %>
" /> <% } %>