documentWorkflow.smarty
1.42 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
44
45
46
47
48
49
50
<h2>Document Workflow</h2>
<p class="descriptiveText">
Workflow is a description of a document's lifecycle. It is made up of
workflow states, which describe where in the lifecycle the document is,
and workflow transitions, which describe the next steps within the
lifecycle of the document.
</p>
{if !$oWorkflow}
<h3>No workflow</h3>
<p>Document has no assigned workflow.</p>
<form action="{$smarty.server.PHP_SELF}" method="POST">
<fieldset><legend>Start workflow on document</legend>
<input type="hidden" name="action" value="startWorkflow" />
<input type="hidden" name="fDocumentId" value="{$oDocument->getId()}" />
{entity_select entities=$aWorkflows name=fWorkflowId}
<div class="form_actions">
<input type="submit" name="submit" value="Start Workflow" />
</div>
</fieldset>
</form>
{else}
<h3>Current workflow settings</h3>
<dl class="metadata">
<dt>Workflow</dt><dd>{$oWorkflow->getName()}</dd>
<dt>State</dt><dd>{$oState->getName()}</dd>
</dl>
{if $aTransitions}
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="performTransition" />
<input type="hidden" name="fDocumentId" value="{$oDocument->getId()}" />
<fieldset><legend>Transition to another workflow state</legend>
{foreach from=$transition_fields item=oWidget }
{$oWidget->render()}
{/foreach}
<div class="form_actions">
<input type="submit" name="submit" value="Perform Transition" />
</div>
</fieldset>
</form>
{/if}
{/if}