diff --git a/trunk/module/tree/control.php b/trunk/module/tree/control.php index 2d5a8c8be9..4502fdfbf8 100644 --- a/trunk/module/tree/control.php +++ b/trunk/module/tree/control.php @@ -32,6 +32,7 @@ class tree extends control parent::__construct(); $this->loadModel('product'); $this->loadModel('bug'); + $this->loadModel('testcase'); } /* 设置当前的产品。*/ @@ -59,6 +60,11 @@ class tree extends control } elseif($viewType == 'bug') { + /* 设置菜单。*/ + $this->bug->setMenu($this->product->getPairs(), $productID); + $this->lang->tree->menu = $this->lang->bug->menu; + $this->lang->set('menugroup.tree', 'qa'); + $header['title'] = $this->lang->tree->manageBug . $this->lang->colon . $product->name; $position[] = html::a($this->createLink('bug', 'browse', "product=$productID"), $product->name); $position[] = $this->lang->tree->manageBug; @@ -66,6 +72,11 @@ class tree extends control } elseif($viewType == 'case') { + /* 设置菜单。*/ + $this->testcase->setMenu($this->product->getPairs(), $productID); + $this->lang->tree->menu = $this->lang->testcase->menu; + $this->lang->set('menugroup.tree', 'qa'); + $header['title'] = $this->lang->tree->manageCase . $this->lang->colon . $product->name; $position[] = html::a($this->createLink('testcase', 'browse', "product=$productID"), $product->name); $position[] = $this->lang->tree->manageCase; diff --git a/trunk/module/tree/model.php b/trunk/module/tree/model.php index 7d2c89b7e4..312e6d06e6 100644 --- a/trunk/module/tree/model.php +++ b/trunk/module/tree/model.php @@ -155,14 +155,14 @@ class treeModel extends model /* 生成Bug链接。*/ function createBugLink($module) { - $linkHtml = html::a(helper::createLink('bug', 'browse', "product={$module->product}&type=byModule¶m={$module->id}"), $module->name); + $linkHtml = html::a(helper::createLink('bug', 'browse', "product={$module->product}&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}'"); return $linkHtml; } /* 生成case链接。*/ function createCaseLink($module) { - $linkHtml = html::a(helper::createLink('testcase', 'browse', "product={$module->product}&type=byModule¶m={$module->id}"), $module->name); + $linkHtml = html::a(helper::createLink('testcase', 'browse', "product={$module->product}&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}'"); return $linkHtml; }