# HG changeset patch # User Nicolas Chauvat # Date 1248351154 -7200 # Node ID 8e6b83e3b6b56a0f47ddb7f98b53a36ca2c1149a # Parent 77d8dd77acb3c54728a7d6a6f32f19c2bb452d8e #343227: display the workflow history of any entity diff -r 77d8dd77acb3 -r 8e6b83e3b6b5 web/test/unittest_viewselector.py --- a/web/test/unittest_viewselector.py Thu Jul 23 14:12:18 2009 +0200 +++ b/web/test/unittest_viewselector.py Thu Jul 23 14:12:34 2009 +0200 @@ -174,6 +174,7 @@ ('text', baseviews.TextView), ('treeview', treeview.TreeView), ('vcard', vcard.VCardCWUserView), + ('wfhistory', workflow.WFHistoryView), ('xbel', xbel.XbelView), ('xml', xmlrss.XMLView), ]) diff -r 77d8dd77acb3 -r 8e6b83e3b6b5 web/views/workflow.py --- a/web/views/workflow.py Thu Jul 23 14:12:18 2009 +0200 +++ b/web/views/workflow.py Thu Jul 23 14:12:34 2009 +0200 @@ -67,13 +67,9 @@ def redirectpath(self, entity): return entity.rest_path() - -class WFHistoryVComponent(component.EntityVComponent): - """display the workflow history for entities supporting it""" +class WFHistoryView(EntityView): id = 'wfhistory' - __select__ = (component.EntityVComponent.__select__ - & relation_possible('wf_info_for', role='object')) - context = 'navcontentbottom' + __select__ = relation_possible('wf_info_for', role='object') title = _('Workflow history') def cell_call(self, row, col, view=None): @@ -102,6 +98,15 @@ self.wview('table', rset, title=_(self.title), displayactions=False, displaycols=displaycols, headers=headers) +class WFHistoryVComponent(component.EntityVComponent): + """display the workflow history for entities supporting it""" + id = 'wfhistory' + __select__ = WFHistoryView.__select__ & component.EntityVComponent.__select__ + context = 'navcontentbottom' + title = _('Workflow history') + + def cell_call(self, row, col, view=None): + self.wview('wfhistory', self.rset, row=row, col=col, view=view) # workflow entity types views #################################################