manageTransitions.smarty 2.11 KB
<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>
      &nbsp;
    </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}&mdash;{/if}
      </td>
    {/foreach}
  </tr>
  {/foreach}
</tbody>
<table>

<div class="form_actions">
  <input type="submit" value="{i18n}Assign Transition Availability{/i18n}" />
</div>

</form>