Mercurial > p > roundup > code
diff roundup/htmltemplate.py @ 467:103f521810f7
Features added:
. Multilink properties are now displayed as comma separated values in
a textbox
. The add user link is now only visible to the admin user
. Modified the mail gateway to reject submissions from unknown
addresses if ANONYMOUS_ACCESS is denied
| author | Roche Compaan <rochecompaan@users.sourceforge.net> |
|---|---|
| date | Thu, 20 Dec 2001 15:43:01 +0000 |
| parents | a3548136f7bb |
| children | ab9e236cd524 c242455d9b46 |
line wrap: on
line diff
--- a/roundup/htmltemplate.py Thu Dec 20 06:13:24 2001 +0000 +++ b/roundup/htmltemplate.py Thu Dec 20 15:43:01 2001 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: htmltemplate.py,v 1.48 2001-12-20 06:13:24 rochecompaan Exp $ +# $Id: htmltemplate.py,v 1.49 2001-12-20 15:43:01 rochecompaan Exp $ __doc__ = """ Template engine. @@ -178,23 +178,24 @@ elif isinstance(propclass, hyperdb.Multilink): list = linkcl.list() list.sort(sortfunc) - height = height or min(len(list), 7) - l = ['<select multiple name="%s" size="%s">'%(property, height)] k = linkcl.labelprop() - for optionid in list: - option = linkcl.get(optionid, k) - s = '' - if optionid in value: - s = 'selected ' - if showid: - lab = '%s%s: %s'%(propclass.classname, optionid, option) + l = [] + # special treatment for nosy list + if property == 'nosy': + input_value = [] + else: + input_value = value + for v in value: + lab = linkcl.get(v, k) + if property != 'nosy': + l.append('<a href="issue%s">%s: %s</a>'%(v,v,lab)) else: - lab = option - if size is not None and len(lab) > size: - lab = lab[:size-3] + '...' - l.append('<option %svalue="%s">%s</option>'%(s, optionid, lab)) - l.append('</select>') - s = '\n'.join(l) + input_value.append(lab) + if size is None: + size = '10' + l.insert(0,'<input name="%s" size="%s" value="%s">'%(property, + size, ','.join(input_value))) + s = "<br>\n".join(l) else: s = 'Plain: bad propclass "%s"'%propclass return s @@ -884,6 +885,16 @@ # # $Log: not supported by cvs2svn $ +# Revision 1.48 2001/12/20 06:13:24 rochecompaan +# Bugs fixed: +# . Exception handling in hyperdb for strings-that-look-like numbers got +# lost somewhere +# . Internet Explorer submits full path for filename - we now strip away +# the path +# Features added: +# . Link and multilink properties are now displayed sorted in the cgi +# interface +# # Revision 1.47 2001/11/26 22:55:56 richard # Feature: # . Added INSTANCE_NAME to configuration - used in web and email to identify
