Code

display _some_ text even when the link isn't interesting
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 10 Oct 2002 08:04:26 +0000 (08:04 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 10 Oct 2002 08:04:26 +0000 (08:04 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1336 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/templating.py

index cfe998e01dd97b4d149e654d29b8e1581bb57b2d..89e3eee90a8a71707356089cc84fefc28516851a 100644 (file)
@@ -566,7 +566,8 @@ class HTMLItem(HTMLPermissions):
                                     # 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 @@ class HTMLItem(HTMLPermissions):
                                         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 @@ class HTMLItem(HTMLPermissions):
                             # 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: