log->debug("displayFolderPathLink: slinkPage=$sLinkPage"); // display a separate link to each folder in the path for ($i=0; $i 0) ? $sPathLinks . " > " . $sLink : $sLink; } return $sPathLinks; } class DocumentWorkflowDispatcher extends KTStandardDispatcher { var $bAutomaticTransaction = true; function do_main() { $oTemplate =& $this->oValidator->validateTemplate("ktcore/workflow/documentWorkflow"); $oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentID']); $oWorkflow = KTWorkflowUtil::getWorkflowForDocument($oDocument); $oWorkflowState = KTWorkflowUtil::getWorkflowStateForDocument($oDocument); $aTransitions = KTWorkflowUtil::getTransitionsForDocumentUser($oDocument, $oUser); $aWorkflows = KTWorkflow::getList(); $aTemplateData = array( 'oDocument' => $oDocument, 'oWorkflow' => $oWorkflow, 'oState' => $oWorkflowState, 'aTransitions' => $aTransitions, 'aWorkflows' => $aWorkflows, ); return $oTemplate->render($aTemplateData); } function do_startWorkflow() { $oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentId']); $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']); $res = KTWorkflowUtil::startWorkflowOnDocument($oWorkflow, $oDocument); $this->successRedirectToMain('Workflow started', array('fDocumentID' => $oDocument->getID())); exit(0); } } $oDispatcher = new DocumentWorkflowDispatcher; $oDispatcher->dispatch(); ?>