mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
check if current workflow state != null
This commit is contained in:
parent
0ba0724e82
commit
822aef2e53
|
@ -49,26 +49,29 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Theme_Style {
|
|||
$wkflog = $latestContent->getWorkflowLog();
|
||||
$workflow = $latestContent->getWorkflow();
|
||||
|
||||
$msg = "The document is currently in state: ".$currentstate->getName()."<br />";
|
||||
if($wkflog) {
|
||||
foreach($wkflog as $entry) {
|
||||
if($entry->getTransition()->getNextState()->getID() == $currentstate->getID()) {
|
||||
$enterdate = $entry->getDate();
|
||||
$enterts = makeTsFromLongDate($enterdate);
|
||||
if($currentstate) {
|
||||
$msg = "The document is currently in state: ".$currentstate->getName()."<br />";
|
||||
if($wkflog) {
|
||||
foreach($wkflog as $entry) {
|
||||
if($entry->getTransition()->getNextState()->getID() == $currentstate->getID()) {
|
||||
$enterdate = $entry->getDate();
|
||||
$enterts = makeTsFromLongDate($enterdate);
|
||||
}
|
||||
}
|
||||
$msg .= "The state was entered at ".$enterdate." which was ";
|
||||
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
|
||||
}
|
||||
$msg .= "The state was entered at ".$enterdate." which was ";
|
||||
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
|
||||
$msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec.";
|
||||
} else {
|
||||
$msg = getMLText('workflow_in_unknown_state');
|
||||
}
|
||||
$msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec.";
|
||||
$this->infoMsg($msg);
|
||||
|
||||
$this->contentContainerStart();
|
||||
// Display the Workflow form.
|
||||
$this->rowStart();
|
||||
$this->columnStart(4);
|
||||
?>
|
||||
<p><?php printMLText("rewind_workflow_warning"); ?></p>
|
||||
<?php $this->warningMsg(getMLText("rewind_workflow_warning")); ?>
|
||||
<form method="post" action="../op/op.RewindWorkflow.php" name="form1">
|
||||
<?php echo createHiddenFieldWithKey('rewindworkflow'); ?>
|
||||
<input type='hidden' name='documentid' value='<?php echo $document->getId(); ?>'/>
|
||||
|
@ -85,7 +88,6 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Theme_Style {
|
|||
<?php
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
$this->contentContainerEnd();
|
||||
|
||||
if($wkflog) {
|
||||
echo "<table class=\"table table-condensed table-sm\">";
|
||||
|
|
Loading…
Reference in New Issue
Block a user