fix generated labels tls-sprint
authorsylvain.thenault@logilab.fr
Mon, 04 May 2009 10:50:33 +0200
branchtls-sprint
changeset 1632 2253a1005078
parent 1631 8370be19afd7
child 1634 dbb70cdca535
fix generated labels
web/views/primary.py
--- a/web/views/primary.py	Mon May 04 10:50:25 2009 +0200
+++ b/web/views/primary.py	Mon May 04 10:50:33 2009 +0200
@@ -60,7 +60,10 @@
                                        'order': cls.rdisplay.get_timestamp()}
                         cls.rdisplay.tag_relation(displayinfo, (X, rschema, Y),
                                                   role)
-                    displayinfo.setdefault('label', '%s_%s' % (rschema, role))
+                    if role == 'subject':
+                        displayinfo.setdefault('label', rschema.type)
+                    else:
+                        displayinfo.setdefault('label', '%s_%s' % (rschema, role))
 
     def html_headers(self):
         """return a list of html headers (eg something to be inserted between