# HG changeset patch # User Damien Garaud # Date 1328887406 -3600 # Node ID 076c80543fcd0ab7bb24c0720f361e11df3486b2 # Parent a045d3821990496465836e52e7a2215558c34f3c [schema view] properly display inheritance (closes #870073). diff -r a045d3821990 -r 076c80543fcd web/views/schema.py --- 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'
%s' % _('Parent class:')) + self.w(u'
%s' % _('Parent class:')) self.wview('csv', entity.related('specializes', 'subject')) self.w(u'
') if entity.reverse_specializes: - self.w(u'
%s' % _('Sub-classes:')) + self.w(u'
%s' % _('Sub-classes:')) self.wview('csv', entity.related('specializes', 'object')) self.w(u'
') # 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',