{{#extend "layout"}} {{#content "breadcrumbs"}}{{/content}} {{#content "body"}}

Workflow

Display the workflow of validation based on statuses and steps

{{#each @root.roles}}
{{this.name}}
{{&setVariable "previousWorkflow" 'draft'}} {{#each @root.workflowUrl}}
{{#ifCond @key 'draft'}} {{else}} {{#isAuthorized (concat '/abe/operations/reject/' @key) ../workflow}} {{else}} {{/isAuthorized}} {{/ifCond}}
{{@key}} :
{{#each this}} {{#isAuthorized this.url ../../workflow}}
{{this.action}} {{#ifCond this.action "edit"}} in {{this.workflow}}{{/ifCond}} {{#ifCond this.action "reject"}} to {{this.previous}} status{{/ifCond}} {{#ifCond this.action "submit"}} to {{next}} status{{/ifCond}}
{{else}}
{{this.action}} {{#ifCond this.action "edit"}} in {{this.workflow}}{{/ifCond}} {{#ifCond this.action "reject"}} to {{this.previous}} status{{/ifCond}} {{#ifCond this.action "submit"}} to {{next}} status{{/ifCond}}
{{/isAuthorized}} {{/each}} {{#ifCond @key 'publish'}} {{#isAuthorized '/abe/operations/unpublish' ../workflow}}
unpublish
{{else}}
unpublish
{{/isAuthorized}} {{else}} {{#isAuthorized (concat '/abe/operations/submit/' @key) ../workflow}} {{else}} {{/isAuthorized}} {{/ifCond}}
{{&setVariable "previousWorkflow" @key}} {{/each}}
{{/each}}
{{/content}} {{/extend}}