1- # $Id: cgi_client.py,v 1.5 2001-07-28 08:16:52 richard Exp $
1+ # $Id: cgi_client.py,v 1.6 2001-07-29 04:04:00 richard Exp $
22
33import os , cgi , pprint , StringIO , urlparse , re , traceback
44
@@ -120,21 +120,27 @@ def index_filterspec(self):
120120 filterspec [key ] = l
121121 return filterspec
122122
123+
124+ default_index_sort = ['-activity' ]
125+ default_index_group = ['priority' ]
126+ default_index_filter = []
127+ default_index_columns = ['activity' ,'status' ,'title' ]
128+ default_index_filterspec = {'status' : ['1' , '2' , '3' , '4' , '5' , '6' , '7' ]}
123129 def index (self ):
124130 ''' put up an index
125131 '''
126132 self .classname = 'issue'
127133 if self .form .has_key (':sort' ): sort = self .index_arg (':sort' )
128- else : sort = [ '-activity' ]
134+ else : sort = self . default_index_sort
129135 if self .form .has_key (':group' ): group = self .index_arg (':group' )
130- else : group = [ 'priority' ]
136+ else : group = self . default_index_group
131137 if self .form .has_key (':filter' ): filter = self .index_arg (':filter' )
132- else : filter = []
138+ else : filter = self . default_index_filter
133139 if self .form .has_key (':columns' ): columns = self .index_arg (':columns' )
134- else : columns = [ 'activity' , 'status' , 'title' ]
140+ else : columns = self . default_index_columns
135141 filterspec = self .index_filterspec ()
136142 if not filterspec :
137- filterspec [ 'status' ] = [ '1' , '2' , '3' , '4' , '5' , '6' , '7' ]
143+ filterspec = self . default_index_filterspec
138144 return self .list (columns = columns , filter = filter , group = group ,
139145 sort = sort , filterspec = filterspec )
140146
@@ -155,7 +161,7 @@ def list(self, sort=None, group=None, filter=None, columns=None,
155161
156162 '''
157163 cn = self .classname
158- self .pagehead ('Index: %s' % cn )
164+ self .pagehead ('Index of %s' % cn )
159165 if sort is None : sort = self .index_arg (':sort' )
160166 if group is None : group = self .index_arg (':group' )
161167 if filter is None : filter = self .index_arg (':filter' )
@@ -490,6 +496,9 @@ def __del__(self):
490496
491497#
492498# $Log: not supported by cvs2svn $
499+ # Revision 1.5 2001/07/28 08:16:52 richard
500+ # New issue form handles lack of note better now.
501+ #
493502# Revision 1.4 2001/07/28 00:34:34 richard
494503# Fixed some non-string node ids.
495504#
0 commit comments