Addding paged resutls to index pages. NIHVIVO-1145

This commit is contained in:
bdc34 2010-10-06 21:52:10 +00:00
parent 23bc237950
commit c08c2fba9b
6 changed files with 215 additions and 47 deletions

View file

@ -0,0 +1,32 @@
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%><%/* this odd thing points to something in web.xml */ %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%-- Show pages to select from --%>
<%
if( request.getAttribute("alpha") != null && ! "all".equalsIgnoreCase((String)request.getAttribute("alpha"))) {
request.setAttribute("pageAlpha",request.getAttribute("alpha"));
}else{
request.setAttribute("pageAlpha",request.getAttribute("all"));
}
%>
<c:if test="${ requestScope.showPages }">
<div class="searchpages minimumFontMain">
Pages:
<c:forEach items='${requestScope.pages }' var='page'>
<c:url var='pageUrl' value=".${requestScope.servlet}">
<c:param name="page">${page.index}</c:param>
<c:if test="${not empty requestScope.alpha}">
<c:param name="alpha">${requestScope.pageAlpha}</c:param>
</c:if>
</c:url>
<c:if test="${ page.selected }">
${page.text}
</c:if>
<c:if test="${ not page.selected }">
<a class="minimumFontMain" href="${pageUrl}&amp;${requestScope.controllerParam}">${page.text} </a>
</c:if>
</c:forEach>
</div>
</c:if>