[sword-cvs] swordweb wordsearchresults.jsp,1.7,1.8
sword@www.crosswire.org
sword@www.crosswire.org
Fri, 1 Aug 2003 15:13:42 -0700
Update of /usr/local/cvsroot/swordweb
In directory www:/tmp/cvs-serv15460
Modified Files:
wordsearchresults.jsp
Log Message:
result page navigation in search (jansorg)
Index: wordsearchresults.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/wordsearchresults.jsp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- wordsearchresults.jsp 1 Aug 2003 22:05:23 -0000 1.7
+++ wordsearchresults.jsp 1 Aug 2003 22:13:40 -0000 1.8
@@ -153,10 +153,10 @@
%>
<%
- if (navEnd < (results.length / resultLimit.intValue()) ) {
- int lastPage = (results.length - resultLimit.intValue()) - (results.length % resultLimit.intValue());
+ int lastPage = (results.length / resultLimit.intValue()) + ((results.length % resultLimit.intValue()) > 0 ? 1 : 0) -1;
+ if (navEnd < lastPage) {
%>
- <li> [...] <a href="wordsearchresults.jsp?start=<%= lastPage %>" title="Last page (<%= results[lastPage] %>) of search results"><%= results.length / resultLimit.intValue() %></a></li>
+ <li> [...] <a href="wordsearchresults.jsp?start=<%= lastPage*resultLimit.intValue() %>" title="Last page (<%= results[lastPage] %>) of search results"><%= lastPage+1 %></a></li>
<%
}
%>