diff --git a/CHANGELOG b/CHANGELOG index 7a96606f6..2f9ceb6b0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -288,6 +288,7 @@ - set max file size for indexing when updating a document - nicer output on info page - do not show filter for categories in database search if they don't exist +- show logs of finished worflows -------------------------------------------------------------------------------- Changes in version 5.1.32 diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index dbdae5c9c..75beff8fa 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -3892,6 +3892,23 @@ $(document).ready(function() { "; + echo "".getMLText('workflow')."".getMLText('date')."".getMLText('action')."".getMLText('user')."".getMLText('comment')."\n"; + echo ""; + foreach($wkflogs as $wkflog) { + echo ""; + echo "".htmlspecialchars($wkflog->getWorkflow()->getName()).""; + echo "".getLongReadableDate($wkflog->getDate()).""; + echo "".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName())).""; + $loguser = $wkflog->getUser(); + echo "".htmlspecialchars($loguser->getFullName()).""; + echo "".htmlspecialchars($wkflog->getComment()).""; + echo ""; + } + print "\n\n"; + } /* }}} */ + /** * Show progressbar * diff --git a/views/bootstrap/class.DocumentVersionDetail.php b/views/bootstrap/class.DocumentVersionDetail.php index a5840e941..b82563983 100644 --- a/views/bootstrap/class.DocumentVersionDetail.php +++ b/views/bootstrap/class.DocumentVersionDetail.php @@ -557,7 +557,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Theme_Style { $this->contentContainerEnd(); } /* }}} */ - if($user->isAdmin() || $user->getId() == $document->getOwner()->getId()) { + if($accessop->check_view_access($this, array('action'=>'statuslog'))) { $this->contentHeading(getMLText("status")); $this->contentContainerStart(); $statuslog = $version->getStatusLog(); @@ -573,26 +573,19 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Theme_Style { } print "\n\n"; $this->contentContainerEnd(); + } - $wkflogs = $version->getWorkflowLog(); - if($wkflogs) { - $this->contentHeading(getMLText("workflow_summary")); - $this->contentContainerStart(); - echo ""; - echo "\n"; - echo ""; - foreach($wkflogs as $wkflog) { - echo ""; - echo ""; - echo ""; - $loguser = $wkflog->getUser(); - echo ""; - echo ""; - echo ""; + if($accessop->check_view_access($this, array('action'=>'finished_workflowlog'))) { + $wkfalllogs = $version->getWorkflowLog(); + if($wkfalllogs) { + $this->contentHeading(getMLText("finished_workflow_log")); + foreach($wkfalllogs as $wkflogs) { + $this->printWorkflowLog($wkflogs); } - print "\n
".getMLText('date')."".getMLText('action')."".getMLText('user')."".getMLText('comment')."
".$wkflog->getDate()."".$wkflog->getTransition()->getAction()->getName()."".$loguser->getFullName()."".$wkflog->getComment()."
\n"; - $this->contentContainerEnd(); } + } + + if($user->isAdmin() || $user->getId() == $document->getOwner()->getId()) { $this->rowStart(); /* Check for an existing review log, even if the workflowmode * is set to traditional_only_approval. There may be old documents diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 5247cccfe..c472b2ac3 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1111,6 +1111,22 @@ $(document).ready( function() { print "\n\n"; $this->contentContainerEnd(); } + + if(!$workflow) { + if($accessobject->check_view_access($this, array('action'=>'finished_workflowlog'))) { + $wkfalllogs = $latestContent->getWorkflowLog(); + if($wkfalllogs) { + $this->contentHeading(getMLText("finished_workflow_log")); + foreach($wkfalllogs as $wkflogs) { + $this->rowStart(); + $this->columnStart(12); + $this->printWorkflowLog($wkflogs); + $this->columnEnd(); + $this->rowEnd(); + } + } + } + } ?> rowStart(); $this->columnStart(12); $this->contentHeading(getMLText("workflow_log")); - $this->contentContainerStart(); - echo ""; - echo "\n"; - echo ""; - foreach($wkflogs as $wkflog) { - echo ""; - echo ""; - echo ""; - echo ""; - $loguser = $wkflog->getUser(); - echo ""; - echo ""; - echo ""; - } - print "\n
".getMLText('workflow')."".getMLText('date')."".getMLText('action')."".getMLText('user')."".getMLText('comment')."
".htmlspecialchars($wkflog->getWorkflow()->getName())."".getLongReadableDate($wkflog->getDate())."".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName()))."".htmlspecialchars($loguser->getFullName())."".htmlspecialchars($wkflog->getComment())."
\n"; - $this->contentContainerEnd(); + $this->printWorkflowLog($wkflogs); $this->columnEnd(); $this->rowEnd(); } diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index f13b6dfc4..9feef60ee 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -3892,6 +3892,23 @@ $(document).ready(function() { "; + echo "".getMLText('workflow')."".getMLText('date')."".getMLText('action')."".getMLText('user')."".getMLText('comment')."\n"; + echo ""; + foreach($wkflogs as $wkflog) { + echo ""; + echo "".htmlspecialchars($wkflog->getWorkflow()->getName()).""; + echo "".getLongReadableDate($wkflog->getDate()).""; + echo "".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName())).""; + $loguser = $wkflog->getUser(); + echo "".htmlspecialchars($loguser->getFullName()).""; + echo "".htmlspecialchars($wkflog->getComment()).""; + echo ""; + } + print "\n\n"; + } /* }}} */ + /** * Show progressbar *