diff --git a/module/project/control.php b/module/project/control.php index 666d9125ac..6864b31cf5 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -579,7 +579,7 @@ class project extends control $this->view->type = $type; $this->view->param = $param; $this->view->storyTasks = $storyTasks; - $this->view->moduleTree = $this->loadModel('tree')->getTaskTreeMenu($projectID, $productID = 0, $startModuleID = 0, array('treeModel', 'createProjectStoryLink')); + $this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($projectID, $startModuleID = 0, array('treeModel', 'createProjectStoryLink')); $this->view->tabID = 'story'; $this->view->users = $users; diff --git a/module/tree/model.php b/module/tree/model.php index e2d8140476..98d57ffdd0 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -353,7 +353,7 @@ class treeModel extends model } else { - $link = $userFunc[1] == 'createProjectStoryLink' ? helper::createLink('project', 'story', "root=$rootID&orderBy=&status=byProduct&praram=$id") : helper::createLink('project', 'task', "root=$rootID&status=byProduct&praram=$id"); + $link = helper::createLink('project', 'task', "root=$rootID&status=byProduct&praram=$id"); $menu .= "
  • " . html::a($link, $product, '_self', "id='product$id'"); } @@ -397,6 +397,7 @@ class treeModel extends model $menu .= $lastMenu . '
  • '; } + /* Get project module. */ if($startModule == 0) { /* tree menu. */ @@ -436,6 +437,81 @@ class treeModel extends model $tree = isset($treeMenu[0]) ? $treeMenu[0] : ''; $menu .= $tree . ''; } + $menu .= ''; + return $menu; + } + + /** + * Get project story tree menu. + * + * @param int $rootID + * @param int $startModule + * @param array $userFunc + * @access public + * @return string + */ + public function getProjectStoryTreeMenu($rootID, $startModule = 0, $userFunc) + { + $extra['projectID'] = $rootID; + $menu = "'; return $menu; }