From bfcca8f83e71e2fafd904c3d0791f816b6c419aa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 4 Dec 2017 15:23:27 +0100 Subject: [PATCH] show list of documents in selected category --- views/bootstrap/class.Categories.php | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php index a7747e567..e65b73ab4 100644 --- a/views/bootstrap/class.Categories.php +++ b/views/bootstrap/class.Categories.php @@ -18,6 +18,11 @@ */ require_once("class.Bootstrap.php"); +/** + * Include class to preview documents + */ +require_once("SeedDMS/Preview.php"); + /** * Class which outputs the html page for Categories view * @@ -46,13 +51,30 @@ $(document).ready( function() { function info() { /* {{{ */ $dms = $this->params['dms']; $selcat = $this->params['selcategory']; + $cachedir = $this->params['cachedir']; + $previewwidth = $this->params['previewWidthList']; + $timeout = $this->params['timeout']; if($selcat) { $this->contentHeading(getMLText("category_info")); - $documents = $selcat->getDocumentsByCategory(); + $c = $selcat->countDocumentsByCategory(); echo "\n"; - echo "\n"; + echo "\n"; echo "
".getMLText('document_count')."".(count($documents))."
".getMLText('document_count')."".($c)."
"; + + $documents = $selcat->getDocumentsByCategory(10); + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); + foreach($documents as $doc) { + echo $this->documentListRow($doc, $previewer); + } + print "
".getMLText("name")."".getMLText("status")."".getMLText("action")."
"; } } /* }}} */ @@ -132,7 +154,7 @@ $(document).ready( function() { ?> -
getID()."\"" : "") ?>>
+
getID()."\"" : "") ?>>
getID()."\"" : "") ?>>