* @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ /** * Include parent class */ //require_once("class.Bootstrap.php"); /** * Class which outputs the html page for WorkspaceActionsMgr view * * @category DMS * @package SeedDMS * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann * @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ class SeedDMS_View_WorkflowActionsMgr extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); parent::jsTranslations(array('js_form_error', 'js_form_errors')); ?> function runValidation() { $("#form1").validate({ rules: { name: { required: true }, }, messages: { name: "", } }); } $(document).ready( function() { $( "#selector" ).change(function() { $('div.ajax').trigger('update', {workflowactionid: $(this).val()}); }); }); params['dms']; $user = $this->params['user']; $selworkflowaction = $this->params['selworkflowaction']; if($selworkflowaction) { if($selworkflowaction->isUsed()) { $transitions = $selworkflowaction->getTransitions(); if($transitions) { echo ""; echo "\n"; echo ""; foreach($transitions as $transition) { $state = $transition->getState(); $nextstate = $transition->getNextState(); $docstatus = $nextstate->getDocumentStatus(); $workflow = $transition->getWorkflow(); echo ""; echo ""; } echo ""; echo "
".getMLText('workflow')."".getMLText('previous_state')."".getMLText('next_state')."
"; echo htmlspecialchars($workflow->getName()); echo ""; echo ' '.htmlspecialchars($state->getName()); echo ""; echo ' '.htmlspecialchars($nextstate->getName()); echo "
"; } } } } /* }}} */ function actionmenu() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $selworkflowaction = $this->params['selworkflowaction']; if($selworkflowaction && !$selworkflowaction->isUsed()) { $button = array( 'label'=>getMLText('action'), 'menuitems'=>array( ) ); $button['menuitems'][] = array('label'=>' '.getMLText("rm_workflow_action"), 'link'=>'../op/op.RemoveWorkflowAction.php?workflowactionid='.$selworkflowaction->getID().'&formtoken='.createFormKey('removeworkflowaction')); self::showButtonwithMenu($button); } } /* }}} */ function showWorkflowActionForm($action) { /* {{{ */ if($action) { if($action->isUsed()) { $this->infoMsg(getMLText('workflow_action_in_use')); } } ?>
contentContainerStart(); $this->formField( getMLText("workflow_action_name"), array( 'element'=>'input', 'type'=>'text', 'id'=>'name', 'name'=>'name', 'value'=>($action ? htmlspecialchars($action->getName()) : '') ) ); $this->contentContainerEnd(); $this->formSubmit(' '.getMLText("save")); ?>
params['selworkflowaction']; $this->showWorkflowActionForm($selworkflowaction); } /* }}} */ function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $selworkflowaction = $this->params['selworkflowaction']; $workflowactions = $dms->getAllWorkflowActions(); $this->htmlAddHeader(''."\n", 'js'); $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->contentHeading(getMLText("workflow_actions_management")); $this->rowStart(); $this->columnStart(4); ?>
getID(), htmlspecialchars($currWorkflowAction->getName()), $selworkflowaction && $currWorkflowAction->getID()==$selworkflowaction->getID()); } $this->formField( null, //getMLText("selection"), array( 'element'=>'select', 'id'=>'selector', 'class'=>'chzn-select', 'options'=>$options ) ); ?>
getID()."\"" : "") ?>>
getID()."\"" : "") ?>>
columnEnd(); $this->columnStart(8); ?>
getID()."\"" : "") ?>>
columnEnd(); $this->rowEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ } ?>