# HG changeset patch # User Sylvain Thénault # Date 1246522834 -7200 # Node ID 7e85d0169911aac4ebe42ea336975c3da47f4df1 # Parent 21c9b63a4730c55fa6d5111797665eb7c78f1bdd some enhancements: link to relation/target type, remove to be deprecated meta, one table for subject relations, another for object relations diff -r 21c9b63a4730 -r 7e85d0169911 web/views/schema.py --- a/web/views/schema.py Thu Jul 02 10:19:41 2009 +0200 +++ b/web/views/schema.py Thu Jul 02 10:20:34 2009 +0200 @@ -42,6 +42,7 @@ % (entity.dc_type().capitalize(), html_escape(entity.dc_long_title()))) + # CWEType ###################################################################### class CWETypeOneLineView(baseviews.OneLineView): @@ -93,25 +94,22 @@ {'x': entity.eid}) self.wview('editable-table', rset, 'null', displayfilter=True) self.w(u'

%s

' % _('Relations')) - rset = self.req.execute('Any N,C,F,M,K,D,A ORDERBY N ' - 'WITH N,C,F,M,D,K,A BEING (' - '(Any N,C,F,M,K,D,A ' - 'ORDERBY N WHERE A is CWRelation, ' - 'A description D, A composite K?, ' - 'A relation_type R, R name N, ' - 'A to_entity O, O name F, ' - 'A cardinality C, O meta M, ' - 'A from_entity S, S eid %(x)s)' - ' UNION ' - '(Any N,C,F,M,K,D,A ' - 'ORDERBY N WHERE A is CWRelation, ' - 'A description D, A composite K?, ' - 'A relation_type R, R name N, ' - 'A from_entity S, S name F, ' - 'A cardinality C, S meta M, ' - 'A to_entity O, O eid %(x)s))' - ,{'x': entity.eid}) - self.wview('editable-table', rset, 'null', displayfilter=True) + rset = self.req.execute( + 'Any R,C,TT,K,D,A,RN,TTN ORDERBY RN ' + 'WHERE A is CWRelation, A description D, A composite K?, ' + 'A relation_type R, R name RN, A to_entity TT, TT name TTN, ' + 'A cardinality C, A from_entity S, S eid %(x)s', + {'x': entity.eid}) + self.wview('editable-table', rset, 'null', displayfilter=True, + displaycols=range(6), mainindex=5) + rset = self.req.execute( + 'Any R,C,TT,K,D,A,RN,TTN ORDERBY RN ' + 'WHERE A is CWRelation, A description D, A composite K?, ' + 'A relation_type R, R name RN, A from_entity TT, TT name TTN, ' + 'A cardinality C, A to_entity O, O eid %(x)s', + {'x': entity.eid}) + self.wview('editable-table', rset, 'null', displayfilter=True, + displaycols=range(6), mainindex=5) class CWETypeSImageView(EntityView):