diff -r 6abd6e3599f4 -r 34e669b6fd95 web/views/schema.py
--- a/web/views/schema.py Tue Apr 13 12:19:24 2010 +0200
+++ b/web/views/schema.py Tue Apr 13 13:21:10 2010 +0200
@@ -313,18 +313,25 @@
entity = self.cw_rset.get_entity(row, col)
if entity.default_workflow:
wf = entity.default_workflow[0]
- self.w(u'
%s (%s)
' % (wf.name, self._cw._('default')))
- self.wf_image(wf)
+ if len(entity.reverse_workflow_of) > 1:
+ self.w(u'%s (%s)
'
+ % (wf.name, self._cw._('default_workflow')))
+ self.display_workflow(wf)
+ defaultwfeid = wf.eid
+ else:
+ self.w(u'%s
'
+ % self._cw._('There is no default workflow'))
+ defaultwfeid = None
for altwf in entity.reverse_workflow_of:
- if altwf.eid == wf.eid:
+ if altwf.eid == defaultwfeid:
continue
self.w(u'%s
' % altwf.name)
- self.wf_image(altwf)
+ self.display_workflow(altwf)
- def wf_image(self, wf):
- self.w(u'' % (
- xml_escape(wf.absolute_url(vid='wfgraph')),
- xml_escape(self._cw._('graphical representation of %s') % wf.name)))
+ def display_workflow(self, wf):
+ self.w(wf.view('wfgraph'))
+ self.w('%s' % (
+ wf.absolute_url(), self._cw._('more info about this workflow')))
# CWRType ######################################################################