Update of /var/cvs/html/mmbase/edit/my_editors/inc
In directory james.mmbase.org:/tmp/cvs-serv8078/my_editors/inc
Modified Files:
searchresults.jsp top.jsp
Log Message:
it is a shame that deviding integers has be resolved like this
See also: http://cvs.mmbase.org/viewcvs/html/mmbase/edit/my_editors/inc
Index: searchresults.jsp
===================================================================
RCS file: /var/cvs/html/mmbase/edit/my_editors/inc/searchresults.jsp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- searchresults.jsp 17 Oct 2008 14:19:27 -0000 1.6
+++ searchresults.jsp 20 Oct 2008 09:28:33 -0000 1.7
@@ -88,15 +88,16 @@
</mm:url>">««</a></strong>
</c:if>
- <c:forEach var="index" begin="1" end="${(size / max)}">
+ <fmt:formatNumber var="iend" type="number" pattern="#" value="${(size
/ max) - 0.51}" />
+ <c:forEach var="i" begin="0" end="${iend}">
<c:choose>
- <c:when test="${(index * max) == offset}">
- <strong>${(index + 1)}</strong>
+ <c:when test="${(i * max) == offset}">
+ <strong>${(i + 1)}</strong>
</c:when>
<c:otherwise>
<a href="<mm:url referid="search_str">
- <mm:param name="offset">${(index * max)}</mm:param>
- </mm:url>">${(index)}</a>
+ <mm:param name="offset">${(i * max)}</mm:param>
+ </mm:url>">${(i + 1)}</a>
</c:otherwise>
</c:choose>
</c:forEach>
Index: top.jsp
===================================================================
RCS file: /var/cvs/html/mmbase/edit/my_editors/inc/top.jsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- top.jsp 10 Sep 2008 09:29:56 -0000 1.2
+++ top.jsp 20 Oct 2008 09:28:33 -0000 1.3
@@ -1,5 +1,6 @@
<%@ page language="java" contentType="text/html" session="false"
import="org.mmbase.bridge.*"
%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"
+%><%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"
%><%@ taglib uri="http://www.mmbase.org/mmbase-taglib-2.0" prefix="mm"
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs