* Finish task #8194.

This commit is contained in:
holan20180123
2020-11-10 14:06:00 +08:00
parent 159cd5c41d
commit f80458f916
5 changed files with 32 additions and 10 deletions
+11
View File
@@ -43,6 +43,9 @@ class tree extends control
$this->view->branches = $branches;
}
$this->view->root = $product;
/* Determines whether an object is editable. */
$changeAllowed = (empty($this->config->global->closedProductStatus) or $product->status != 'closed') ? true : false;
}
elseif(strpos($viewType, 'doc') !== false)
{
@@ -192,6 +195,7 @@ class tree extends control
$this->view->parentModules = $parentModules;
$this->view->branch = $branch;
$this->view->tree = $this->tree->getProductStructure($rootID, $viewType);
$this->view->changeAllowed = isset($changeAllowed) ? $changeAllowed : true;
$this->display();
}
@@ -206,12 +210,18 @@ class tree extends control
*/
public function browseTask($rootID, $productID = 0, $currentModuleID = 0)
{
/* Get project. */
$project = $this->loadModel('project')->getById($rootID);
$this->view->root = $project;
/* Get all associated products. */
$products = $this->project->getProducts($rootID);
$this->view->products = $products;
/* Determines whether an object is editable. */
$changeAllowed = (empty($this->config->global->closedProjectStatus) or $project->status != 'closed') ? true : false;
/* Set menu. */
$this->lang->set('menugroup.tree', 'project');
$this->project->setMenu($this->project->getPairs(), $rootID);
$this->lang->tree->menu = $this->lang->project->menu;
@@ -240,6 +250,7 @@ class tree extends control
$this->view->parentModules = $parentModules;
$this->view->currentModuleID = $currentModuleID;
$this->view->tree = $this->tree->getTaskStructure($rootID, $productID);
$this->view->changeAllowed = $changeAllowed;
$this->display();
}