changeset 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 8d2cb0d09da4
files roundup/cgi_client.py roundup/templates/classic/instance_config.py roundup/templates/extended/instance_config.py
diffstat 3 files changed, 50 insertions(+), 3 deletions(-) [+]
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
--- a/roundup/templates/classic/instance_config.py	Sat Apr 20 13:23:34 2002 +0000
+++ b/roundup/templates/classic/instance_config.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: instance_config.py,v 1.13.2.1 2002-04-20 13:23:33 rochecompaan Exp $
+# $Id: instance_config.py,v 1.13.2.2 2002-05-02 11:49:19 rochecompaan Exp $
 
 MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
 HTTP_PORT=0
@@ -102,6 +102,9 @@
 # list the classes that users can search
 HEADER_SEARCH_LINKS = ['issue']
 
+# list search filters per class
+SEARCH_FILTERS = ['ISSUE_FILTER', 'SUPPORT_FILTER']
+
 # Now the DEFAULT display specification. TODO: describe format
 DEFAULT_INDEX = {
   'LABEL': 'All Issues',
@@ -144,9 +147,24 @@
   },
 }
 
+ISSUE_FILTER = {
+  'CLASS': 'issue'
+  'FILTER': ['status', 'priority', 'assignedto', 'creator']
+}
+
+SUPPORT_FILTER = {
+  'CLASS': 'issue'
+  'FILTER': ['status', 'priority', 'assignedto', 'creator']
+}
+
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.13.2.1  2002/04/20 13:23:33  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.13  2002/03/14 23:59:24  richard
 #  . #517734 ] web header customisation is obscure
 #
--- a/roundup/templates/extended/instance_config.py	Sat Apr 20 13:23:34 2002 +0000
+++ b/roundup/templates/extended/instance_config.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: instance_config.py,v 1.13.2.1 2002-04-20 13:23:34 rochecompaan Exp $
+# $Id: instance_config.py,v 1.13.2.2 2002-05-02 11:49:19 rochecompaan Exp $
 
 MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
 HTTP_PORT=0
@@ -103,6 +103,8 @@
 # list the classes that users can search
 HEADER_SEARCH_LINKS = ['issue', 'support']
 
+SEARCH_FILTERS = ['ISSUE_FILTER', 'SUPPORT_FILTER']
+
 # Now the DEFAULT display specifications. TODO: describe format
 DEFAULT_INDEX = {
   'LABEL': 'All Issues',
@@ -182,8 +184,23 @@
   },
 }
 
+ISSUE_FILTER = {
+  'CLASS': 'issue'
+  'FILTER': ['status', 'priority', 'assignedto', 'creator']
+}
+
+SUPPORT_FILTER = {
+  'CLASS': 'issue'
+  'FILTER': ['status', 'priority', 'assignedto', 'creator']
+}
+
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.13.2.1  2002/04/20 13:23:34  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.13  2002/03/14 23:59:24  richard
 #  . #517734 ] web header customisation is obscure
 #

Roundup Issue Tracker: http://roundup-tracker.org/