* Finish task #8194.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user