--- 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),
])
--- 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 #################################################