* Add module to feedback.

This commit is contained in:
Yagami
2018-11-28 13:04:45 +08:00
parent 7bc823d490
commit f65f6db2a4
2 changed files with 25 additions and 0 deletions
+12
View File
@@ -90,6 +90,18 @@ class tree extends control
$position[] = html::a($this->createLink('bug', 'browse', "product=$rootID"), $product->name);
$position[] = $this->lang->tree->manageBug;
}
elseif($viewType == 'feedback')
{
$this->lang->set('menugroup.tree', 'feedback');
$this->app->loadLang('feedback');
$this->lang->tree->menu = $this->lang->feedback->menu;
$root = new stdclass();
$root->name = $this->lang->feedback->common;
$this->view->root = $root;
$title = $this->lang->tree->manageFeedback;
$position[] = html::a($this->createLink('feedback', 'admin'), $this->lang->tree->manageFeedback);
}
elseif($viewType == 'case')
{
$this->loadModel('testcase')->setMenu($this->product->getPairs(), $rootID);
+13
View File
@@ -969,6 +969,19 @@ class treeModel extends model
if($type == 'case') return html::a(helper::createLink('testcase', 'browse', "productID={$rootID}&branch=$branchID"), $branch, '_self', "id='branch{$branchID}'");
}
/**
* Create link of feedback.
*
* @param string $type
* @param object $module
* @access public
* @return string
*/
public function createFeedbackLink($type, $module)
{
return html::a(helper::createLink('feedback', 'admin', "type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
}
/**
* Get sons of a module.
*