Commit cb523b782f3a741704866da7f0b3f34419af2dfd
1 parent
48882978
Workflow management templates
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3721 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
4 changed files
with
142 additions
and
0 deletions
templates/ktcore/workflow/editState.smarty
0 → 100644
| 1 | +<h1>State: {$oState->getName()|escape}</h1> | |
| 2 | + | |
| 3 | +<h2>Edit state properties</h2> | |
| 4 | + | |
| 5 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | |
| 6 | +<input type="hidden" name="action" value="saveState" /> | |
| 7 | +<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" /> | |
| 8 | +<input type="hidden" name="fStateId" value="{$oState->getId()}" /> | |
| 9 | +<input type="textbox" name="fName" value="{$oState->getName()|escape}" /> | |
| 10 | +<input type="submit" name="submit" value="Save" /> | |
| 11 | +</form> | |
| 12 | + | |
| 13 | +{if $aTransitionsTo} | |
| 14 | +<h2>Transitions to this state</h2> | |
| 15 | + | |
| 16 | +<ul> | |
| 17 | +{foreach from=$aTransitionsTo item=oTransition} | |
| 18 | + <li><a | |
| 19 | +href="?action=editTransition&fWorkflowId={$oWorkflow->getId()}&fTransitionId={$oTransition->getId()}" | |
| 20 | +title="Transition | |
| 21 | +{$oTransition->getId()}">{$oTransition->getName()|escape}</a></li> | |
| 22 | +{/foreach} | |
| 23 | +</ul> | |
| 24 | + | |
| 25 | +{/if} | |
| 26 | + | |
| 27 | +<h2>Transitions</h2> | |
| 28 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | |
| 29 | +<input type="hidden" name="action" value="saveTransitions" /> | |
| 30 | +<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" /> | |
| 31 | +<input type="hidden" name="fStateId" value="{$oState->getId()}" /> | |
| 32 | +{entity_checkboxes entities=$aTransitions name="fTransitionIds" multiple="true" selected=$aTransitionsSelected} | |
| 33 | +<input type="submit" name="submit" value="Save" /> | |
| 34 | +</form> | ... | ... |
templates/ktcore/workflow/editTransition.smarty
0 → 100644
| 1 | +<h1>Transition: {$oTransition->getName()|escape}</h1> | |
| 2 | + | |
| 3 | +<h2>Edit transition properties</h2> | |
| 4 | + | |
| 5 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | |
| 6 | +<input type="hidden" name="action" value="saveTransition" /> | |
| 7 | +<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" /> | |
| 8 | +<input type="hidden" name="fTransitionId" value="{$oTransition->getId()}" /> | |
| 9 | +<table class="prettysw" cellpadding="0" cellspacing="0"> | |
| 10 | +<tr><th>Name</th><td><input type="textbox" name="fName" value="{$oTransition->getName()|escape}" /></td></tr> | |
| 11 | +<tr> | |
| 12 | + <th>Target State</th> | |
| 13 | + <td>{entity_select entities=$aStates selected=$oTransition->getTargetStateId() name="fTargetStateId"}</td> | |
| 14 | +</tr> | |
| 15 | +<tr> | |
| 16 | + <th>Guard Permission</th> | |
| 17 | + <td>{entity_select entities=$aPermissions selected=$oTransition->getGuardPermissionId() name="fPermissionId"}</td> | |
| 18 | +</tr> | |
| 19 | + | |
| 20 | +</table> | |
| 21 | +<input type="submit" name="submit" value="Save" /> | |
| 22 | +</form> | |
| 23 | + | ... | ... |
templates/ktcore/workflow/editWorkflow.smarty
0 → 100644
| 1 | +<h1>Workflow: {$oWorkflow->getName()|escape}</h1> | |
| 2 | + | |
| 3 | +<h2>Edit workflow properties</h2> | |
| 4 | + | |
| 5 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | |
| 6 | +<input type="hidden" name="action" value="saveWorkflow" /> | |
| 7 | +<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" /> | |
| 8 | +<input type="textbox" name="fName" value="{$oWorkflow->getName()|escape}" /> | |
| 9 | +<input type="submit" name="submit" value="Save" /> | |
| 10 | +</form> | |
| 11 | + | |
| 12 | +<h2>States</h2> | |
| 13 | + | |
| 14 | +{if $aStates} | |
| 15 | +<h3>Existing states</h3> | |
| 16 | + | |
| 17 | +<ul> | |
| 18 | +{foreach from=$aStates item=oState} | |
| 19 | + <li><a | |
| 20 | +href="?action=editState&fWorkflowId={$oWorkflow->getId()}&fStateId={$oState->getId()}" | |
| 21 | +title="State {$oState->getId()}">{$oState->getName()|escape}</a></li> | |
| 22 | +{/foreach} | |
| 23 | +</ul> | |
| 24 | +{/if} | |
| 25 | + | |
| 26 | +<h3>Create a new state</h3> | |
| 27 | + | |
| 28 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | |
| 29 | +<input type="hidden" name="action" value="newState" /> | |
| 30 | +<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" /> | |
| 31 | +<input type="textbox" name="fName" /> | |
| 32 | +<input type="submit" name="submit" value="Create state" /> | |
| 33 | +</form> | |
| 34 | + | |
| 35 | +<h2>Transitions</h2> | |
| 36 | + | |
| 37 | +{if $aTransitions} | |
| 38 | +<h3>Existing transitions</h3> | |
| 39 | + | |
| 40 | +<ul> | |
| 41 | +{foreach from=$aTransitions item=oTransition} | |
| 42 | + <li><a | |
| 43 | +href="?action=editTransition&fWorkflowId={$oWorkflow->getId()}&fTransitionId={$oTransition->getId()}" | |
| 44 | +title="Transition {$oTransition->getId()}">{$oTransition->getName()|escape}</a></li> | |
| 45 | +{/foreach} | |
| 46 | +</ul> | |
| 47 | +{/if} | |
| 48 | + | |
| 49 | +<h3>Create a new transition</h3> | |
| 50 | + | |
| 51 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | |
| 52 | +<input type="hidden" name="action" value="newTransition" /> | |
| 53 | +<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" /> | |
| 54 | +<table class="prettysw" cellpadding="0" cellspacing="0"> | |
| 55 | +<tr><th>Name</th><td><input type="textbox" name="fName" /></td></tr> | |
| 56 | +<tr> | |
| 57 | + <th>Target State</th> | |
| 58 | + <td>{entity_select entities=$aStates name="fTargetStateId"}</td> | |
| 59 | +</tr> | |
| 60 | +<tr> | |
| 61 | + <th>Guard permission</th> | |
| 62 | + <td>{entity_select entities=$aPermissions name="fPermissionId"}</td> | |
| 63 | +</tr> | |
| 64 | +</table> | |
| 65 | +<input type="submit" name="submit" value="Create transition" /> | |
| 66 | +</form> | ... | ... |
templates/ktcore/workflow/listWorkflows.smarty
0 → 100644
| 1 | +<h1>Workflow</h1> | |
| 2 | + | |
| 3 | +{if $aWorkflow} | |
| 4 | +<h2>Existing workflows</h2> | |
| 5 | + | |
| 6 | +<ul> | |
| 7 | +{foreach from=$aWorkflow item=oWorkflow} | |
| 8 | + <li><a href="?action=editWorkflow&fWorkflowId={$oWorkflow->getId()}" title="Workflow: {$oWorkflow->getId()}">{$oWorkflow->getName()}</a></li> | |
| 9 | +{/foreach} | |
| 10 | +</ul> | |
| 11 | +{/if} | |
| 12 | + | |
| 13 | +<h2>Create a new workflow</h2> | |
| 14 | + | |
| 15 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | |
| 16 | +<input type="hidden" name="action" value="newWorkflow" /> | |
| 17 | +<input type="textbox" name="fName" /> | |
| 18 | +<input type="submit" name="submit" value="Create" /> | |
| 19 | +</form> | ... | ... |