diff roundup/templates/classic/html/issue.index @ 1002:1798d2fa9fec

Hack hack... . Lots of cleanup in the classic html (stylesheet, search page, index page, ...) . Reinstated searching, but not query saving yet . Filtering only allows sorting and grouping by one property - all backends now implement this behaviour. . Nosy list journalling turned off by default, everything else is on. . Added some convenience methods (reverse, propchanged, [item] accesses, ...) . Did I mention the stylesheet is much cleaner now? :)
author Richard Jones <richard@users.sourceforge.net>
date Sun, 01 Sep 2002 04:32:30 +0000
parents d9943245db26
children f89b8d32291b
line wrap: on
line diff
--- a/roundup/templates/classic/html/issue.index	Sat Aug 31 22:09:26 2002 +0000
+++ b/roundup/templates/classic/html/issue.index	Sun Sep 01 04:32:30 2002 +0000
@@ -1,100 +1,96 @@
 <!-- dollarId: issue.index,v 1.2 2001/07/29 04:07:37 richard Exp dollar-->
 <tal:block tal:define="batch request/batch">
- <table width="100%" border=0 cellspacing=0 cellpadding=2 class="list">
- <tr class="list-header">
-  <th align="left" tal:condition="exists:request/columns/id">ID</th>
-  <th align="left" tal:condition="exists:request/columns/activity">Activity</th>
-  <th align="left" tal:condition="exists:request/columns/priority">Priority</th>
-  <th align="left" tal:condition="exists:request/columns/title">Title</th>
-  <th align="left" tal:condition="exists:request/columns/status">Status</th>
-  <th align="left" tal:condition="exists:request/columns/assignedto">Assigned To</th>
- </tr>
- <tr tal:repeat="i batch"
-    tal:attributes="class python:['row-normal', 'row-alt'][repeat['i'].even()]">
-  <td valign="top" tal:condition="exists:request/columns/id"
-     tal:content="i/id"></td>
-  <td valign="top" tal:condition="exists:request/columns/activity"
-     tal:content="i/activity/reldate"></td>
-  <td valign="top" tal:condition="exists:request/columns/priority"
-     tal:content="i/priority"></td>
-  <td valign="top" tal:condition="exists:request/columns/title">
-   <a tal:attributes="href string:issue${i/id}"
-      tal:content="python:i.title.value or '[no title]'">title</a>
-  </td>
-  <td valign="top" tal:condition="exists:request/columns/status"
-      tal:content="i/status"></td>
-  <td valign="top" tal:condition="exists:request/columns/assignedto"
-      tal:content="i/assignedto/username | default"></td>
- </tr>
- </table>
- <table width="100%" border=0 cellspacing=0 cellpadding=2>
-  <tr class="list-header">
-   <td width="50%" align="left">
-<a tal:define="prev batch/previous" tal:condition="prev"
-   tal:attributes="href python:request.indexargs_href(request.classname,
-    {':startwith':prev.start, ':pagesize':prev.size})">&lt;&lt; previous</a>
-   </td><td width="50%" align="right">
-<a tal:define="next batch/next" tal:condition="next"
-   tal:attributes="href python:request.indexargs_href(request.classname,
-    {':startwith':next.start, ':pagesize':next.size})">next &gt;&gt;</a>
+ <table class="list">
+  <tr>
+   <th tal:condition="exists:request/columns/priority">Priority</th>
+   <th tal:condition="exists:request/columns/id">ID</th>
+   <th tal:condition="exists:request/columns/activity">Activity</th>
+   <th tal:condition="exists:request/columns/title">Title</th>
+   <th tal:condition="exists:request/columns/status">Status</th>
+   <th tal:condition="exists:request/columns/creator">Created&nbsp;By</th>
+   <th tal:condition="exists:request/columns/assignedto">Assigned&nbsp;To</th>
+  </tr>
+ <tal:block tal:repeat="i batch">
+  <tr tal:condition="python:batch.propchanged(request.group[1])">
+   <th tal:attributes="colspan python:len(request.columns)"
+       tal:content="python:i[request.group[1]]" class="group">
+   </th>
   </tr>
-  <tr class="list-header" tal:condition="batch">
-   <td colspan="2">
-    <form method="GET" tal:attributes="action request/classname">
-     Pagesize: <input type="text" name=":pagesize" size="3" value="50">
-     Starting at: <input type="text" name=":startwith" size="3" value="0">
-     <br>
-     <xml:block tal:condition="python:'status' in request.filter">
-      Status:
-      <input type="hidden" name=":filter" value="status">
-      <select name="status">
-       <option value="-1,1,2,3,4,5,6,7"
-         tal:attributes="selected python:'-1,1,2,3,4,5,6,7'.split(',')==request.filterspec['status']">not resolved</option>
-       <option value="-1"
-         tal:attributes="selected python:['-1']==request.filterspec['status']">not selected</option>
-       <option tal:repeat="s db/status/list"
-         tal:attributes="value s/id;
-                         selected python:[s]==request.filterspec['status']"
-         tal:content="s/name">status to filter on</option>
-      </select>
-     </xml:block>
+  <tr tal:attributes="class python:['normal', 'alt'][repeat['i'].even()]">
+   <td tal:condition="exists:request/columns/priority"
+      tal:content="i/priority"></td>
+   <td tal:condition="exists:request/columns/id"
+      tal:content="i/id"></td>
+   <td tal:condition="exists:request/columns/activity"
+      tal:content="i/activity/reldate"></td>
+   <td tal:condition="exists:request/columns/title">
+    <a tal:attributes="href string:issue${i/id}"
+       tal:content="python:i.title.value or '[no title]'">title</a>
+   </td>
+   <td tal:condition="exists:request/columns/status"
+       tal:content="i/status"></td>
+   <td tal:condition="exists:request/columns/creator"
+       tal:content="i/creator"></td>
+   <td tal:condition="exists:request/columns/assignedto"
+       tal:content="i/assignedto"></td>
+  </tr>
+ </tal:block>
+ <tr>
+  <td style="padding: 0" tal:attributes="colspan python:len(request.columns)">
+   <table class="list">
+    <tr><th style="text-align: left">
+     <a tal:define="prev batch/previous" tal:condition="prev"
+        tal:attributes="href python:request.indexargs_href(request.classname,
+        {':startwith':prev.start, ':pagesize':prev.size})">&lt;&lt; previous</a>
+     &nbsp;
+    </th>
+    <th style="text-align: right">
+     <a tal:define="next batch/next" tal:condition="next"
+        tal:attributes="href python:request.indexargs_href(request.classname,
+         {':startwith':next.start, ':pagesize':next.size})">next &gt;&gt;</a>
+     &nbsp;
+    </th></tr>
+   </table>
+  </td>
+ </tr>
+</table>
 
-     <xml:block tal:condition="python:'assignedto' in request.filter">
-      Assigned To:
-      <input type="hidden" name=":filter" value="assignedto">
-      <select name="assignedto">
-       <option value="-1"
-         tal:attributes="selected python:['-1']==request.filterspec['assignedto']">not selected</option>
-       <option tal:repeat="s db/user/list"
-         tal:attributes="value s/id;
-                         selected python:[s]==request.filterspec['assignedto']"
-         tal:content="s/username">person to filter on</option>
-      </select>
-     </xml:block>
-
-     <br>
-     Show:
-     <tal:block tal:repeat="col python:'id activity priority title status assignedto'.split()">
-      <span tal:replace="col" /><input type="checkbox" name=":columns" tal:attributes="value col;
-        checked python:request.columns.has_key(col)">
-     </tal:block>
-     <br>
-     Sort on:
-     <select name=":sort">
-      <option tal:repeat="col python:request.columns.keys()"
-             tal:attributes="value col; selected python:col in request.sort"
+<form method="GET" tal:attributes="action request/classname">
+ <tal:block tal:replace="structure python:request.indexargs_form(sort=0, group=0)" />
+ <table class="form">
+  <tr tal:condition="batch">
+   <th>Sort on:</th>
+   <td>
+    <select name=":sort">
+     <option value="">- nothing -</option>
+     <option tal:repeat="col python:request.columns.keys()"
+             tal:attributes="value col; selected python:col == request.sort[1]"
              tal:content="col">column</option>
      </select>
-     Group on:
+   </td>
+   <th>Descending:</th>
+   <td><input type="checkbox" name=":sortdir"
+              tal:attributes="checked python:request.sort[0] == '-'"> 
+   </td>
+  </tr>
+  <tr>
+   <th>Group on:</th>
+   <td>
      <select name=":group">
+      <option value="">- nothing -</option>
       <option tal:repeat="col python:request.columns.keys()"
-             tal:attributes="value col; selected python:col in request.group"
+             tal:attributes="value col; selected python:col == request.group[1]"
              tal:content="col">column</option>
      </select>
-     <input type="submit" value="Redisplay">
-    </form>
+   </td>
+   <th>Descending:</th>
+   <td><input type="checkbox" name=":groupdir"
+              tal:attributes="checked python:request.group[0] == '-'"> 
    </td>
   </tr>
+  <tr><td colspan="4"><input type="submit" value="Redisplay"></td></tr>
  </table>
+</form>
+
 </tal:block>
 

Roundup Issue Tracker: http://roundup-tracker.org/