* Finish task#8338.
This commit is contained in:
@@ -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, "¶m=$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, "¶m=$param&storyType=$storyType");
|
||||
}
|
||||
|
||||
if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType);
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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¤tModuleID=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;
|
||||
|
||||
Reference in New Issue
Block a user