mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
496020ca59
|
@ -162,6 +162,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
|
||||
|
|
|
@ -746,6 +746,10 @@ class SeedDMS_Core_DMS {
|
|||
function getDocumentsExpired($date, $user=null) { /* {{{ */
|
||||
$db = $this->getDB();
|
||||
|
||||
if (!$db->createTemporaryTable("ttstatid") || !$db->createTemporaryTable("ttcontentid")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(is_int($date)) {
|
||||
$ts = mktime(0, 0, 0) + $date * 86400;
|
||||
} elseif(is_string($date)) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<email>uwe@steinmann.cx</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2020-05-14</date>
|
||||
<date>2020-05-22</date>
|
||||
<time>09:43:12</time>
|
||||
<version>
|
||||
<release>6.0.10</release>
|
||||
|
@ -1766,6 +1766,23 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
|
|||
- better error checking in SeedDMS_Core_Document::addDocumentFile()
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2020-05-22</date>
|
||||
<time>09:43:12</time>
|
||||
<version>
|
||||
<release>5.1.17</release>
|
||||
<api>5.1.17</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- add new callback onSetStatus
|
||||
- fix SeedDMS_Core_DMS::getExpiredDocuments(), sql statement failed because temp. tables were not created
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2017-02-28</date>
|
||||
<time>06:34:50</time>
|
||||
|
|
|
@ -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