web/views/workflow.py
changeset 2440 8e6b83e3b6b5
parent 2438 576f4d51f826
child 2487 c4c13cf8cd7b
--- 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 #################################################