make it look like Review/Approval summary

This commit is contained in:
Uwe Steinmann 2021-06-01 10:54:32 +02:00
parent 0f072fc9a9
commit 2ef409c197

View File

@ -70,46 +70,27 @@ class SeedDMS_View_WorkflowSummary extends SeedDMS_Theme_Style {
$document = $dms->getDocument($st['document']);
if($document)
$version = $document->getContentByVersion($st['version']);
$workflow = $dms->getWorkflow($st['workflow']);
$state = $dms->getWorkflowState($st['state']);
$owner = $document->getOwner();
$moduser = $dms->getUser($st['userid']);
if ($document && $version) {
if ($printheader){
print "<table class=\"table table-condensed\">";
print "<table class=\"table table-condensed table-sm\">";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("workflow")."</th>\n";
print "<th>".getMLText("workflow_state")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("action")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader=false;
}
$previewer->createPreview($version);
print "<tr>\n";
print "<td><a href=\"../op/op.Download.php?documentid=".$document->getID()."&version=".$st['version']."\">";
if($previewer->hasPreview($version)) {
print "<img class=\"mimeicon\" width=\"".$previewwidth."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
} else {
print "<img class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
}
print "</a></td>";
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["document"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName());
print "</a></td>";
print "<td>".$st["version"]."</td>";
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>".$workflow->getName()."</td>";
print "<td>".$state->getName()."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."</td>";
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
print "</tr>\n";
echo $this->documentListRowStart($document, $class);
echo $this->documentListRow($document, $previewer, true, $st['version']);
print "<td><small>".getLongReadableDate($st["date"])."<br />". htmlspecialchars($moduser->getFullName()) ."</small></td>";
echo $this->documentListRowEnd($document);
$iRev[] = $document->getId();
}
}
if (!$printheader) {
@ -125,45 +106,27 @@ class SeedDMS_View_WorkflowSummary extends SeedDMS_Theme_Style {
$document = $dms->getDocument($st['document']);
if($document)
$version = $document->getContentByVersion($st['version']);
$workflow = $dms->getWorkflow($st['workflow']);
$state = $dms->getWorkflowState($st['state']);
$owner = $document->getOwner();
$modgroup = $dms->getGroup($st['groupid']);
if (!in_array($st["document"], $iRev) && $document && $version) {
if ($printheader){
print "<table class=\"table table-condensed\">";
print "<table class=\"table table-condensed table-sm\">";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("workflow")."</th>\n";
print "<th>".getMLText("workflow_state")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("action")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader=false;
}
$previewer->createPreview($version);
print "<tr>\n";
print "<td><a href=\"../op/op.Download.php?documentid=".$document->getID()."&version=".$st['version']."\">";
if($previewer->hasPreview($version)) {
print "<img class=\"mimeicon\" width=\"".$previewwidth."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
} else {
print "<img class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
}
print "</a></td>";
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["document"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
print "<td>".$st["version"]."</td>";
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>".$workflow->getName()."</td>";
print "<td>".$state->getName()."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."</td>";
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
print "</tr>\n";
echo $this->documentListRowStart($document, $class);
echo $this->documentListRow($document, $previewer, true, $st['version']);
print "<td><small>".getLongReadableDate($st["date"])."<br />". htmlspecialchars($moduser->getFullName()) ."</small></td>";
echo $this->documentListRowEnd($document);
$iRev[] = $document->getId();
}
}
if (!$printheader) {