mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
show logs of finished worflows
This commit is contained in:
parent
172d5b3063
commit
aa9600453d
|
@ -3727,6 +3727,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
|
||||
*
|
||||
|
|
|
@ -554,7 +554,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Theme_Style {
|
|||
$this->contentContainerEnd();
|
||||
} /* }}} */
|
||||
|
||||
if($user->isAdmin()) {
|
||||
if($accessop->check_view_access($this, array('action'=>'statuslog'))) {
|
||||
$this->contentHeading(getMLText("status"));
|
||||
$this->contentContainerStart();
|
||||
$statuslog = $version->getStatusLog();
|
||||
|
@ -570,26 +570,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
|
||||
|
|
|
@ -1039,6 +1039,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
|
||||
|
@ -1508,21 +1524,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('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>".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();
|
||||
}
|
||||
|
|
|
@ -3809,6 +3809,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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user