diff roundup/cgi/templating.py @ 1263:db1ae414f363

display _some_ text even when the link isn't interesting
author Richard Jones <richard@users.sourceforge.net>
date Thu, 10 Oct 2002 08:04:26 +0000
parents de0f879f995d
children c3424abf7f77
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Thu Oct 10 07:24:13 2002 +0000
+++ b/roundup/cgi/templating.py	Thu Oct 10 08:04:26 2002 +0000
@@ -566,7 +566,8 @@
                                     # TODO: test for node existence even when
                                     # there's no labelprop!
                                     try:
-                                        if labelprop is not None:
+                                        if labelprop is not None and \
+                                                labelprop != 'id':
                                             label = linkcl.get(linkid, labelprop)
                                     except IndexError:
                                         comments['no_link'] = _('''<strike>The
@@ -577,6 +578,8 @@
                                         if hrefable:
                                             subml.append('<a href="%s%s">%s</a>'%(
                                                 classname, linkid, label))
+                                        else:
+                                            subml.append(label)
                                 ml.append(sublabel + ', '.join(subml))
                             cell.append('%s:\n  %s'%(k, ', '.join(ml)))
                         elif isinstance(prop, hyperdb.Link) and args[k]:
@@ -584,7 +587,7 @@
                             # if we have a label property, try to use it
                             # TODO: test for node existence even when
                             # there's no labelprop!
-                            if labelprop is not None:
+                            if labelprop is not None and labelprop != 'id':
                                 try:
                                     label = linkcl.get(args[k], labelprop)
                                 except IndexError:

Roundup Issue Tracker: http://roundup-tracker.org/