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:
parent
b48525c5bb
commit
77112c45be
11 changed files with 141 additions and 34 deletions
BIN
gen/plone25/skin/fakeTransition.gif
Normal file
BIN
gen/plone25/skin/fakeTransition.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 B |
|
@ -528,9 +528,15 @@
|
|||
|
||||
<tal:comment replace="nothing">Buttons for triggering transitions</tal:comment>
|
||||
<td align="right" tal:repeat="transition transitions">
|
||||
<input type="button" class="appyButton"
|
||||
<tal:comment replace="nothing">Real button</tal:comment>
|
||||
<input type="button" class="appyButton" tal:condition="transition/may_trigger"
|
||||
tal:attributes="value python: tool.translate(transition['name']);
|
||||
onClick python: 'triggerTransition(\'%s\',\'%s\')' % (transition['id'],transition['confirm']);"/>
|
||||
<tal:comment replace="nothing">Fake button, explaining why the transition can't be triggered</tal:comment>
|
||||
<div class="appyButton fakeButton" tal:condition="not: transition/may_trigger">
|
||||
<acronym tal:content="python: tool.translate(transition['name'])"
|
||||
tal:attributes="title transition/reason"></acronym>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -34,10 +34,9 @@
|
|||
</tal:publishedObject>
|
||||
|
||||
<tal:comment replace="nothing">Create a section for every root class.</tal:comment>
|
||||
<tal:section repeat="rootClass rootClasses">
|
||||
<tal:section repeat="rootClass python: [rc for rc in rootClasses if tool.userMaySearch(rc)]">
|
||||
<tal:comment replace="nothing">Section title, with action icons</tal:comment>
|
||||
<dt tal:condition="python: tool.userMaySearch(rootClass)"
|
||||
tal:attributes="class python:test((repeat['rootClass'].number()==1) and not contextObj, 'portletAppyItem', 'portletAppyItem portletSep')">
|
||||
<dt tal:attributes="class python:test((repeat['rootClass'].number()==1) and not contextObj, 'portletAppyItem', 'portletAppyItem portletSep')">
|
||||
<table width="100%" cellspacing="0" cellpadding="0" class="no-style-table">
|
||||
<tr>
|
||||
<td>
|
||||
|
|
|
@ -91,12 +91,12 @@
|
|||
|
||||
<tal:comment replace="nothing">Workflow state</tal:comment>
|
||||
<td id="field_workflow_state"
|
||||
tal:condition="python: widget['name'] == 'workflowState'"
|
||||
tal:condition="python: widget['name'] == 'state'"
|
||||
tal:content="python: tool.translate(obj.getWorkflowLabel())">
|
||||
</td>
|
||||
|
||||
<tal:comment replace="nothing">Any other field</tal:comment>
|
||||
<td tal:condition="python: widget['name'] not in ('title', 'workflowState')"
|
||||
<td tal:condition="python: widget['name'] not in ('title', 'state')"
|
||||
tal:attributes="id python:'field_%s' % widget['name']">
|
||||
<tal:field define="contextObj python:obj;
|
||||
layoutType python:'cell';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue