From 31d02f81147650fd68943da378c172f23bf809b6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 11 Feb 2016 17:47:05 +0100 Subject: [PATCH 01/22] add method getFilesize() --- SeedDMS_Preview/Preview/Previewer.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/SeedDMS_Preview/Preview/Previewer.php b/SeedDMS_Preview/Preview/Previewer.php index a1a5d47e8..99f6345cf 100644 --- a/SeedDMS_Preview/Preview/Previewer.php +++ b/SeedDMS_Preview/Preview/Previewer.php @@ -282,6 +282,21 @@ class SeedDMS_Preview_Previewer { } } /* }}} */ + public function getFilesize($object, $width=0) { /* {{{ */ + if($width == 0) + $width = $this->width; + else + $width = intval($width); + $target = $this->getFileName($object, $width); + if($target && file_exists($target.'.png')) { + return(filesize($target.'.png')); + } else { + return false; + } + + } /* }}} */ + + public function deletePreview($document, $object, $width=0) { /* {{{ */ if($width == 0) $width = $this->width; From 68d9e05931f6674ad9a1bcf5ac3c2a8c60a16e8a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 11 Feb 2016 17:47:40 +0100 Subject: [PATCH 02/22] do not show values if not set, add type to list of attributes --- views/bootstrap/class.AttributeMgr.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index 1bbc529a6..fcad81298 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -63,6 +63,9 @@ $(document).ready( function() { if($selattrdef) { $this->contentHeading(getMLText("attrdef_info")); $res = $selattrdef->getStatistics(30); + if(!empty($res['frequencies']['document']) ||!empty($res['frequencies']['folder']) ||!empty($res['frequencies']['content'])) { + + ?>
@@ -93,6 +96,7 @@ $(document).ready( function() {
"; print "\n\n"; @@ -278,7 +282,24 @@ $(document).ready( function() { $ot = getMLText("version"); break; } - print "