documentWorkflow.smarty
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<h1>Document Workflow</h1>
{if !$oWorkflow}
<h2>No workflow</h2>
<p>Document has no assigned workflow.</p>
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="startWorkflow" />
<input type="hidden" name="fDocumentId" value="{$oDocument->getId()}" />
{entity_select entities=$aWorkflows name=fWorkflowId}
<input type="submit" name="submit" value="Start Workflow" />
</form>
{else}
<h2>Current workflow settings</h2>
<table class="prettysw" cellpadding="0" cellspacing="0">
<tr><th>Workflow</th><td>{$oWorkflow->getName()}</td></tr>
<tr><th>State</th><td>{$oState->getName()}</td></tr>
</table>
<h2>Transition to another workflow state</h2>
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="performTransition" />
<input type="hidden" name="fDocumentId" value="{$oDocument->getId()}" />
<table class="prettysw" cellpadding="0" cellspacing="0">
<tr><th>Transition to perform</th><td>
{entity_radios entities=$aTransitions name=fTransitionId assign=aRadio method=showDescription}
{foreach from=$aRadio item=sRadio}
{$sRadio}<br />
{/foreach}
</td></tr>
<tr><th>Reason for transition</th><td><input type="textbox" name="fComments"
/></td></tr>
</table>
<input type="submit" name="submit" value="Perform Transition" />
</form>
{/if}