mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
use documentListRow() for output
This commit is contained in:
parent
4266e426db
commit
d9d5c98c5f
|
@ -52,7 +52,6 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
|||
$this->contentStart();
|
||||
$this->pageNavigation(getMLText("my_documents"), "my_documents");
|
||||
$this->contentHeading(getMLText("approval_summary"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
// Get document list for the current user.
|
||||
$approvalStatus = $user->getApprovalStatus();
|
||||
|
@ -67,41 +66,31 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
|||
$document = $dms->getDocument($st['documentID']);
|
||||
$version = $document->getContentByVersion($st['version']);
|
||||
$previewer->createPreview($version);
|
||||
$owner = $document->getOwner();
|
||||
$moduser = $dms->getUser($st['required']);
|
||||
|
||||
if ($document && $version) {
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table-condensed\">";
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("version")."</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;
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
$previewer->createPreview($version);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&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\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
echo "<tr id=\"table-row-document-".$document->getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
|
||||
echo $this->documentListRow($document, $previewer, true, $st['version']);
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
|
||||
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."</td>";
|
||||
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
if ($st["status"]!=-2) {
|
||||
$iRev[] = $st["documentID"];
|
||||
|
@ -113,49 +102,37 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
|||
printMLText("no_approval_needed");
|
||||
}
|
||||
|
||||
$this->contentContainerEnd();
|
||||
$this->contentHeading(getMLText("group_approval_summary"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
$printheader = true;
|
||||
foreach ($approvalStatus["grpstatus"] as $st) {
|
||||
$document = $dms->getDocument($st['documentID']);
|
||||
$version = $document->getContentByVersion($st['version']);
|
||||
$owner = $document->getOwner();
|
||||
$modgroup = $dms->getGroup($st['required']);
|
||||
|
||||
if (!in_array($st["documentID"], $iRev) && $document && $version) {
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table-condensed\">";
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("version")."</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;
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
$previewer->createPreview($version);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&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\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
echo "<tr id=\"table-row-document-".$document->getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
|
||||
echo $this->documentListRow($document, $previewer, true, $st['version']);
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
|
||||
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."</td>";
|
||||
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
if (!$printheader) {
|
||||
|
@ -164,7 +141,6 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
|||
printMLText("no_approval_needed");
|
||||
}
|
||||
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
@ -48,7 +48,6 @@ class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style {
|
|||
$this->pageNavigation(getMLText("my_documents"), "my_documents");
|
||||
|
||||
$this->contentHeading(getMLText("receipt_summary"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
// TODO: verificare scadenza
|
||||
|
||||
|
@ -65,41 +64,31 @@ class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style {
|
|||
$document = $dms->getDocument($st['documentID']);
|
||||
if($document)
|
||||
$version = $document->getContentByVersion($st['version']);
|
||||
$owner = $document->getOwner();
|
||||
$moduser = $dms->getUser($st['required']);
|
||||
|
||||
if ($document && $version) {
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table-condensed\">";
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("version")."</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;
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
$previewer->createPreview($version);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&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\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
echo "<tr id=\"table-row-document-".$document->getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
|
||||
echo $this->documentListRow($document, $previewer, true, $st['version']);
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
|
||||
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."</td>";
|
||||
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
if ($st["status"]!=-2) {
|
||||
$iRev[] = $st["documentID"];
|
||||
|
@ -111,41 +100,39 @@ class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style {
|
|||
printMLText("no_docs_to_receipt");
|
||||
}
|
||||
|
||||
$this->contentContainerEnd();
|
||||
$this->contentHeading(getMLText("group_receipt_summary"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
$printheader=true;
|
||||
foreach ($receiptStatus["grpstatus"] as $st) {
|
||||
$document = $dms->getDocument($st['documentID']);
|
||||
if($document)
|
||||
$version = $document->getContentByVersion($st['version']);
|
||||
$owner = $document->getOwner();
|
||||
$modgroup = $dms->getGroup($st['required']);
|
||||
|
||||
if (!in_array($st["documentID"], $iRev) && $document && $version) {
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"folderView\">";
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("version")."</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";
|
||||
print "<table class=\"folderView\">";
|
||||
$printheader=false;
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
|
||||
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."</td>";
|
||||
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
|
||||
print "</tr>\n";
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
echo "<tr id=\"table-row-document-".$document->getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
|
||||
echo $this->documentListRow($document, $previewer, true, $st['version']);
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$printheader) {
|
||||
|
@ -154,8 +141,6 @@ class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style {
|
|||
printMLText("no_docs_to_receipt");
|
||||
}
|
||||
|
||||
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
@ -53,7 +53,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
|||
$this->pageNavigation(getMLText("my_documents"), "my_documents");
|
||||
|
||||
$this->contentHeading(getMLText("review_summary"));
|
||||
$this->contentContainerStart();
|
||||
// $this->contentContainerStart();
|
||||
|
||||
// TODO: verificare scadenza
|
||||
|
||||
|
@ -69,41 +69,31 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
|||
foreach ($reviewStatus["indstatus"] as $st) {
|
||||
$document = $dms->getDocument($st['documentID']);
|
||||
$version = $document->getContentByVersion($st['version']);
|
||||
$owner = $document->getOwner();
|
||||
$moduser = $dms->getUser($st['required']);
|
||||
|
||||
if ($document && $version) {
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table-condensed\">";
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("version")."</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;
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
$previewer->createPreview($version);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&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\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
echo "<tr id=\"table-row-document-".$document->getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
|
||||
echo $this->documentListRow($document, $previewer, true, $st['version']);
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
|
||||
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."</td>";
|
||||
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
if ($st["status"]!=-2) {
|
||||
$iRev[] = $st["documentID"];
|
||||
|
@ -115,49 +105,39 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
|||
printMLText("no_docs_to_review");
|
||||
}
|
||||
|
||||
$this->contentContainerEnd();
|
||||
// $this->contentContainerEnd();
|
||||
$this->contentHeading(getMLText("group_review_summary"));
|
||||
$this->contentContainerStart();
|
||||
// $this->contentContainerStart();
|
||||
|
||||
$printheader=true;
|
||||
foreach ($reviewStatus["grpstatus"] as $st) {
|
||||
$document = $dms->getDocument($st['documentID']);
|
||||
$version = $document->getContentByVersion($st['version']);
|
||||
$owner = $document->getOwner();
|
||||
$modgroup = $dms->getGroup($st['required']);
|
||||
|
||||
if (!in_array($st["documentID"], $iRev) && $document && $version) {
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"folderView\">";
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("version")."</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;
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
$previewer->createPreview($version);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&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\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
echo "<tr id=\"table-row-document-".$document->getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
|
||||
echo $this->documentListRow($document, $previewer, true, $st['version']);
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
|
||||
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."</td>";
|
||||
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
if (!$printheader) {
|
||||
|
@ -166,8 +146,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
|||
printMLText("no_docs_to_review");
|
||||
}
|
||||
|
||||
|
||||
$this->contentContainerEnd();
|
||||
// $this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user