<%-- 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 E-people, with pagination - - Attributes: - - epeople - EPerson[] - all epeople to browse - page_size - size of pages (number of epeople per page) - page_index - current page to display - page_count - number of pages --%> <%@ 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="org.dspace.eperson.EPerson" %> <%@ page import="org.dspace.core.Utils" %> <%@ page import="java.util.List" %> <%@ page import="org.dspace.eperson.service.EPersonService" %> <%@ page import="org.dspace.eperson.factory.EPersonServiceFactory" %> <% List epeople = (List) request.getAttribute("epeople"); int pageSize = ((Integer)request.getAttribute("page_size" )).intValue(); int pageIndex = ((Integer)request.getAttribute("page_index")).intValue(); int pageCount = ((Integer)request.getAttribute("page_count")).intValue(); int firstEPerson = pageSize*pageIndex; int lastEPerson = firstEPerson + (pageSize - 1); // index of last person // most common case is full page if (lastEPerson >= epeople.size()) { // oops, less than a full page left, trim lastEPerson = -1 + firstEPerson + ((epeople.size()-firstEPerson) % pageSize); } String previousButton = ""; String nextButton = ""; if (pageIndex > 0) { // not at start, so create 'previous' button previousButton = "" + " " + ""; } if (pageIndex < (pageCount-1) ) { // not showing last either, so create 'next' button nextButton = "" + " " + ""; } %> <%--

Browse EPeople <%=firstEPerson%>-<%=lastEPerson%> of <%=epeople.length%>

--%>

<%=firstEPerson%> <%=lastEPerson%> <%=epeople.size()%>

<%-- --%> <%-- --%> <%-- --%> <%-- --%> <%-- --%> <%-- --%> <%-- --%> <% String row = "even"; EPersonService ePersonService = EPersonServiceFactory.getInstance().getEPersonService(); for (int i = firstEPerson; i <= lastEPerson; i++) { EPerson e = epeople.get(i); String commandString = request.getContextPath() + "/dspace-admin/edit-epeople?submit_edit&eperson_id=" + e.getID(); %> <% row = (row.equals("odd") ? "even" : "odd"); } %>
IDE-mail Address Last Name First Name Can Log In? Must Use Cert? Self Registered Telephone    
<%= e.getID() %> <%= (e.getEmail() == null ? "" : e.getEmail()) %> <%= (e.getLastName() == null ? "" : Utils.addEntities(e.getLastName())) %> <%= (e.getFirstName() == null ? "" : Utils.addEntities(e.getFirstName())) %> <%= e.canLogIn() ? "yes" : "no" %> <%= e.getRequireCertificate() ? "yes" : "no" %> <%= e.getSelfRegistered() ? "yes" : "no" %> <%= (ePersonService.getMetadata(e, "phone") == null ? "" : Utils.addEntities(ePersonService.getMetadata(e, "phone"))) %> <% if (request.getParameter("sortby") != null) { %> "/> <% } %> <%-- --%> " /> <%-- --%> " />
<%=previousButton%>
<%=nextButton%>