From b3f2ac4306fd61989bb556f7441f00c64400e0d5 Mon Sep 17 00:00:00 2001 From: jlgijsbers Date: Sun, 10 Aug 2003 10:30:56 +0000 Subject: [PATCH] Final touches to fix query editing. It should work now. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1798 57a73879-2fb5-44c3-a270-3262357dd7e2 --- doc/customizing.txt | 73 +++++++++++++----------- roundup/cgi/client.py | 7 ++- templates/classic/html/issue.search.html | 5 ++ templates/classic/html/user.item.html | 2 +- 4 files changed, 50 insertions(+), 37 deletions(-) diff --git a/doc/customizing.txt b/doc/customizing.txt index 245ca2a..9cdf143 100644 --- a/doc/customizing.txt +++ b/doc/customizing.txt @@ -2,7 +2,7 @@ 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 @@ -2432,43 +2432,48 @@ that when you click on "Search Issues" it will be looking for a ``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:: - - - Category: - - - - - - - - -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:: + + + Priority: + + + + + -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 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:: + + Category: + + + + + + + Adding category to the default view ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py index ccc725a..6ee905f 100644 --- a/roundup/cgi/client.py +++ b/roundup/cgi/client.py @@ -1,4 +1,4 @@ -# $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). @@ -1361,7 +1361,10 @@ You should then receive another email with the new password. 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: diff --git a/templates/classic/html/issue.search.html b/templates/classic/html/issue.search.html index 24563be..8a41340 100644 --- a/templates/classic/html/issue.search.html +++ b/templates/classic/html/issue.search.html @@ -167,6 +167,11 @@ tal:attributes="value request/form/:queryname/value | default"> + +   + + +   *: The "all text" field will look in message bodies and issue titles
diff --git a/templates/classic/html/user.item.html b/templates/classic/html/user.item.html index f939bca..68328da 100644 --- a/templates/classic/html/user.item.html +++ b/templates/classic/html/user.item.html @@ -85,7 +85,7 @@ You are not allowed to view this page. - display + display remove -- 2.30.2