summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9affa33)
raw | patch | inline | side by side (parent: 9affa33)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 11 Jun 2002 04:57:04 +0000 (04:57 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 11 Jun 2002 04:57:04 +0000 (04:57 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@770 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/htmltemplate.py | patch | blob | history |
index e92fdd31ea1d8663eb4efb869c3e3896a352569c..6a2ece45eec27e1af49bd9a2fc01c2a26be560e6 100644 (file)
--- a/roundup/htmltemplate.py
+++ b/roundup/htmltemplate.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: htmltemplate.py,v 1.91 2002-05-31 00:08:02 richard Exp $
+# $Id: htmltemplate.py,v 1.92 2002-06-11 04:57:04 richard Exp $
__doc__ = """
Template engine.
return '<textarea name="%s" rows="%s" cols="%s">%s</textarea>'%(
property, rows, cols, value)
- def do_menu(self, property, size=None, height=None, showid=0):
- ''' for a Link property, display a menu of the available choices
+ def do_menu(self, property, size=None, height=None, showid=0,
+ additional=[]):
+ ''' For a Link/Multilink property, display a menu of the available
+ choices
+
+ If the additional properties are specified, they will be
+ included in the text of each option in (brackets, with, commas).
'''
if not self.nodeid and self.form is None and self.filterspec is None:
return _('[Field: not called from item]')
lab = option
if size is not None and len(lab) > size:
lab = lab[:size-3] + '...'
+ if additional:
+ m = []
+ for propname in additional:
+ m.append(linkcl.get(optionid, propname))
+ lab = lab + ' (%s)'%', '.join(m)
lab = cgi.escape(lab)
l.append('<option %svalue="%s">%s</option>'%(s, optionid,
lab))
lab = option
if size is not None and len(lab) > size:
lab = lab[:size-3] + '...'
+ if additional:
+ m = []
+ for propname in additional:
+ m.append(linkcl.get(optionid, propname))
+ lab = lab + ' (%s)'%', '.join(m)
lab = cgi.escape(lab)
l.append('<option %svalue="%s">%s</option>'%(s, optionid, lab))
l.append('</select>')
#
# $Log: not supported by cvs2svn $
+# Revision 1.91 2002/05/31 00:08:02 richard
+# can now just display a link/multilink id - useful for stylesheet stuff
+#
# Revision 1.90 2002/05/25 07:16:24 rochecompaan
# Merged search_indexing-branch with HEAD
#