web/views/schema.py
branchstable
changeset 8213 076c80543fcd
parent 7845 2172978be237
child 8216 99ff746e8de8
--- a/web/views/schema.py	Fri Feb 10 16:22:38 2012 +0100
+++ b/web/views/schema.py	Fri Feb 10 16:23:26 2012 +0100
@@ -204,11 +204,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
@@ -565,8 +565,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',