summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a8b35a)
raw | patch | inline | side by side (parent: 3a8b35a)
author | jlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 10 Aug 2003 10:30:56 +0000 (10:30 +0000) | ||
committer | jlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 10 Aug 2003 10:30:56 +0000 (10:30 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1798 57a73879-2fb5-44c3-a270-3262357dd7e2
diff --git a/doc/customizing.txt b/doc/customizing.txt
index 245ca2a7d517ebdc4a4e32dd8c775818e79ff059..9cdf143c0aa69f82dfe9692b665fb901f889b0b3 100644 (file)
--- a/doc/customizing.txt
+++ b/doc/customizing.txt
Customising Roundup
===================
-:Version: $Revision: 1.92 $
+:Version: $Revision: 1.93 $
.. This document borrows from the ZopeBook section on ZPT. The original is at:
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
``issue.search.html`` file to display. So that is the file that we will
change.
-This file should begin to look familiar, by now. It is a simple HTML
-form using a table to define structure. You can add the new category
-search code anywhere you like within that form::
-
- <tr>
- <th>Category:</th>
- <td>
- <select name="category">
- <option value="">don't care</option>
- <option value="">------------</option>
- <option tal:repeat="s db/category/list"
- tal:attributes="value s/name"
- tal:content="s/name">category to filter on</option>
- </select>
- </td>
- <td><input type="checkbox" name=":columns" value="category"
- checked></td>
- <td><input type="radio" name=":sort" value="category"></td>
- <td><input type="radio" name=":group" value="category"></td>
- </tr>
-
-Most of this is straightforward to anyone who knows HTML. It is just
-setting up a select list followed by a checkbox and a couple of radio
-buttons.
+If you look at this file it should be starting to seem familiar, although it
+does use some new macros. You can add the new category search code anywhere you
+like within that form::
+
+ <tr tal:define="name string:category;
+ db_klass string:category;
+ db_content string:name;">
+ <th>Priority:</th>
+ <td metal:use-macro="search_select"></td>
+ <td metal:use-macro="column_input"></td>
+ <td metal:use-macro="sort_input"></td>
+ <td metal:use-macro="group_input"></td>
+ </tr>
-The ``tal:repeat`` part repeats the tag for every item in the "category"
-table and sets "s" to each category in turn.
+The definitions in the <tr> opening tag are used by the macros:
-The ``tal:attributes`` part is setting up the ``value=`` part of the
-option tag to be the name part of "s", which is the current category in
-the loop.
+- search_select expands to a drop-down box with all categories using db_klass
+ and db_content.
+- column_input expands to a checkbox for selecting what columns should be
+ displayed.
+- sort_input expands to a radio button for selecting what property should be
+ sorted on.
+- group_input expands to a radio button for selecting what property should be
+ group on.
-The ``tal:content`` part is setting the contents of the option tag to be
-the name part of "s" again. For objects more complex than category,
-obviously you would put an id in the value, and the descriptive part in
-the content; but for categories they are the same.
+The category search code above would expand to the following::
+ <tr>
+ <th>Category:</th>
+ <td>
+ <select name="category">
+ <option value="">don't care</option>
+ <option value="">------------</option>
+ <option value="1">scipy</option>
+ <option value="2">chaco</option>
+ <option value="3">weave</option>
+ </select>
+ </td>
+ <td><input type="checkbox" name=":columns" value="category"></td>
+ <td><input type="radio" name=":sort" value="category"></td>
+ <td><input type="radio" name=":group" value="category"></td>
+ </tr>
Adding category to the default view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index ccc725a19cdd655a4a1282da222173dfc15985ab..6ee905f53e7b2b65ae0e114b2da8f6b17e4edf4e 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.126 2003-07-21 22:56:54 richard Exp $
+# $Id: client.py,v 1.127 2003-08-10 10:30:56 jlgijsbers Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
if queryname:
# parse the environment and figure what the query _is_
req = HTMLRequest(self)
- url = req.indexargs_href('', {})
+
+ # The [1:] strips off the '?' character, it isn't part of the
+ # query string.
+ url = req.indexargs_href('', {})[1:]
# handle editing an existing query
try:
index 24563be1a825e330648f9ce2d645a849aada3514..8a41340885e7d6766470f5010cd328862c98ce9a 100644 (file)
tal:attributes="value request/form/:queryname/value | default"></td>
</tr>
+<tr>
+ <td> </td>
+ <td><input type="submit" value="Search"></td>
+</tr>
+
<tr><td> </td>
<td colspan="4" class="help">
*: The "all text" field will look in message bodies and issue titles<br>
index f939bca8f5a0a15e580c3955b456525873554807..68328dae5fa56b98d83318c7967540f5ba9563f7 100644 (file)
<td><a tal:attributes="href string:query${query/id}"
tal:content="query/name"></a></td>
<td>
- <a tal:attributes="href python:'%s%s'%(query['klass'], query['url'])">display</a>
+ <a tal:attributes="href string:${query/klass}?${query/url}">display</a>
</td>
<td>
<a tal:attributes="href string:?:remove:queries=${query/id}&:action=edit">remove</a>