Author: mfang
Date: 2009-06-02 12:29:44 +0200 (Tue, 02 Jun 2009)
New Revision: 35550
Modified:
CMSContainer/trunk/CMSContainer_Modules/tasks/src/webapp/editors/taskmanagement/tasklist.jsp
CMSContainer/trunk/CMSContainer_Modules/tasks/src/webapp/editors/taskmanagement/tasklist_table.jspf
Log:
CMSC-1006 Create a 'pages' tag for using inside the Editors and use it by
default for paging
Modified:
CMSContainer/trunk/CMSContainer_Modules/tasks/src/webapp/editors/taskmanagement/tasklist.jsp
===================================================================
---
CMSContainer/trunk/CMSContainer_Modules/tasks/src/webapp/editors/taskmanagement/tasklist.jsp
2009-06-02 09:47:03 UTC (rev 35549)
+++
CMSContainer/trunk/CMSContainer_Modules/tasks/src/webapp/editors/taskmanagement/tasklist.jsp
2009-06-02 10:29:44 UTC (rev 35550)
@@ -1,5 +1,6 @@
<%...@page language="java" contentType="text/html;charset=UTF-8"
%><%...@include file="globals.jsp"
+%><%@ taglib prefix="edit" tagdir="/WEB-INF/tags/edit"
%><mm:content type="text/html" encoding="UTF-8" expires="0">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html:html xhtml="true">
@@ -70,10 +71,12 @@
</mm:relatednodescontainer>
</mm:listnodes>
</mm:listnodescontainer>
+ <c:set
var="pagerDOToffset"><%=request.getParameter("pager.offset")%></c:set>
+ <c:set var="extraparams"
value="&sortBy=${sortBy}&direction=${direction}&status=${status}"/>
<div class="editor">
<div class="body">
-<%...@include file="../pages.jsp" %>
+ <edit:pages search="false" totalElements="${listSize}" offset="${offset}"
extraparams="${extraparams}"/>
<c:url value="/editors/taskmanagement/MassDeleteTaskAction.do"
var="taskFormAction" />
<form action="${taskFormAction}" name="taskForm">
<mm:hasrank minvalue="basic user">
@@ -81,14 +84,14 @@
<input type="submit" class="button" value="<fmt:message
key="task.delete.massdelete"/>" onclick="massDeleteTask('<fmt:message
key="task.massdeleteconfirm" />');return false;" />
</c:if>
</mm:hasrank>
-<%@ include file="tasklist_table.jspf"%>
+ <%@ include file="tasklist_table.jspf"%>
<mm:hasrank minvalue="basic user">
<c:if test="${fn:length(resultList)>1}">
<input type="submit" class="button" value="<fmt:message
key="task.delete.massdelete"/>" onclick="massDeleteTask('<fmt:message
key="task.massdeleteconfirm" />');return false;" />
</c:if>
</mm:hasrank>
</form>
-<%...@include file="../pages.jsp" %>
+ <edit:pages search="false" totalElements="${listSize}" offset="${offset}"
extraparams="${extraparams}"/>
<html:form action="/editors/taskmanagement/showTaskAction">
<html:select property="taskShowType" onchange="this.form.submit();">
Modified:
CMSContainer/trunk/CMSContainer_Modules/tasks/src/webapp/editors/taskmanagement/tasklist_table.jspf
===================================================================
---
CMSContainer/trunk/CMSContainer_Modules/tasks/src/webapp/editors/taskmanagement/tasklist_table.jspf
2009-06-02 09:47:03 UTC (rev 35549)
+++
CMSContainer/trunk/CMSContainer_Modules/tasks/src/webapp/editors/taskmanagement/tasklist_table.jspf
2009-06-02 10:29:44 UTC (rev 35550)
@@ -1,3 +1,6 @@
+<c:if test="${empty elementsPerPage}">
+ <c:set
var="elementsPerPage"><%=com.finalist.cmsc.mmbase.PropertiesUtil.getProperty("repository.search.results.per.page")%></c:set>
+</c:if>
<table>
<thead>
<tr>
@@ -7,13 +10,13 @@
</c:if>
</mm:hasrank></th>
<c:if test="${empty dashboardTaskSize }">
- <th><a
href="tasklist.jsp?sortBy=creationdate&direction=${direction}&offset=${offset}"><fmt:message
key="task.created" /></a></th>
- <th><a
href="tasklist.jsp?sortBy=deadline&direction=${direction}&offset=${offset}"><fmt:message
key="task.deadline" /></a></th>
- <th><a
href="tasklist.jsp?sortBy=title&direction=${direction}&offset=${offset}"><fmt:message
key="task.title" /></a></th>
- <th><a
href="tasklist.jsp?sortBy=status&direction=${direction}&offset=${offset}"><fmt:message
key="task.status" /></th>
+ <th><a
href="tasklist.jsp?sortBy=creationdate&direction=${direction}&offset=${offset}&pager.offset=${pagerDOToffset}"><fmt:message
key="task.created" /></a></th>
+ <th><a
href="tasklist.jsp?sortBy=deadline&direction=${direction}&offset=${offset}&pager.offset=${pagerDOToffset}"><fmt:message
key="task.deadline" /></a></th>
+ <th><a
href="tasklist.jsp?sortBy=title&direction=${direction}&offset=${offset}&pager.offset=${pagerDOToffset}"><fmt:message
key="task.title" /></a></th>
+ <th><a
href="tasklist.jsp?sortBy=status&direction=${direction}&offset=${offset}&pager.offset=${pagerDOToffset}"><fmt:message
key="task.status" /></th>
<th><fmt:message key="task.contenttitle" /></th>
<th><fmt:message key="task.nodetype" /></th>
- <th><a
href="tasklist.jsp?sortBy=description&direction=${direction}&offset=${offset}"><fmt:message
key="task.description" /></a></th>
+ <th><a
href="tasklist.jsp?sortBy=description&direction=${direction}&offset=${offset}&pager.offset=${pagerDOToffset}"><fmt:message
key="task.description" /></a></th>
</c:if>
<c:if test="${!empty dashboardTaskSize }">
<th><fmt:message key="task.created" /></th>
@@ -30,7 +33,7 @@
<tbody class="hover">
<c:set var="taskList" value="" />
<c:set var="isSwapClass" value="true"/>
- <mm:listnodes referid="resultList" max="${resultsPerPage}"
offset="${offset*resultsPerPage}">
+ <mm:listnodes referid="resultList" max="${elementsPerPage}"
offset="${offset*elementsPerPage}">
<c:set var="taskId"><mm:field name="number"/></c:set>
<tr <c:if test="${isSwapClass}">class="swap"</c:if>>
<td style="white-space: nowrap;">
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs