manageTransitions.smarty
2.11 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
<h2>{i18n}Manage Transitions{/i18n}</h2>
<p class="descriptiveText">{i18n}Transitions are what drive the workflow of documents.
Each step that needs to be followed in the document's lifecycle could
map to a transition, and can be allowed or denied by a combination
of roles, permissions and groups.{/i18n}</p>
<fieldset>
<legend>{i18n}Create a new transition{/i18n}</legend>
<a href="{$smarty.server.PHP_SELF}?action=createTransition&fWorkflowId={$oWorkflow->getId()}"
class="ktAction ktAdd ktInline">{i18n}Create a new transition{/i18n}</a>
<a href="{$smarty.server.PHP_SELF}?action=createTransition&fWorkflowId={$oWorkflow->getId()}"
>{i18n}Create a new transition{/i18n}</a>
</fieldset>
<h3>{i18n}Transition Availability{/i18n}</h3>
<p class="descriptiveText">Click on any transition below to edit it directly,
or use the checkboxes to assign which states the transition is available from.</p>
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="setTransitionAvailability">
<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
<table class="kt_collection" style="width: auto">
<thead>
<tr>
<th>
</th>
{foreach item=oState from=$workflow_info.states}
<th>
{$oState->getName()}
</th>
{/foreach}
</tr>
</thead>
<tbody>
{foreach item=oTransition from=$workflow_info.transitions}
<tr class='{cycle values="odd,even"}'>
<td>
<a href="{$smarty.server.PHP_SELF}?action=editTransition&fWorkflowId={$oWorkflow->getId()}&fTransitionId={$oTransition->getId()}">{$oTransition->getName()}</a>
</td>
{foreach item=oState from=$workflow_info.states}
<td>
{if ($oState->getId() != $oTransition->getTargetStateId())}
<input type="checkbox" name="fTransitionAvailability[{$oState->getId()}][{$oTransition->getId()}]" {if ($context->transitionAvailable($oTransition, $oState))}checked="true"{/if}>
{else}—{/if}
</td>
{/foreach}
</tr>
{/foreach}
</tbody>
<table>
<div class="form_actions">
<input type="submit" value="{i18n}Assign Transition Availability{/i18n}" />
</div>
</form>