comparison 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
comparison
equal deleted inserted replaced
693:250d0d517f64 702:b6b3a7d4250d
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: cgi_client.py,v 1.114.2.3 2002-04-20 13:23:31 rochecompaan Exp $ 18 # $Id: cgi_client.py,v 1.114.2.4 2002-05-02 11:49:18 rochecompaan Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 WWW request handler (also used in the stand-alone server). 21 WWW request handler (also used in the stand-alone server).
22 """ 22 """
23 23
383 def searchnode(self): 383 def searchnode(self):
384 columns, filter, group, sort, filterspec = \ 384 columns, filter, group, sort, filterspec = \
385 self.get_customisation_info() 385 self.get_customisation_info()
386 show_nodes = 1 386 show_nodes = 1
387 if len(self.form.keys()) == 0: 387 if len(self.form.keys()) == 0:
388 # get the default search filters from instance_config
389 if hasattr(self.instance, 'SEARCH_FILTERS'):
390 for f in self.instance.SEARCH_FILTERS:
391 spec = getattr(self.instance, f)
392 if spec['CLASS'] == self.classname:
393 filter = spec['FILTER']
394
388 show_nodes = 0 395 show_nodes = 0
389 show_customization = 1 396 show_customization = 1
390 return self.list(columns=columns, filter=filter, group=group, 397 return self.list(columns=columns, filter=filter, group=group,
391 sort=sort, filterspec=filterspec, 398 sort=sort, filterspec=filterspec,
392 show_customization=show_customization, show_nodes=show_nodes) 399 show_customization=show_customization, show_nodes=show_nodes)
1403 props[key] = value 1410 props[key] = value
1404 return props 1411 return props
1405 1412
1406 # 1413 #
1407 # $Log: not supported by cvs2svn $ 1414 # $Log: not supported by cvs2svn $
1415 # Revision 1.114.2.3 2002/04/20 13:23:31 rochecompaan
1416 # We now have a separate search page for nodes. Search links for
1417 # different classes can be customized in instance_config similar to
1418 # index links.
1419 #
1408 # Revision 1.114.2.2 2002/04/19 19:54:42 rochecompaan 1420 # Revision 1.114.2.2 2002/04/19 19:54:42 rochecompaan
1409 # cgi_client.py 1421 # cgi_client.py
1410 # removed search link for the time being 1422 # removed search link for the time being
1411 # moved rendering of matches to htmltemplate 1423 # moved rendering of matches to htmltemplate
1412 # hyperdb.py 1424 # hyperdb.py

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