documents can be sorted by expiration date or name

This commit is contained in:
Uwe Steinmann 2020-05-27 12:02:30 +02:00
parent a4b84f5558
commit 640dea6534

View File

@ -51,10 +51,12 @@ class SeedDMS_View_ExpiredDocuments extends SeedDMS_Bootstrap_Style {
$dms = $this->params['dms'];
$user = $this->params['user'];
$orderby = $this->params['orderby'];
$orderdir = $this->params['orderdir'];
$cachedir = $this->params['cachedir'];
$previewwidth = $this->params['previewWidthList'];
$timeout = $this->params['timeout'];
$xsendfile = $this->params['xsendfile'];
$order = $orderby.$orderdir;
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
@ -69,12 +71,15 @@ class SeedDMS_View_ExpiredDocuments extends SeedDMS_Bootstrap_Style {
$this->contentHeading(getMLText("expired_documents"));
// $this->contentContainerStart();
if($docs = $dms->getDocumentsExpired(-1400)) {
if($docs = $dms->getDocumentsExpired(-1400, null, $orderby, $orderdir, true)) {
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> — <a href=\"../out/out.ExpiredDocuments.php?orderby=e\">".getMLText("expires")."</a></th>\n";
print "<th>".getMLText("name");
print " <a href=\"../out/out.ExpiredDocuments.php?".($order=="na"?"&orderby=n&orderdir=d":"&orderby=n&orderdir=a")."\" \"title=\"".getMLText("sort_by_name")."\">".($order=="na"?' <i class="icon-sort-by-alphabet selected"></i>':($order=="nd"?' <i class="icon-sort-by-alphabet-alt selected"></i>':' <i class="icon-sort-by-alphabet"></i>'))."</a>";
print " <a href=\"../out/out.ExpiredDocuments.php?".($order=="ea"?"&orderby=e&orderdir=d":"&orderby=e&orderdir=a")."\" \"title=\"".getMLText("sort_by_expiration_date")."\">".($order=="ea"?' <i class="icon-sort-by-order selected"></i>':($order=="ed"?' <i class="icon-sort-by-order-alt selected"></i>':' <i class="icon-sort-by-order"></i>'))."</a>";
print "</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("action")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";