web/views/schema.py
changeset 8216 99ff746e8de8
parent 8190 2a3c1b787688
parent 8213 076c80543fcd
child 8665 e65af61bde7d
--- a/web/views/schema.py	Fri Feb 10 16:31:39 2012 +0100
+++ b/web/views/schema.py	Fri Feb 10 16:53:52 2012 +0100
@@ -205,11 +205,11 @@
         _ = self._cw._
         # inheritance
         if entity.specializes:
-            self.w(u'<div>%s' % _('Parent class:'))
+            self.w(u'<div><strong>%s</strong>' % _('Parent class:'))
             self.wview('csv', entity.related('specializes', 'subject'))
             self.w(u'</div>')
         if entity.reverse_specializes:
-            self.w(u'<div>%s' % _('Sub-classes:'))
+            self.w(u'<div><strong>%s</strong>' % _('Sub-classes:'))
             self.wview('csv', entity.related('specializes', 'object'))
             self.w(u'</div>')
         # entity schema image
@@ -566,8 +566,14 @@
 
     def edge_properties(self, rschema, subjnode, objnode):
         """return default DOT drawing options for a relation schema"""
+        # Inheritance relation (i.e 'specializes').
+        if rschema is None:
+            kwargs = {'label': 'Parent class',
+                      'color' : 'grey',  'style' : 'filled',
+                      'arrowhead': 'empty',
+                      'fontsize': '10px'}
         # symmetric rels are handled differently, let yams decide what's best
-        if rschema.symmetric:
+        elif rschema.symmetric:
             kwargs = {'label': rschema.type,
                       'color': '#887788', 'style': 'dashed',
                       'dir': 'both', 'arrowhead': 'normal', 'arrowtail': 'normal',