Mercurial > p > roundup > code
diff roundup/cgi_client.py @ 702:b6b3a7d4250d search_indexing-0-4-2-branch
Allow customization of the search filters...
...that should be displayed on the search page.
| author | Roche Compaan <rochecompaan@users.sourceforge.net> |
|---|---|
| date | Thu, 02 May 2002 11:49:19 +0000 |
| parents | 250d0d517f64 |
| children | 54333751e98d |
line wrap: on
line diff
--- a/roundup/cgi_client.py Sat Apr 20 13:23:34 2002 +0000 +++ b/roundup/cgi_client.py Thu May 02 11:49:19 2002 +0000 @@ -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.114.2.3 2002-04-20 13:23:31 rochecompaan Exp $ +# $Id: cgi_client.py,v 1.114.2.4 2002-05-02 11:49:18 rochecompaan Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -385,6 +385,13 @@ self.get_customisation_info() show_nodes = 1 if len(self.form.keys()) == 0: + # get the default search filters from instance_config + if hasattr(self.instance, 'SEARCH_FILTERS'): + for f in self.instance.SEARCH_FILTERS: + spec = getattr(self.instance, f) + if spec['CLASS'] == self.classname: + filter = spec['FILTER'] + show_nodes = 0 show_customization = 1 return self.list(columns=columns, filter=filter, group=group, @@ -1405,6 +1412,11 @@ # # $Log: not supported by cvs2svn $ +# Revision 1.114.2.3 2002/04/20 13:23:31 rochecompaan +# We now have a separate search page for nodes. Search links for +# different classes can be customized in instance_config similar to +# index links. +# # Revision 1.114.2.2 2002/04/19 19:54:42 rochecompaan # cgi_client.py # removed search link for the time being
