* Finish task#8338.

This commit is contained in:
leiyong
2020-11-12 11:27:36 +08:00
parent 3c0523d47e
commit 29b585ba35
3 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -150,11 +150,11 @@ class product extends control
{
setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
$browseType = 'unclosed';
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch);
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "&param=$param&storyType=$storyType");
}
else
{
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch);
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "&param=$param&storyType=$storyType");
}
if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType);
+1
View File
@@ -452,6 +452,7 @@ class productModel extends model
if(isset($currentProduct->type) && $currentProduct->type != 'normal')
{
$branches = $this->loadModel('branch')->getPairs($productID);
$branch = empty($branch) ? (int)$this->cookie->preBranch : $branch;
$branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0];
$dropMenuLink = helper::createLink('branch', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra");
+4 -2
View File
@@ -371,10 +371,12 @@ class treeModel extends model
* @param int $startModule
* @param string $userFunc the function used to create link
* @param string $extra extra params
* @param string $branch product branch
* @param string $extraParams extra params
* @access public
* @return string
*/
public function getTreeMenu($rootID, $type = 'root', $startModule = 0, $userFunc, $extra = '', $branch = 0)
public function getTreeMenu($rootID, $type = 'root', $startModule = 0, $userFunc, $extra = '', $branch = 0, $extraParams = '')
{
if($type == 'line') $rootID = 0;
@@ -408,7 +410,7 @@ class treeModel extends model
{
$linkHtml = ($type == 'case' and !empty($extra)) ? '<a>' . $branch . '</a>' : $this->createBranchLink($type, $rootID, $branchID, $branch);
$linkHtml = $manage ? html::a(inlink('browse', "root=$rootID&viewType=$type&currentModuleID=0&branch=$branchID"), $branch) : $linkHtml;
if($type == 'story' or $type == 'bug') $linkHtml = html::a(inlink('browse', "productID=$rootID&branch=$branchID&browseType=bybranch"), $branch, "", "id=branch" . $branchID);
if($type == 'story' or $type == 'bug') $linkHtml = html::a(inlink('browse', "productID=$rootID&branch=$branchID&browseType=bybranch" . $extraParams), $branch, "", "id=branch" . $branchID);
if($firstBranch and $product->type != 'normal')
{
$linkHtml = '<a>' . $this->lang->product->branchName[$product->type] . '</a><ul><li>' . $linkHtml;