documentWorkflow.smarty
2.75 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<h2><img src="{if $config->get("ui/morphEnabled") == '1'}{$rootUrl}/skins/kts_{$config->get("ui/morphTo")}/title_bullet.png{else}{$rootUrl}/resources/graphics/title_bullet.png{/if}"/>{i18n}Workflow for{/i18n}:<br />{$oDocument->getName()}</h2>
<p class="descriptiveText">
{i18n}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.{/i18n}
</p>
{if !$oWorkflow}
<h3>{i18n}No workflow{/i18n}</h3>
<p>{i18n}Document has no assigned workflow.{/i18n}</p>
{else}
<h3>{i18n}Current workflow settings{/i18n}</h3>
<dl class="metadata">
<dt>{i18n}Workflow{/i18n}</dt><dd>{$oWorkflow->getName()}</dd>
<dt>{i18n}State{/i18n}</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>{i18n}Transition to another workflow state{/i18n}</legend>
{foreach from=$transition_fields item=oWidget }
{$oWidget->render()}
{/foreach}
<div class="form_actions">
<input type="submit" name="submit" value="{i18n}Perform Transition{/i18n}" />
</div>
</fieldset>
</form>
{/if}
{/if}
<fieldset>
{if !$oWorkflow}
<legend>{i18n}Start workflow on document{/i18n}</legend>
{assign var=none value=""}
{else}
<legend>{i18n}Change workflow on document{/i18n}</legend>
{assign var=none value=true}
{/if}
{if $aWorkflows}
{if $bHasPerm}
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="startWorkflow" />
<input type="hidden" name="fDocumentId" value="{$oDocument->getId()}" />
<p class="descriptiveText">{i18n}Please note that changing the workflow on a document will start the workflow
at the beginning of the new workflow. <strong>This is true even if the new workflow is identical to the old one.</strong>{/i18n}</p>
{entity_select entities=$aWorkflows name=fWorkflowId none=$none}
<div class="form_actions">
{if !$oWorkflow}
<input type="submit" name="submit" value="{i18n}Start Workflow{/i18n}" />
{else}
<input type="submit" name="submit" value="{i18n}Change Workflow{/i18n}" />
{/if}
</div>
</form>
{else}
<div class="ktInfoMessage">
<span>{i18n}You do not have permission to change the workflow that is assigned to this document.{/i18n}</span>
</div>
{/if}
{else}
<h3>{i18n}No defined workflows{/i18n}</h3>
<div class="ktInfoMessage">
<span>{i18n}There are no defined workflows which can be started on this
document. An administrator can create workflows to map the lifecycle of
a document. Contact your administrator to discuss
workflows.{/i18n}</span>
</div>
{/if}
</fieldset>