Commit e104f5012f6e9ff20277b93715815a2bad6d6a79
1 parent
05b526b1
Restrict setting of workflows to those with the Core: Manage Workflow
permission. Allow users with this permission to change the workflow on the document. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5274 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
37 additions
and
21 deletions
templates/ktcore/workflow/documentWorkflow.smarty
| @@ -12,27 +12,6 @@ lifecycle of the document.{/i18n} | @@ -12,27 +12,6 @@ lifecycle of the document.{/i18n} | ||
| 12 | 12 | ||
| 13 | <p>{i18n}Document has no assigned workflow.{/i18n}</p> | 13 | <p>{i18n}Document has no assigned workflow.{/i18n}</p> |
| 14 | 14 | ||
| 15 | -{if $aWorkflows} | ||
| 16 | -<form action="{$smarty.server.PHP_SELF}" method="POST"> | ||
| 17 | -<fieldset><legend>{i18n}Start workflow on document{/i18n}</legend> | ||
| 18 | -<input type="hidden" name="action" value="startWorkflow" /> | ||
| 19 | -<input type="hidden" name="fDocumentId" value="{$oDocument->getId()}" /> | ||
| 20 | -{entity_select entities=$aWorkflows name=fWorkflowId} | ||
| 21 | -<div class="form_actions"> | ||
| 22 | -<input type="submit" name="submit" value="{i18n}Start Workflow{/i18n}" /> | ||
| 23 | -</div> | ||
| 24 | -</fieldset> | ||
| 25 | -</form> | ||
| 26 | -{else} | ||
| 27 | -<h3>{i18n}No defined workflows{/i18n}</h3> | ||
| 28 | -<div class="ktInfo"> | ||
| 29 | -<p>{i18n}There are no defined workflows which can be started on this | ||
| 30 | -document. An administrator can create workflows to map the lifecycle of | ||
| 31 | -a document. Contact your administrator to discuss | ||
| 32 | -workflows.{/i18n}</p> | ||
| 33 | -</div> | ||
| 34 | -{/if} | ||
| 35 | - | ||
| 36 | {else} | 15 | {else} |
| 37 | 16 | ||
| 38 | <h3>{i18n}Current workflow settings{/i18n}</h3> | 17 | <h3>{i18n}Current workflow settings{/i18n}</h3> |
| @@ -56,5 +35,42 @@ workflows.{/i18n}</p> | @@ -56,5 +35,42 @@ workflows.{/i18n}</p> | ||
| 56 | </fieldset> | 35 | </fieldset> |
| 57 | </form> | 36 | </form> |
| 58 | {/if} | 37 | {/if} |
| 38 | +{/if} | ||
| 59 | 39 | ||
| 40 | +<fieldset> | ||
| 41 | +{if !$oWorkflow} | ||
| 42 | + <legend>{i18n}Start workflow on document{/i18n}</legend> | ||
| 43 | + {assign var=none value=""} | ||
| 44 | +{else} | ||
| 45 | + <legend>{i18n}Change workflow on document{/i18n}</legend> | ||
| 46 | + {assign var=none value=true} | ||
| 60 | {/if} | 47 | {/if} |
| 48 | +{if $aWorkflows} | ||
| 49 | +{if $bHasPerm} | ||
| 50 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | ||
| 51 | +<input type="hidden" name="action" value="startWorkflow" /> | ||
| 52 | +<input type="hidden" name="fDocumentId" value="{$oDocument->getId()}" /> | ||
| 53 | +{entity_select entities=$aWorkflows name=fWorkflowId none=$none} | ||
| 54 | +<div class="form_actions"> | ||
| 55 | +{if !$oWorkflow} | ||
| 56 | +<input type="submit" name="submit" value="{i18n}Start Workflow{/i18n}" /> | ||
| 57 | +{else} | ||
| 58 | +<input type="submit" name="submit" value="{i18n}Change Workflow{/i18n}" /> | ||
| 59 | +{/if} | ||
| 60 | +</div> | ||
| 61 | +</form> | ||
| 62 | +{else} | ||
| 63 | +<div class="ktInfo"> | ||
| 64 | +<p>{i18n}You do not have permission to change the workflow that is assigned to this document.{/i18n}</p> | ||
| 65 | +</div> | ||
| 66 | +{/if} | ||
| 67 | +{else} | ||
| 68 | +<h3>{i18n}No defined workflows{/i18n}</h3> | ||
| 69 | +<div class="ktInfo"> | ||
| 70 | +<p>{i18n}There are no defined workflows which can be started on this | ||
| 71 | +document. An administrator can create workflows to map the lifecycle of | ||
| 72 | +a document. Contact your administrator to discuss | ||
| 73 | +workflows.{/i18n}</p> | ||
| 74 | +</div> | ||
| 75 | +{/if} | ||
| 76 | +</fieldset> |