Added the concept of 'fake' workflow transitions: when a user can't trigger a transition but needs an explanation about why he can't, a fake button is shown, with a explanation.

This commit is contained in:
Gaetan Delannay 2011-02-01 11:09:54 +01:00
parent b48525c5bb
commit 77112c45be
11 changed files with 141 additions and 34 deletions

View file

@ -222,11 +222,11 @@ class AbstractWrapper:
will be no trace from this transition triggering in the workflow
history.'''
wfTool = self.o.portal_workflow
availableTransitions = [t['id'] for t in \
wfTool.getTransitionsFor(self.o)]
availableTransitions = [t['id'] for t in self.o.getAppyTransitions(\
includeFake=False, includeNotShowable=True)]
transitionName = transition
if not transitionName in availableTransitions:
# Maybe is is a compound Appy transition. Try to find the
# Maybe is it a compound Appy transition. Try to find the
# corresponding DC transition.
state = self.state
transitionPrefix = transition + state[0].upper() + state[1:] + 'To'