From 2fceade3a29ac4b49e555ed0f71aec5d121e5ac9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 11 Jun 2015 11:25:14 +0200 Subject: [PATCH] show docs in root folder of document chooser --- views/bootstrap/class.Bootstrap.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index e1980e67a..2fcf1bb8e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1247,6 +1247,14 @@ function clearFilename() { } } else { $node['children'] = jqtree($path, $folder, $this->params['user'], $accessmode, $showdocs, $expandtree, $orderby); + if($showdocs) { + $documents = $folder->getDocuments($orderby); + $documents = SeedDMS_Core_DMS::filterAccess($documents, $this->params['user'], $accessmode); + foreach($documents as $document) { + $node2 = array('label'=>$document->getName(), 'id'=>$document->getID(), 'load_on_demand'=>false, 'is_folder'=>false); + $node['children'][] = $node2; + } + } } /* Nasty hack to remove the highest folder */ if(isset($this->params['remove_root_from_tree']) && $this->params['remove_root_from_tree']) {