Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2023-11-12 17:38:31 +01:00
commit 8432340154
5 changed files with 63 additions and 34 deletions

View File

@ -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

View File

@ -3892,6 +3892,23 @@ $(document).ready(function() {
<?php
} /* }}} */
protected function printWorkflowLog($wkflogs) { /* {{{ */
echo "<table class=\"table table-condensed table-sm\"><thead>";
echo "<th>".getMLText('workflow')."</th><th>".getMLText('date')."</th><th>".getMLText('action')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n";
echo "</thead><tbody>";
foreach($wkflogs as $wkflog) {
echo "<tr>";
echo "<td>".htmlspecialchars($wkflog->getWorkflow()->getName())."</td>";
echo "<td>".getLongReadableDate($wkflog->getDate())."</td>";
echo "<td>".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName()))."</td>";
$loguser = $wkflog->getUser();
echo "<td>".htmlspecialchars($loguser->getFullName())."</td>";
echo "<td>".htmlspecialchars($wkflog->getComment())."</td>";
echo "</tr>";
}
print "</tbody>\n</table>\n";
} /* }}} */
/**
* Show progressbar
*

View File

@ -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 "</tbody>\n</table>\n";
$this->contentContainerEnd();
}
$wkflogs = $version->getWorkflowLog();
if($wkflogs) {
$this->contentHeading(getMLText("workflow_summary"));
$this->contentContainerStart();
echo "<table class=\"table table-condensed\"><thead>";
echo "<th>".getMLText('date')."</th><th>".getMLText('action')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n";
echo "</thead><tbody>";
foreach($wkflogs as $wkflog) {
echo "<tr>";
echo "<td>".$wkflog->getDate()."</td>";
echo "<td>".$wkflog->getTransition()->getAction()->getName()."</td>";
$loguser = $wkflog->getUser();
echo "<td>".$loguser->getFullName()."</td>";
echo "<td>".$wkflog->getComment()."</td>";
echo "</tr>";
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 "</tbody>\n</table>\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

View File

@ -1111,6 +1111,22 @@ $(document).ready( function() {
print "</tbody>\n</table>\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();
}
}
}
}
?>
</div>
<?php
@ -1580,22 +1596,7 @@ $(document).ready( function() {
$this->rowStart();
$this->columnStart(12);
$this->contentHeading(getMLText("workflow_log"));
$this->contentContainerStart();
echo "<table class=\"table table-condensed table-sm\"><thead>";
echo "<th>".getMLText('workflow')."</th><th>".getMLText('date')."</th><th>".getMLText('action')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n";
echo "</thead><tbody>";
foreach($wkflogs as $wkflog) {
echo "<tr>";
echo "<td>".htmlspecialchars($wkflog->getWorkflow()->getName())."</td>";
echo "<td>".getLongReadableDate($wkflog->getDate())."</td>";
echo "<td>".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName()))."</td>";
$loguser = $wkflog->getUser();
echo "<td>".htmlspecialchars($loguser->getFullName())."</td>";
echo "<td>".htmlspecialchars($wkflog->getComment())."</td>";
echo "</tr>";
}
print "</tbody>\n</table>\n";
$this->contentContainerEnd();
$this->printWorkflowLog($wkflogs);
$this->columnEnd();
$this->rowEnd();
}

View File

@ -3892,6 +3892,23 @@ $(document).ready(function() {
<?php
} /* }}} */
protected function printWorkflowLog($wkflogs) { /* {{{ */
echo "<table class=\"table table-condensed table-sm\"><thead>";
echo "<th>".getMLText('workflow')."</th><th>".getMLText('date')."</th><th>".getMLText('action')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n";
echo "</thead><tbody>";
foreach($wkflogs as $wkflog) {
echo "<tr>";
echo "<td>".htmlspecialchars($wkflog->getWorkflow()->getName())."</td>";
echo "<td>".getLongReadableDate($wkflog->getDate())."</td>";
echo "<td>".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName()))."</td>";
$loguser = $wkflog->getUser();
echo "<td>".htmlspecialchars($loguser->getFullName())."</td>";
echo "<td>".htmlspecialchars($wkflog->getComment())."</td>";
echo "</tr>";
}
print "</tbody>\n</table>\n";
} /* }}} */
/**
* Show progressbar
*