From: gmcm Date: Sat, 20 Jul 2002 19:29:10 +0000 (+0000) Subject: Fixes/improvements to the search form & saved queries. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bc12472a841d42d709a5347d68cdbd398aa21f3a;p=roundup.git Fixes/improvements to the search form & saved queries. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@905 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py index 715d02d..f456673 100644 --- a/roundup/cgi_client.py +++ b/roundup/cgi_client.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: cgi_client.py,v 1.142 2002-07-18 11:17:30 gmcm Exp $ +# $Id: cgi_client.py,v 1.143 2002-07-20 19:29:10 gmcm Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -491,8 +491,6 @@ function help_window(helpurl, width, height) { ''' cn = self.classname cl = self.db.classes[cn] - self.pagehead(_('%(instancename)s: Index of %(classname)s')%{ - 'classname': cn, 'instancename': self.instance.INSTANCE_NAME}) if sort is None: sort = self.index_sort() if group is None: group = self.index_arg(':group') if filter is None: filter = self.index_arg(':filter') @@ -531,7 +529,9 @@ function help_window(helpurl, width, height) { # create a query d = {} - d['name'] = self.form[':name'].value + d['name'] = nm = self.form[':name'].value + if not nm: + d['name'] = nm = 'New Query' d['klass'] = self.form[':classname'].value d['url'] = url qid = self.db.getclass('query').create(**d) @@ -543,6 +543,9 @@ function help_window(helpurl, width, height) { queries.append(qid) usercl.set(uid, queries=queries) + self.pagehead(_('%(instancename)s: Index of %(classname)s')%{ + 'classname': cn, 'instancename': self.instance.INSTANCE_NAME}) + index = htmltemplate.IndexTemplate(self, self.instance.TEMPLATES, cn) try: index.render(filterspec, search_text, filter, columns, sort, @@ -1610,6 +1613,11 @@ def parsePropsFromForm(db, cl, form, nodeid=0, num_re=re.compile('^\d+$')): # # $Log: not supported by cvs2svn $ +# Revision 1.142 2002/07/18 11:17:30 gmcm +# Add Number and Boolean types to hyperdb. +# Add conversion cases to web, mail & admin interfaces. +# Add storage/serialization cases to back_anydbm & back_metakit. +# # Revision 1.141 2002/07/17 12:39:10 gmcm # Saving, running & editing queries. # diff --git a/roundup/htmltemplate.py b/roundup/htmltemplate.py index 57b555a..2dc9af7 100644 --- a/roundup/htmltemplate.py +++ b/roundup/htmltemplate.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: htmltemplate.py,v 1.102 2002-07-18 23:07:08 richard Exp $ +# $Id: htmltemplate.py,v 1.103 2002-07-20 19:29:10 gmcm Exp $ __doc__ = """ Template engine. @@ -1196,17 +1196,21 @@ class IndexTemplate(TemplateFunctions): w('  \n') w(' \n') w(' \n') - if self.db.getclass('user').getprops().has_key('queries'): + if (self.db.getclass('user').getprops().has_key('queries') + and not self.client.user in (None, "anonymous")): w(' \n') w('
\n') w(' \n') w(' \n') w(' Name\n') - w(' \n') + w(' \n') + w(' If you give the query a name ' + 'and click Save, it will appear on your menu. Saved queries may be ' + 'edited by going to My Details and clicking on the query name.') w(' \n') w(' \n') w('  \n' % self.classname) - w(' \n') + w(' \n') w(' \n') w('\n') @@ -1364,6 +1368,9 @@ class NewItemTemplate(TemplateFunctions): # # $Log: not supported by cvs2svn $ +# Revision 1.102 2002/07/18 23:07:08 richard +# Unit tests and a few fixes. +# # Revision 1.101 2002/07/18 11:17:30 gmcm # Add Number and Boolean types to hyperdb. # Add conversion cases to web, mail & admin interfaces.