comparison roundup/cgi/templating.py @ 1565:1e617a4a663d

more flexibility in classhelp link labelling (feature [SF#608204])
author Richard Jones <richard@users.sourceforge.net>
date Wed, 26 Mar 2003 10:55:45 +0000
parents 323ff980c2dd
children 21312a7564fd
comparison
equal deleted inserted replaced
1564:cfdcb805ab1b 1565:1e617a4a663d
418 klass = HTMLItem 418 klass = HTMLItem
419 l = [klass(self._client, self.classname, x) 419 l = [klass(self._client, self.classname, x)
420 for x in self._klass.filter(None, filterspec, sort, group)] 420 for x in self._klass.filter(None, filterspec, sort, group)]
421 return l 421 return l
422 422
423 def classhelp(self, properties=None, label='list', width='500', 423 def classhelp(self, properties=None, label='(list)', width='500',
424 height='400', property=''): 424 height='400', property=''):
425 ''' Pop up a javascript window with class help 425 ''' Pop up a javascript window with class help
426 426
427 This generates a link to a popup window which displays the 427 This generates a link to a popup window which displays the
428 properties indicated by "properties" of the class named by 428 properties indicated by "properties" of the class named by
441 properties = self._klass.getprops(protected=0).keys() 441 properties = self._klass.getprops(protected=0).keys()
442 properties.sort() 442 properties.sort()
443 properties = ','.join(properties) 443 properties = ','.join(properties)
444 if property: 444 if property:
445 property = '&property=%s'%property 445 property = '&property=%s'%property
446 return '<a href="javascript:help_window(\'%s?:template=help&' \ 446 return '<a class="classhelp" href="javascript:help_window(\'%s?:'\
447 'properties=%s%s\', \'%s\', \'%s\')"><b>(%s)</b></a>'%( 447 'template=help&properties=%s%s\', \'%s\', \'%s\')">%s</a>'%(
448 self.classname, properties, property, width, height, label) 448 self.classname, properties, property, width, height, label)
449 449
450 def submit(self, label="Submit New Entry"): 450 def submit(self, label="Submit New Entry"):
451 ''' Generate a submit button (and action hidden element) 451 ''' Generate a submit button (and action hidden element)
452 ''' 452 '''

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