diff --git a/module/doc/control.php b/module/doc/control.php index d718c5bce4..9f7ca819b9 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1262,7 +1262,7 @@ class doc extends control { $this->session->set('createProjectLocate', $this->app->getURI(true), 'doc'); - list($libs, $libID, $object, $objectID) = $this->doc->setMenuByType($type, $objectID, $libID); + list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType($type, $objectID, $libID); $libID = (int)$libID; $moduleTree = $type == 'book' ? $this->doc->getBookStructure($libID) : $this->doc->getTreeMenu($type, $objectID, $libID); @@ -1283,15 +1283,16 @@ class doc extends control $pager = new pager($recTotal, $recPerPage, $pageID); $this->app->rawMethod = $rawMethod; - $this->view->title = $title; - $this->view->type = $type; - $this->view->browseType = $browseType; - $this->view->param = $queryID; - $this->view->users = $this->user->getPairs('noletter'); - $this->view->libTree = $libTree; - $this->view->moduleID = $moduleID; - $this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, 0, $queryID, $pager) : $this->doc->getDocs($libID, $moduleID, 'id_desc', $pager); - $this->view->pager = $pager; + $this->view->title = $title; + $this->view->type = $type; + $this->view->browseType = $browseType; + $this->view->param = $queryID; + $this->view->users = $this->user->getPairs('noletter'); + $this->view->libTree = $libTree; + $this->view->moduleID = $moduleID; + $this->view->objectDropdown = $objectDropdown; + $this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, 0, $queryID, $pager) : $this->doc->getDocs($libID, $moduleID, 'id_desc', $pager); + $this->view->pager = $pager; if($browseType == 'bySearch') { diff --git a/module/doc/model.php b/module/doc/model.php index 6db01f859b..0b8040d25a 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -2711,7 +2711,8 @@ EOT; $objectID = $type == 'custom' or $type == 'book' ? 0 : $doclib->$type; } - $objects = $this->getOrderedObjects($type); + $objects = $this->getOrderedObjects($type); + $objectDropdown = ''; if($type == 'custom') { @@ -2739,7 +2740,8 @@ EOT; if($libID == 0 and !empty($libs)) $libID = reset($libs)->id; if($this->app->tab == 'doc') $this->app->rawMethod = $type == 'execution' ? 'project' : $type; - $object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch(); + $object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch(); + $objectDropdown = $this->select($type, $objects, $objectID, array()); if(empty($object)) { @@ -2752,7 +2754,7 @@ EOT; $tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc'; if($tab != 'doc') $this->loadModel($type)->setMenu($objectID); - return array($libs, $libID, $object, $objectID); + return array($libs, $libID, $object, $objectID, $objectDropdown); } /** diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index cd2aa67fe7..cbc68f0afb 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -16,6 +16,7 @@ doc);?>