{$context->oPage->requireCSSResource('resources/css/workflow-admin.css')}

{i18n}Manage Actions{/i18n}

{i18n}An important part of workflow is controlling which actions are available to users at various stages. For example, it may be necessary to prevent the "Edit Metadata" action from being used when a document is "published". Doing this is a two step process: first, you need to specify that "Edit Metadata" is an action you wish to control within this workflow; second, you need to specify that the action is not to be made available when documents are in the "published" state.{/i18n}

{i18n}Specify Controlled Actions{/i18n}

{i18n}Select the actions you want this workflow to control from the list below. Actions you do not specify will be available no matter what the state of the document.{/i18n}

{entity_checkboxes name="fActions" entities="$aActions" idmethod="getName" method="getDisplayName" assign="aCheckboxes" selected="$aActionsSelected" separator="
"} {foreach from=$aCheckboxes item=sCheckbox} {$sCheckbox} {/foreach}

{i18n}Assign Actions to States{/i18n}

{i18n}The table below lists the actions you have specified as controlled by this workflow, and all the states within the workflow. From here you can assign those actions to the various states in this workflow. Checked items are available to users whose permissions would normally allow them when the document is in that state. Unchecked items are not available to any users.{/i18n}

{if (empty($aActionsSelected))}
{i18n}No actions are controlled by this workflow. All actions will be available at all states.{/i18n}
{else}
{foreach from=$aActionsSelected item=sAction} {/foreach} {foreach item=oState from=$workflow_info.states} {foreach item=sAction from=$aActionsSelected} {/foreach} {/foreach}
 {$workflow_info.actions_by_name.$sAction->getDisplayName()}
{$oState->getName()}actionAvailable($sAction, $oState))}checked="true"{/if}/>
{/if}