Update of 
/var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/editors
In directory 
james.mmbase.org:/tmp/cvs-serv3499/cmsc/edit-webapp/src/webapp/editors

Modified Files:
        dashboard.jsp 
Log Message:
CMSC-241 Show top 5 most urgent tasks on dashboard


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/editors
See also: http://www.mmbase.org/jira/browse/CMSC-241


Index: dashboard.jsp
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/editors/dashboard.jsp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- dashboard.jsp       25 Mar 2009 09:41:45 -0000      1.17
+++ dashboard.jsp       26 Mar 2009 07:15:55 -0000      1.18
@@ -38,13 +38,12 @@
                                </cmscedit:sideblock>
             </c:if>
        </div>
-       <div id="content">
-
+<div id="content">
 <mm:cloud jspvar="cloud" loginpage="login.jsp">
 <mm:cloudinfo type="user" id="cloudusername" write="false" />
 
-<c:set var="dashboardRepositorySize" value="10"/>
        <mm:haspage page="/editors/repository/">
+           <c:set var="dashboardRepositorySize" value="10"/>
     <c:set var="dashboardRepositoryTitle"><fmt:message 
key="dashboard.repository.header"><fmt:param>${dashboardRepositorySize}</fmt:param></fmt:message></c:set>
        <cmscedit:contentblock title="${dashboardRepositoryTitle}" 
titleMode="plain"
                titleClass="content_block_pink" bodyClass="body_table">
@@ -90,83 +89,18 @@
        </cmscedit:contentblock>
    </mm:haspage>
 
-
-    <c:set var="dashboardTaskSize" value="5"/>
-    <c:set var="tmpRole" value="assignedrel"/>
     <mm:haspage page="/editors/taskmanagement/">
-    <c:set var="dashboardTaskTitle"><fmt:message 
key="dashboard.task.header"><fmt:param>${dashboardTaskSize}</fmt:param></fmt:message></c:set>
+       <c:set var="dashboardTaskSize" value="5"/>
+       <c:set var="taskrel" value="assignedrel"/>
+       <c:set var="dashboardTaskTitle"><fmt:message 
key="task.header"><fmt:param>${dashboardTaskSize}</fmt:param></fmt:message></c:set>
     <cmscedit:contentblock title="${dashboardTaskTitle}" titleMode="plain"
       titleClass="content_block_pink" bodyClass="body_table">
-
      <mm:listnodescontainer type="user">
         <mm:constraint field="user.username" operator="EQUAL" 
referid="cloudusername" />
         <mm:maxnumber value="10" />
         <mm:listnodes>
-           <mm:relatednodescontainer type="task" role="${tmpRole}" 
searchdirs="source">
-              <table>
-                 <thead>
-                    <tr>
-                      <th><fmt:message key="dashboard.task.created" /></th>
-                      <th><fmt:message key="dashboard.task.deadline" /></th>
-                      <th><fmt:message key="dashboard.task.title" /></th>
-                      <th><fmt:message key="dashboard.task.status" /></th>
-                      <th><fmt:message key="dashboard.task.contenttitle" 
/></th>
-                      <th><fmt:message key="dashboard.task.nodetype" /></th>
-                      <th><fmt:message key="dashboard.task.description" /></th>
-                    </tr>
-                 </thead>
-                 <tbody class="hover">
-                    <c:set var="taskList" value="" /><c:set var="isSwapClass" 
value="true"/>
-                    <mm:relatednodes 
comparator="com.finalist.cmsc.tasks.TaskUrgencyComparator" 
max="${dashboardTaskSize}">
-                       <c:set var="taskId"><mm:field name="number"/></c:set>
-                       <c:if test="${not fn:contains(taskList, taskId)}">
-                       <tr <c:if test="${isSwapClass}">class="swap"</c:if>>
-                          <td><mm:field name="creationdate" 
id="created"><mm:time time="${created}" format="d/M/yyyy HH:mm" 
/></mm:field></td>
-                          <td><mm:field name="deadline" id="deadl"><mm:time 
time="${deadl}" format="d/M/yyyy HH:mm"/></mm:field></td>
-                          <td><mm:field name="title"/></td>
-                          <c:set var="elementtitel"><mm:field 
name="title"/></c:set>
-                          <c:set var="elementnumber"/>
-                          <c:set var="elementtype"/>
-                          <mm:relatednodescontainer type="contentelement" 
role="taskrel" searchdirs="destination">
-                             <mm:maxnumber value="1" />
-                             <mm:relatednodes>
-                                <c:set var="elementtitel"><mm:field 
name="title"/></c:set>
-                                <c:set var="elementnumber"><mm:field 
name="number"/></c:set>
-                                <c:set var="elementtype"><mm:field 
name="number"><mm:isnotempty><mm:nodeinfo 
type="guitype"/></mm:isnotempty></mm:field></c:set>
-                             </mm:relatednodes>
-                          </mm:relatednodescontainer>
-                          <c:set var="status"><mm:field name="status" 
/></c:set>
-                          <td><fmt:message key="${status}" /></td>
-                          <td>
-                             <c:choose>
-                                <c:when test="${empty elementnumber}">
-                                   <fmt:message 
key="dashboard.task.noelement"/>
-                                </c:when>
-                                <c:otherwise>
-                                   <mm:hasrank minvalue="basic user">
-                                      <a 
href="javascript:window.top.openRepositoryWithContent('<mm:write 
referid="elementnumber"/>');"><img src="gfx/icons/edit.png" align="top" 
alt="<fmt:message key="dashboard.task.editelement"/>" title="<fmt:message 
key="dashboard.task.editelement"/>"/></a> ${elementtitel}
-                                   </mm:hasrank>
-                                </c:otherwise>
-                             </c:choose>
-                          </td>
-                          <td>${elementtype}</td>
-                          <td>
-                             <mm:hasrank minvalue="basic user">
-                                <mm:field name="number" jspvar="number" 
write="false"/>
-                                <mm:url 
page="/editors/taskmanagement/tasklist.jsp" id="returnTaskedit" write="false" />
-                                <a 
href="javascript:window.top.openTasksWithTask('<mm:write 
referid="number"/>');"><img src="gfx/icons/edit2.png" align="top" 
alt="<fmt:message key="dashboard.task.edit"/>" title="<fmt:message 
key="dashboard.task.edit"/>"/></a> <mm:field name="description" />
-                             </mm:hasrank>
-                          </td>
-                       </tr>
-                       <c:set var="taskList">${taskList},${taskId}</c:set>
-                       <c:choose>
-                          <c:when test="${isSwapClass eq 'false'}"><c:set 
var="isSwapClass" value="true"/></c:when>
-                          <c:when test="${isSwapClass eq 'true'}"><c:set 
var="isSwapClass" value="false"/></c:when>
-                       </c:choose>
-                       </c:if>
-                    </mm:relatednodes>
-                 </tbody>
-              </table>
+               <mm:relatednodescontainer type="task" role="${taskrel}" 
searchdirs="source">
+                  <%@ include 
file="/editors/taskmanagement/tasklist_table.jspf"%> 
            </mm:relatednodescontainer>
         </mm:listnodes>
      </mm:listnodescontainer>
@@ -174,7 +108,7 @@
    </mm:haspage>
 
 </mm:cloud>
-       </div>
+</div>
 </body>
 </html:html>
 </mm:content>
\ No newline at end of file
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to