web/hosts/issues/html bug.index,1.4,1.5 bug.search,1.7,1.8 task.index,1.2,1.3 task.search,1.4,1.5

Tobias Hunger <[email protected]> Wed, 20 Aug 2003 16:24:40 -0500
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/web/hosts/issues/html
In directory purcel:/tmp/cvs-serv1752/html

Modified Files:
	bug.index bug.search task.index task.search 
Log Message:
Search bugs and tasks on more fields.


Index: bug.index
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/html/bug.index,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- bug.index	20 Aug 2003 18:20:47 -0000	1.4
+++ bug.index	20 Aug 2003 21:24:35 -0000	1.5
@@ -21,6 +21,9 @@
           <th tal:condition="request/show/components">Component</th>
           <th tal:condition="request/show/platforms">Platform</th>
           <th tal:condition="request/show/status">Status</th>
+          <th tal:condition="request/show/resolution">Resolution</th>
+          <th tal:condition="request/show/dependson">Depends&nbsp;on</th>
+          <th tal:condition="request/show/files">Files</th>
           <th tal:condition="request/show/creator">Created&nbsp;By</th>
           <th tal:condition="request/show/assignedto">Assigned&nbsp;To</th>
         </tr>
@@ -43,8 +46,8 @@
                  tal:content="i/id">&nbsp;</a></td>
             <td nowrap tal:condition="request/show/creation"
                        tal:content="i/creation/reldate">&nbsp;</td>
-            <td tal:condition="request/show/activity"
-                tal:content="i/activity/reldate">&nbsp;</td>
+            <td nowrap tal:condition="request/show/activity"
+                       tal:content="i/activity/reldate">&nbsp;</td>
             <td tal:condition="request/show/topics"
                 tal:content="i/topics">&nbsp;</td>
             <td tal:condition="request/show/bug_type"
@@ -59,6 +62,12 @@
                 tal:content="i/platforms">&nbsp;</td>
             <td tal:condition="request/show/status"
                 tal:content="i/status">&nbsp;</td>
+            <td tal:condition="request/show/resolution"
+                tal:content="i/resolution">&nbsp;</td>
+            <td tal:condition="request/show/dependson" 
+                tal:content="i/dependson">&nbsp;</td>
+            <td tal:condition="request/show/files" 
+                tal:content="i/files">&nbsp;</td>
             <td tal:condition="request/show/creator"
                 tal:content="i/creator">&nbsp;</td>
             <td tal:condition="request/show/assignedto"

Index: bug.search
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/html/bug.search,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- bug.search	20 Aug 2003 18:20:47 -0000	1.7
+++ bug.search	20 Aug 2003 21:24:35 -0000	1.8
@@ -129,6 +129,22 @@
           <td metal:use-macro="group_input"></td>
         </tr>
 
+	<tr tal:define="name string:resolution;
+                db_klass string:resolution;
+                db_content string:name;">
+          <th>Resolution:</th>
+          <td metal:use-macro="search_select">
+            <tal:block metal:fill-slot="extra_options">
+              <option value="1,2"
+                tal:attributes="selected python:value == '1,2'">not resolved</option>
+              <option value="-1" tal:attributes="selected python:value == '-1'">not selected</option>
+            </tal:block>
+          </td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td metal:use-macro="group_input"></td>
+        </tr>
+
         <tr tal:define="name string:assignedto;
                 db_klass string:user;
                 db_content string:username;">

Index: task.index
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/html/task.index,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- task.index	11 Dec 2002 22:01:35 -0000	1.2
+++ task.index	20 Aug 2003 21:24:35 -0000	1.3
@@ -3,100 +3,135 @@
     <p class="header">List of tasks</p>
   </tal:block>
 
-<tal:block metal:fill-slot="content">
+  <tal:block metal:fill-slot="content">
 
-<tal:block tal:define="batch request/batch">
- <table class="list">
-  <tr>
-   <th tal:condition="request/show/priority">Priority</th>
-   <th tal:condition="request/show/id">ID</th>
-   <th tal:condition="request/show/activity">Activity</th>
-   <th tal:condition="request/show/title">Title</th>
-   <th tal:condition="request/show/status">Status</th>
-   <th tal:condition="request/show/creator">Created&nbsp;By</th>
-   <th tal:condition="request/show/assignedto">Assigned&nbsp;To</th>
-  </tr>
- <tal:block tal:repeat="i batch">
-  <tr tal:condition="python:request.group[1] and
-                            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 tal:attributes="class python:['normal', 'alt'][repeat['i'].even()]">
-   <td tal:condition="request/show/priority" tal:content="i/priority"></td>
-   <td tal:condition="request/show/id" tal:content="i/id"></td>
-   <td tal:condition="request/show/activity"
-       tal:content="i/activity/reldate"></td>
-   <td tal:condition="request/show/title">
-    <a tal:attributes="href string:task${i/id}"
-       tal:content="python:str(i.title) or '[no title]'">title</a>
-   </td>
-   <td tal:condition="request/show/status" tal:content="i/status"></td>
-   <td tal:condition="request/show/creator" tal:content="i/creator"></td>
-   <td tal:condition="request/show/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; border: 0">
-     <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; border: 0">
-     <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>
+    <tal:block tal:define="batch request/batch"
+               tal:condition="context/is_view_ok">
 
-<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 context/properties"
-             tal:attributes="value col/_name;
-                             selected python:col._name == request.sort[1]"
-             tal:content="col/_name">column</option>
-    </select>
-   </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 context/properties"
-             tal:attributes="value col/_name;
-                             selected python:col._name == request.group[1]"
-             tal:content="col/_name">column</option>
-    </select>
-   </td>
-   <th>Descending:</th>
-   <td><input type="checkbox" name=":groupdir"
-              tal:attributes="checked python:request.group[0] == '-'"> 
-   </td>
-  </tr>
- </table>
- <p><input type="submit" value="Redisplay"></p>
-</form>
+      <table class="list">
+        <tr>
+          <th tal:condition="request/show/priority">Priority</th>
+          <th tal:condition="request/show/id">ID</th>
+          <th tal:condition="request/show/creation">Creation</th>
+          <th tal:condition="request/show/activity">Activity</th>
+          <th tal:condition="request/show/topics">Topic</th>
+          <th tal:condition="request/show/task_type">Task&nbsp;Type</th>
+          <th tal:condition="request/show/title">Title</th>
+          <th tal:condition="request/show/components">Component</th>
+          <th tal:condition="request/show/status">Status</th>
+          <th tal:condition="request/show/solves">Solves</th>
+          <th tal:condition="request/show/dependson">Depends&nbsp;on</th>
+          <th tal:condition="request/show/files">Files</th>
+          <th tal:condition="request/show/creator">Created&nbsp;By</th>
+          <th tal:condition="request/show/assignedto">Assigned&nbsp;To</th>
+        </tr>
 
-</tal:block>
-</tal:block>
-</tal:block>
+        <tal:block tal:repeat="i batch">
+          <tr tal:condition="python:request.group[1] and
+                             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 tal:attributes="class python:['normal', 'alt'][repeat['i'].even()]">
+            <td tal:condition="request/show/priority"
+                tal:content="python:i.priority.plain() or default">&nbsp;</td>
+            <td tal:condition="request/show/id">
+              <a tal:attributes="href string:big${i/id}"
+                 tal:content="i/id">&nbsp;</a></td>
+            <td nowrap tal:condition="request/show/creation"
+                       tal:content="i/creation/reldate">&nbsp;</td>
+            <td nowrap tal:condition="request/show/activity"
+                       tal:content="i/activity/reldate">&nbsp;</td>
+            <td tal:condition="request/show/topics"
+                tal:content="i/topics">&nbsp;</td>
+            <td tal:condition="request/show/task_type"
+                tal:content="i/task_type">&nbsp;</td>
+            <td tal:condition="request/show/title">
+                <a tal:attributes="href string:task${i/id}"
+                   tal:content="python:str(i.title) or '[no title]'">title</a>
+            </td>
+            <td tal:condition="request/show/components"
+                tal:content="i/components">&nbsp;</td>
+            <td tal:condition="request/show/status"
+                tal:content="i/status">&nbsp;</td>
+            <td tal:condition="request/show/solves"
+                tal:content="i/solves">&nbsp;</td>
+            <td tal:condition="request/show/files"
+                tal:content="i/files">&nbsp;</td>
+            <td tal:condition="request/show/creator"
+                tal:content="i/creator">&nbsp;</td>
+            <td tal:condition="request/show/assignedto"
+                tal:content="i/assignedto">&nbsp;</td>
+          </tr>
+        </tal:block>
+ 
+        <tr tal:condition="batch">
+          <th tal:attributes="colspan python:len(request.columns)">
+            <table width="100%">
+              <tr class="navigation">
+                <th>
+                  <a tal:define="prev batch/previous" tal:condition="prev"
+                     tal:attributes="href python:request.indexargs_href(request.classname,
+                     {':startwith':prev.first, ':pagesize':prev.size})">&lt;&lt; previous</a>
+                  &nbsp;
+                </th>
+                <th tal:content="python: '%d...%d out of %d'%(batch.start,
+                     batch.start+batch.length-1, batch.sequence_length)">current</th>
+                <th>
+                  <a tal:define="next batch/next" tal:condition="next"
+                     tal:attributes="href python:request.indexargs_href(request.classname,
+                     {':startwith':next.first, ':pagesize':next.size})">next &gt;&gt;</a>
+                  &nbsp;
+                </th>
+              </tr>
+            </table>
+          </th>
+        </tr>
+      </table>
 
+      <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 context/properties"
+                        tal:attributes="value col/_name;
+                                        selected python:col._name == request.sort[1]"
+                        tal:content="col/_name">column</option>
+              </select>
+            </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 context/properties"
+                        tal:attributes="value col/_name;
+                                        selected python:col._name == request.group[1]"
+                        tal:content="col/_name">column</option>
+              </select>
+            </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>
+  </tal:block>
+</tal:block>

Index: task.search
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/html/task.search,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- task.search	28 Dec 2002 04:51:41 -0000	1.4
+++ task.search	20 Aug 2003 21:24:35 -0000	1.5
@@ -5,227 +5,232 @@
 
   <tal:block metal:fill-slot="content">
 
-<form method="GET" tal:attributes="action request/classname">
-<input type="hidden" name=":action" value="search">
-<input type="hidden" name=":columns" value="id">
-
-<table class="form" tal:define="
-   cols python:'id activity priority title status assignedto'.split();
-   defsort python:['activity'];
-   defgroup python:['priority'];
-   defdisp python:'id activity title status assignedto'.split()">
+    <form method="GET" tal:attributes="action request/classname">
+      <input type="hidden" name=":action" value="search">
 
-<tr class="form-header">
- <th>&nbsp;</th>
- <th>Filter on</th><th>Display</th><th>Sort on</th><th>Group on</th>
-</tr>
+      <table class="form" tal:define="
+             cols python:request.columns or
+               'id activity title status assignedto'.split();
+             sort_on python:request.sort[1] or 'activity';
+             group_on python:request.group[1] or 'priority';
 
-<tr>
- <th>All text*:</th>
- <td><input name=":search_text"></td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
-</tr>
+             search_input templates/page/macros/search_input;
+             column_input templates/page/macros/column_input;
+             sort_input templates/page/macros/sort_input;
+             group_input templates/page/macros/group_input;
+             search_multiselect templates/page/macros/search_multiselect;
+             search_select templates/page/macros/search_select">
 
-<tr>
- <th>Title:</th>
- <td><input name="title"></td>
- <td><input type="checkbox" name=":columns" value="title" checked></td>
- <td><input type="radio" name=":sort" value="title"></td>
- <td>&nbsp;</td>
-</tr>
+        <tr>
+          <th class="header">&nbsp;</th>
+          <th class="header">Filter on</th>
+          <th class="header">Display</th>
+          <th class="header">Sort on</th>
+          <th class="header">Group on</th>
+        </tr>
 
-<tr>
- <th>Created:</th>
- <td><input name="activity"></td>
- <td><input type="checkbox" name=":columns" value="created"></td>
- <td><input type="radio" name=":sort" value="created"></td>
- <td><input type="radio" name=":group" value="created"></td>
-</tr>
+        <tr class="form-header">
+          <th>&nbsp;</th>
+          <th>Filter on</th><th>Display</th><th>Sort on</th><th>Group on</th>
+        </tr>
+        
+        <tr tal:define="name string::search_text">
+          <th>All text*:</th>
+          <td metal:use-macro="search_input"></td>
+          <td>&nbsp;</td>
+          <td>&nbsp;</td>
+          <td>&nbsp;</td>
+        </tr>
 
-<tr>
- <th>Creator:</th>
- <td>
-  <select name="creator">
-   <option value="">don't care</option>
-   <option tal:attributes="value request/user/id">created by me</option>
-   <option value="-1">------------</option>
-   <option tal:repeat="s db/user/list" tal:attributes="value s/id"
-     tal:content="s/username">user to filter on</option>
-  </select>
- </td>
- <td><input type="checkbox" name=":columns" value="creator" checked></td>
- <td><input type="radio" name=":sort" value="creator"></td>
- <td><input type="radio" name=":group" value="creator"></td>
-</tr>
+        <tr tal:define="name string:title">
+          <th>Title:</th>
+          <td metal:use-macro="search_input"></td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td>&nbsp;</td>
+        </tr>
 
-<tr>
- <th>Activity:</th>
- <td><input name="activity"></td>
- <td><input type="checkbox" name=":columns" value="activity" checked></td>
- <td><input type="radio" name=":sort" value="activity"></td>
- <td>&nbsp;</td>
-</tr>
+        <tr tal:define="name string:id">
+          <th>ID:</th>
+          <td metal:use-macro="search_input"></td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td>&nbsp;</td>
+        </tr>
 
-<tr>
- <th>Priority:</th>
- <td>
-  <select name="priority">
-   <option value="">don't care</option>
-   <option value="-1">not selected</option>
-   <option value="">------------</option>
-   <option tal:repeat="s db/priority/list" tal:attributes="value s/id"
-     tal:content="s/name">priority to filter on</option>
-  </select>
- </td>
- <td><input type="checkbox" name=":columns" value="priority"></td>
- <td><input type="radio" name=":sort" value="priority"></td>
- <td><input type="radio" name=":group" value="priority"></td>
-</tr>
+        <tr tal:define="name string:creation">
+          <th>Creation Date:</th>
+          <td metal:use-macro="search_input"></td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td metal:use-macro="group_input"></td>
+        </tr>
 
-<tr>
- <th>Type:</th>
- <td>
-  <select name="task_type">
-   <option value="">don't care</option>
-   <option value="-1">not selected</option>
-   <option value="">------------</option>
-   <option tal:repeat="s db/task_type/list" tal:attributes="value s/id"
-           tal:content="s/name">status to filter on</option>
-  </select>
- </td>
- <td><input type="checkbox" name=":columns" value="task_type" checked></td>
- <td><input type="radio" name=":sort" value="task_type"></td>
- <td><input type="radio" name=":group" value="task_type"></td>
-</tr>
+        <tr tal:define="name string:creator;
+                db_klass string:user;
+                db_content string:username;">
+          <th>Creator:</th>
+          <td metal:use-macro="search_select">
+            <option metal:fill-slot="extra_options"
+               tal:attributes="value request/user/id">created by me</option>
+          </td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td metal:use-macro="group_input"></td>
+        </tr>
 
+        <tr tal:define="name string:activity">
+          <th>Activity:</th>
+          <td metal:use-macro="search_input"></td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td>&nbsp;</td>
+        </tr>
 
-<tr>
- <th>Status:</th>
- <td>
-  <select name="status">
-   <option value="">don't care</option>
-   <option value="-1,1,2">not finished</option>
-   <option value="-1">not selected</option>
-   <option value="">------------</option>
-   <option tal:repeat="s db/status/list" tal:attributes="value s/id"
-           tal:content="s/name">status to filter on</option>
-  </select>
- </td>
- <td><input type="checkbox" name=":columns" value="status" checked></td>
- <td><input type="radio" name=":sort" value="status"></td>
- <td><input type="radio" name=":group" value="status"></td>
-</tr>
+        <tr tal:define="name string:priority;
+                db_klass string:priority;
+                db_content string:name;">
+          <th>Priority:</th>
+          <td metal:use-macro="search_select">
+            <option metal:fill-slot="extra_options" value="-1"
+                tal:attributes="selected python:value == '-1'">not selected</option>
+          </td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td metal:use-macro="group_input"></td>
+        </tr>
 
-<tr>
- <th>Result:</th>
- <td>
-  <select name="result">
-   <option value="">don't care</option>
-   <option value="-1,1,2">not finished</option>
-   <option value="-1">not selected</option>
-   <option value="">------------</option>
-   <option tal:repeat="s db/result/list" tal:attributes="value s/id"
-           tal:content="s/name">status to filter on</option>
-  </select>
- </td>
- <td><input type="checkbox" name=":columns" value="result" checked></td>
- <td><input type="radio" name=":sort" value="result"></td>
- <td><input type="radio" name=":group" value="result"></td>
-</tr>
+        <tr tal:define="name string:status;
+                db_klass string:status;
+                db_content string:name;">
+          <th>Status:</th>
+          <td metal:use-macro="search_select">
+            <tal:block metal:fill-slot="extra_options">
+              <option value="-1,1,2"
+                tal:attributes="selected python:value == '-1,1,2'">not resolved</option>
+              <option value="-1" tal:attributes="selected python:value == '-1'">not selected</option>
+            </tal:block>    
+          </td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td metal:use-macro="group_input"></td>
+        </tr>
 
+        <tr tal:define="name string:assignedto;
+                db_klass string:user;
+                db_content string:username;">
+          <th>Assigned to:</th>
+          <td metal:use-macro="search_select">
+            <tal:block metal:fill-slot="extra_options">
+              <option tal:attributes="value request/user/id">assigned to me</option>
+              <option value="-1" tal:attributes="selected python:value == '-1'">unassigned</option>
+            </tal:block>
+          </td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td metal:use-macro="group_input"></td>
+        </tr>
 
-<tr>
- <th>Assigned To:</th>
- <td>
-  <select name="assignedto">
-   <option value="">don't care</option>
-   <option tal:attributes="value request/user/id">assigned to me</option>
-   <option value="-1">unassigned</option>
-   <option value="">------------</option>
-   <option tal:repeat="s db/user/list" tal:attributes="value s/id"
-     tal:content="s/username">user to filter on</option>
-  </select>
- </td>
- <td><input type="checkbox" name=":columns" value="assignedto" checked></td>
- <td><input type="radio" name=":sort" value="assignedto"></td>
- <td><input type="radio" name=":group" value="assignedto"></td>
-</tr>
+        <tr tal:define="name string:task_type;
+                db_klass string:task_type;
+                db_content string:name;">
+          <th>Type:</th>
+          <td metal:use-macro="search_select">
+            <tal:block metal:fill-slot="extra_options">
+              <option value="-1" tal:attributes="selected python:value == '-1'">unspecified</option>
+            </tal:block>
+          </td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td metal:use-macro="group_input"></td>
+        </tr>
 
-<tr>
- <th>Topic:</th>
- <td>
-  <select multiple name="topics" size="5">
-   <option value="">don't care</option>
-   <option value="-1">not selected</option>
-   <option value="">------------</option>
-   <option tal:repeat="s db/topic/list" tal:attributes="value s/id"
-     tal:content="s/name">topics to filter on</option>
-  </select>
- </td>
- <td><input type="checkbox" name=":columns" value="topic"></td>
- <td><input type="radio" name=":sort" value="topic"></td>
- <td><input type="radio" name=":group" value="topic"></td>
-</tr>
+        <tr tal:define="name string:topics;
+                size string:5;
+                db_klass string:topic;
+                db_content string:name;">
+          <th>Topic:</th>
+          <td metal:use-macro="search_multiselect">
+            <tal:block metal:fill-slot="extra_options">
+              <option value="-1" tal:attributes="selected python:value == '-1'">unspecified</option>
+            </tal:block>
+          </td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td metal:use-macro="group_input"></td>
+        </tr>
 
-<tr>
- <th>Components:</th>
- <td>
-  <select multiple name="components" size="5">
-   <option value="">don't care</option>
-   <option value="-1">not selected</option>
-   <option value="">------------</option>
-   <option tal:repeat="s db/component/list" tal:attributes="value s/id"
-     tal:content="s/name">components to filter on</option>
-  </select>
- </td>
- <td><input type="checkbox" name=":columns" value="components"></td>
- <td><input type="radio" name=":sort" value="components"></td>
- <td><input type="radio" name=":group" value="components"></td>
-</tr>
+        <tr tal:define="name string:components;
+                size string:5;
+                db_klass string:component;
+                db_content string:name;">
+          <th>Components:</th>
+          <td metal:use-macro="search_multiselect">
+            <tal:block metal:fill-slot="extra_options">
+              <option value="-1" tal:attributes="selected python:value == '-1'">unspecified</option>
+            </tal:block>
+          </td>
+          <td metal:use-macro="column_input"></td>
+          <td metal:use-macro="sort_input"></td>
+          <td metal:use-macro="group_input"></td>
+        </tr>
 
-<tr>
-<th>Pagesize:</th>
-<td><input type="text" name=":pagesize" size="3" value="50"></td>
-</tr>
+        <tr>
+          <th>Pagesize:</th>
+          <td>
+            <input name=":pagesize" size="3" value="50"
+              tal:attributes="value request/form/:pagesize/value | default">
+          </td>
+        </tr>
 
-<tr>
-<th>Start With:</th>
-<td><input type="text" name=":startwith" size="3" value="0"></td>
-</tr>
+        <tr>
+          <th>Start With:</th>
+          <td>
+            <input name=":startwith" size="3" value="0"
+              tal:attributes="value request/form/:startwith/value | default">
+          </td>
+        </tr>
 
-<tr>
-<th>Sort Descending:</th>
-<td><input type="checkbox" name=":sortdir" checked>
-</td>
+        <tr>
+          <th>Sort Descending:</th>
+          <td>
+            <input type="checkbox" name=":sortdir"
+              tal:attributes="checked python:request.sort[0] == '-' or request.sort [0] is None">
+          </td>
+        </tr>
 
-<tr>
-<th>Group Descending:</th>
-<td><input type="checkbox" name=":groupdir">
-</td>
-</tr>
+        <tr>
+          <th>Group Descending:</th>
+          <td>
+            <input type="checkbox" name=":groupdir"
+              tal:attributes="checked python:request.group[0] == '-'">
+          </td>
+        </tr>
 
-<tr>
-<th>Query name**:</th>
-<td><input name=":queryname">
-</td>
-</tr>
+        <tr>
+          <th>Query name**:</th>
+          <td>
+            <input name=":queryname"
+               tal:attributes="value request/form/:queryname/value | default">
+          </td>
+        </tr>
 
-<tr><td>&nbsp;</td>
-<td><input type="submit" value="Search"></td>
-</tr>
+        <tr>
+          <td>&nbsp;</td>
+          <td><input type="submit" value="Search"></td>
+        </tr>
 
-<tr><td>&nbsp;</td>
- <td colspan="4" class="help">
+        <tr>
+          <td>&nbsp;</td>
+          <td colspan="4" class="help">
    *: The "all text" field will look in message bodies and task titles<br>
    **: If you supply a name, the query will be saved off and available as a
        link in the sidebar
- </td>
-</tr>
-</table>
+          </td>
+        </tr>
+      </table>
 
-</form>
+    </form>
 
   </tal:block>
 </tal:block>