Skip to content

Commit b3f7a44

Browse files
author
Richard Jones
committed
[SF#502953] nosy-like treatment of other multilinks
... had to revert most of the previous change to the multilink field display... not good.
1 parent 09acb27 commit b3f7a44

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Fixed:
1818
instance_config instead of the mish-mash of classes. This will make
1919
switching to a ConfigParser setup easier too, I hope.
2020
. #502951 ] adding new properties to old database
21+
. #502953 ] nosy-like treatment of other multilinks
2122

2223

2324
2002-01-08 - 0.4.0b1

roundup/htmltemplate.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: htmltemplate.py,v 1.54 2002-01-14 05:16:51 richard Exp $
18+
# $Id: htmltemplate.py,v 1.55 2002-01-14 06:45:03 richard Exp $
1919

2020
__doc__ = """
2121
Template engine.
@@ -179,23 +179,16 @@ def sortfunc(a, b, cl=linkcl):
179179
elif isinstance(propclass, hyperdb.Multilink):
180180
list = linkcl.list()
181181
list.sort(sortfunc)
182-
k = linkcl.labelprop()
183182
l = []
184-
# special treatment for nosy list
185-
if property == 'nosy':
186-
input_value = []
187-
else:
188-
input_value = value
189-
for v in value:
190-
lab = linkcl.get(v, k)
191-
if property != 'nosy':
192-
l.append('<a href="issue%s">%s: %s</a>'%(v,v,lab))
193-
else:
194-
input_value.append(lab)
183+
# map the id to the label property
184+
# TODO: allow reversion to the older <select> box style display
185+
if not showid:
186+
k = linkcl.labelprop()
187+
value = [linkcl.get(v, k) for v in value]
195188
if size is None:
196189
size = '10'
197190
l.insert(0,'<input name="%s" size="%s" value="%s">'%(property,
198-
size, ','.join(input_value)))
191+
size, ','.join(value)))
199192
s = "<br>\n".join(l)
200193
else:
201194
s = _('Plain: bad propclass "%(propclass)s"')%locals()
@@ -889,6 +882,10 @@ def render(self, form):
889882

890883
#
891884
# $Log: not supported by cvs2svn $
885+
# Revision 1.54 2002/01/14 05:16:51 richard
886+
# The submit buttons need a name attribute or mozilla won't submit without a
887+
# file upload. Yeah, that's bloody obscure. Grr.
888+
#
892889
# Revision 1.53 2002/01/14 04:03:32 richard
893890
# How about that ... date fields have never worked ...
894891
#

0 commit comments

Comments
 (0)