diff roundup/cgi/templating.py @ 5336:5a81a097a394

Allow grouping of classhelp items Needs a changed help template to make use of this.
author Ralf Schlatterbeck <rsc@runtux.com>
date Fri, 22 Jun 2018 18:23:07 +0200
parents 7c7f3faa5e10
children 66a17c80e035
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Thu Jun 21 19:49:26 2018 -0400
+++ b/roundup/cgi/templating.py	Fri Jun 22 18:23:07 2018 +0200
@@ -706,7 +706,7 @@
     def classhelp(self, properties=None, label=''"(list)", width='500',
             height='600', property='', form='itemSynopsis',
             pagesize=50, inputtype="checkbox", html_kwargs={},
-            sort=None, filter=None):
+            group='', sort=None, filter=None):
         """Pop up a javascript window with class help
 
         This generates a link to a popup window which displays the
@@ -747,6 +747,8 @@
             else:
                 sort = self._klass.orderprop()
         sort = '&amp;@sort=' + sort
+        if group :
+            group = '&amp;@group=' + group
         if property:
             property = '&amp;property=%s'%property
         if form:
@@ -765,9 +767,9 @@
         else:
            filter = ''
         help_url = "%s?@startwith=0&amp;@template=help&amp;"\
-                   "properties=%s%s%s%s%s&amp;@pagesize=%s%s" % \
+                   "properties=%s%s%s%s%s%s&amp;@pagesize=%s%s" % \
                    (self.classname, properties, property, form, type,
-                   sort, pagesize, filter)
+                   group, sort, pagesize, filter)
         onclick = "javascript:help_window('%s', '%s', '%s');return false;" % \
                   (help_url, width, height)
         return '<a class="classhelp" href="%s" onclick="%s" %s>%s</a>' % \

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