web/views/workflow.py
changeset 2487 c4c13cf8cd7b
parent 2440 8e6b83e3b6b5
child 2506 965d5e1557ed
equal deleted inserted replaced
2486:00f3b102b2c5 2487:c4c13cf8cd7b
    64         self.w(u'<p>%s</p>\n' % msg)
    64         self.w(u'<p>%s</p>\n' % msg)
    65         self.w(form.form_render(state=dest.eid, trcomment=u''))
    65         self.w(form.form_render(state=dest.eid, trcomment=u''))
    66 
    66 
    67     def redirectpath(self, entity):
    67     def redirectpath(self, entity):
    68         return entity.rest_path()
    68         return entity.rest_path()
       
    69 
    69 
    70 
    70 class WFHistoryView(EntityView):
    71 class WFHistoryView(EntityView):
    71     id = 'wfhistory'
    72     id = 'wfhistory'
    72     __select__ = relation_possible('wf_info_for', role='object')
    73     __select__ = relation_possible('wf_info_for', role='object')
    73     title = _('Workflow history')
    74     title = _('Workflow history')
    96             return
    97             return
    97         if rset:
    98         if rset:
    98             self.wview('table', rset, title=_(self.title), displayactions=False,
    99             self.wview('table', rset, title=_(self.title), displayactions=False,
    99                        displaycols=displaycols, headers=headers)
   100                        displaycols=displaycols, headers=headers)
   100 
   101 
       
   102 
   101 class WFHistoryVComponent(component.EntityVComponent):
   103 class WFHistoryVComponent(component.EntityVComponent):
   102     """display the workflow history for entities supporting it"""
   104     """display the workflow history for entities supporting it"""
   103     id = 'wfhistory'
   105     id = 'wfhistory'
   104     __select__ = WFHistoryView.__select__ & component.EntityVComponent.__select__
   106     __select__ = WFHistoryView.__select__ & component.EntityVComponent.__select__
   105     context = 'navcontentbottom'
   107     context = 'navcontentbottom'