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

@ -37,6 +37,7 @@
<% /* <p>${pageTime} milliseconds</p> */ %>
<jsp:include page="/templates/alpha/alphaIndex.jsp"/>
<ul>
<c:forEach items='${entities}' var='ent'>
<li>
@ -101,5 +102,7 @@
${requestScope.suppText}
</c:if>
<jsp:include page="/templates/entity/entityListPages.jsp"/>
</div> <!--end contents-->
</div><!-- end content -->

View file

@ -88,11 +88,7 @@
</c:otherwise>
</c:choose>
</li>
</c:forEach>
<<<<<<< HEAD:webapp/web/templates/entity/entityListForTabs.jsp
</ul>
=======
</c:forEach>
</ul>
<%-- Show pages to select from --%>
@ -124,5 +120,6 @@ if( request.getAttribute("alpha") != null && ! "all".equalsIgnoreCase((String)re
</c:forEach>
</div>
</c:if>
>>>>>>> c91e65e... Fixing page index on lucene based tabs. NIHVIVO-1143:webapp/web/templates/entity/entityListForTabs.jsp
<jsp:include page="/templates/entity/entityListPages.jsp"/>

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>