allow to show partial trees

This commit is contained in:
Uwe Steinmann 2015-05-29 20:47:46 +02:00
parent c48030d54e
commit 5c94655bd7
2 changed files with 8 additions and 2 deletions

View File

@ -29,10 +29,15 @@ include("../inc/inc.Authentication.php");
$folderid = intval($_GET["folderid"]);
$form = preg_replace('/[^A-Za-z0-9_]+/', '', $_GET["form"]);
if(isset($_GET['partialtree'])) {
$partialtree = intval($_GET['partialtree']);
} else {
$partialtree = 0;
}
$folder = $dms->getFolder($folderid);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'form'=>$form));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'form'=>$form, 'partialtree'=>$partialtree));
if($view) {
$view->show();
exit;

View File

@ -36,10 +36,11 @@ class SeedDMS_View_DocumentChooser extends SeedDMS_Bootstrap_Style {
$user = $this->params['user'];
$folder = $this->params['folder'];
$form = $this->params['form'];
$partialtree = $this->params['partialtree'];
$this->htmlStartPage(getMLText("choose_target_document"));
$this->contentContainerStart();
$this->printNewTreeNavigation($folder->getID(), M_READ, 1, $form);
$this->printNewTreeNavigation($folder->getID(), M_READ, 1, $form, 0, '', $partialtree);
$this->contentContainerEnd();
echo "</body>\n</html>\n";
} /* }}} */