Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 3400:7a3e791b2b2b maint-0.8
fix Mutlilink display
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 27 Jul 2005 22:54:12 +0000 |
| parents | a955987327c2 |
| children | 639a3d1014e9 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Mon Jul 18 02:30:00 2005 +0000 +++ b/roundup/cgi/templating.py Wed Jul 27 22:54:12 2005 +0000 @@ -382,7 +382,10 @@ l = [] for entry in ids: if num_re.match(entry): - l.append(linkcl.get(entry, key)) + label = linkcl.get(entry, key) + # fall back to designator if label is None + if label is None: label = '%s%s'%(linkcl.classname, entry) + l.append(label) else: l.append(entry) return l @@ -934,6 +937,9 @@ if hrefable: subml.append('<a href="%s%s">%s</a>'%( classname, linkid, label)) + elif label is None: + subml.append('%s%s'%(classname, + linkid)) else: subml.append(label) ml.append(sublabel + ', '.join(subml)) @@ -1806,7 +1812,10 @@ k = linkcl.labelprop(1) labels = [] for v in self._value: - labels.append(linkcl.get(v, k)) + label = linkcl.get(v, k) + # fall back to designator if label is None + if label is None: label = '%s%s'%(self._prop.classname, k) + labels.append(label) value = ', '.join(labels) if escape: value = cgi.escape(value)
