Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 3401:62e4032cb280
merge from maint-0-8
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 27 Jul 2005 22:55:50 +0000 |
| parents | 5c7ff95fecad |
| children | fb82ab9461b0 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Mon Jul 18 02:35:18 2005 +0000 +++ b/roundup/cgi/templating.py Wed Jul 27 22:55:50 2005 +0000 @@ -383,7 +383,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 @@ -935,6 +938,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)) @@ -1822,7 +1828,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)
