manageStates.smarty 2.13 KB
{$context->oPage->requireCSSResource('resources/css/workflow-admin.css')}
<h2>{i18n}Manage States{/i18n}</h2>

<p class="descriptiveText">As documents move through their lifecycle, they
are placed in certain <strong>states</strong>.  For example, an invoice
which has been mailed might be in the "Pending" <strong>state</strong> after
the "sent" <strong>transition</strong> has been performed by a user.</p>

<fieldset>
<legend>Create a new state</legend>
<p class="descriptiveText">A critical part of workflow is the creation of
various different states for documents.</p>
<a href="{$smarty.server.PHP_SELF}?action=createState&fWorkflowId={$oWorkflow->getId()}"
   class="ktAction ktInline ktAdd">{i18n}Create a new state{/i18n}</a>
<a href="{$smarty.server.PHP_SELF}?action=createState&fWorkflowId={$oWorkflow->getId()}">{i18n}Create a new state{/i18n}</a>

</fieldset>


{if (empty($workflow_info.states))}
<div class="ktInfo"><p>This workflow does not define any states.</p></div>
{else}
<ul id="workflow-states-list">
{foreach item=oState from=$workflow_info.states}
    <li><span class="workflow_element">State:</span> <a href="{$smarty.server.PHP_SELF}?action=editState&fStateId={$oState->getId()}&fWorkflowId={$oWorkflow->getId()}" class="workflow_label">{$oState->getName()}</a>
    <ul>
        <li><a href="{$smarty.server.PHP_SELF}?action=editState&fStateId={$oState->getId()}&fWorkflowId={$oWorkflow->getId()}">{i18n}Notified groups & roles:{/i18n}</a>
        {$context->getNotificationStringForState($oState)}
        </li>
        <li><a href="{$smarty.server.PHP_SELF}?action=editState&fStateId={$oState->getId()}&fWorkflowId={$oWorkflow->getId()}">{i18n}Controlled Actions available: {/i18n}</a>
        {$context->getActionStringForState($oState)}
        </li>
      
        <li><a href="{$smarty.server.PHP_SELF}?action=editTransitions&fWorkflowId={$oWorkflow->getId()}">{i18n}Transitions available: {/i18n}</a>
        {$context->getTransitionFromStringForState($oState)}
        </li>
      
        <li>{i18n}Transitions to this state: {/i18n}
        {$context->getTransitionToStringForState($oState)}
        </li>
    </ul>
    </li>
{/foreach}
</ul>
{/if}