mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
fix output of expired documents
This commit is contained in:
parent
dd146a6f5e
commit
574dd54e1d
|
@ -12,6 +12,7 @@
|
|||
- fix moving clipboard (Closes: #473)
|
||||
- show access rights of folder/document if user has write access
|
||||
- fix creating preview images of documents in drop folder
|
||||
- fix list of expired documents in admin tools (Closes: #474)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.16
|
||||
|
|
|
@ -36,6 +36,17 @@ require_once("SeedDMS/Preview.php");
|
|||
*/
|
||||
class SeedDMS_View_ExpiredDocuments extends SeedDMS_Bootstrap_Style {
|
||||
|
||||
function js() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
|
||||
header('Content-Type: application/javascript');
|
||||
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
|
||||
$this->printDeleteDocumentButtonJs();
|
||||
/* Add js for catching click on document in one page mode */
|
||||
$this->printClickDocumentJs();
|
||||
} /* }}} */
|
||||
|
||||
function show() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
|
@ -45,6 +56,8 @@ class SeedDMS_View_ExpiredDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$timeout = $this->params['timeout'];
|
||||
$xsendfile = $this->params['xsendfile'];
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
|
||||
$db = $dms->getDB();
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
|
||||
|
||||
|
@ -54,45 +67,27 @@ class SeedDMS_View_ExpiredDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$this->pageNavigation(getMLText("expired_documents"), "admin_tools");
|
||||
|
||||
$this->contentHeading(getMLText("expired_documents"));
|
||||
$this->contentContainerStart();
|
||||
// $this->contentContainerStart();
|
||||
|
||||
if($docs = $dms->getDocumentsExpired(-1400)) {
|
||||
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>";
|
||||
print "<th><a href=\"../out/out.ExpiredDocuments.php?orderby=n\">".getMLText("name")."</a></th>\n";
|
||||
print "<th><a href=\"../out/out.ExpiredDocuments.php?orderby=s\">".getMLText("status")."</a></th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
// print "<th><a href=\"../out/out.ExpiredDocuments.php?orderby=u\">".getMLText("last_update")."</a></th>\n";
|
||||
print "<th><a href=\"../out/out.ExpiredDocuments.php?orderby=e\">".getMLText("expires")."</a></th>\n";
|
||||
print "<th><a href=\"../out/out.ExpiredDocuments.php?orderby=n\">".getMLText("name")."</a> — <a href=\"../out/out.ExpiredDocuments.php?orderby=e\">".getMLText("expires")."</a></th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("action")."</th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
|
||||
foreach ($docs as $document) {
|
||||
print "<tr>\n";
|
||||
$latestContent = $document->getLatestContent();
|
||||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.ViewDocument.php?documentid=".$document->getID()."\">" . htmlspecialchars($document->getName()) . "</a></td>\n";
|
||||
$status = $latestContent->getStatus();
|
||||
print "<td>".getOverallStatusText($status["status"])."</td>";
|
||||
print "<td>".$latestContent->getVersion()."</td>";
|
||||
// print "<td>".$status["statusDate"]." ". htmlspecialchars($status["statusName"])."</td>";
|
||||
print "<td>".(!$document->getExpires() ? "-":getReadableDate($document->getExpires()))."</td>";
|
||||
print "</tr>\n";
|
||||
echo $this->documentListRow($document, $previewer);
|
||||
}
|
||||
print "</tbody></table>";
|
||||
}
|
||||
else printMLText("empty_notify_list");
|
||||
else $this->infoMsg("no_docs_expired");
|
||||
|
||||
$this->contentContainerEnd();
|
||||
// $this->contentContainerEnd();
|
||||
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
|
|
Loading…
Reference in New Issue
Block a user