This commit is contained in:
hufangzhou
2021-12-06 08:58:58 +08:00
parent acf95daf8a
commit 6eeaa44aa0
4 changed files with 19 additions and 7 deletions
+2 -2
View File
@@ -13,11 +13,11 @@ foreach($branches as $branchID => $branch)
if($branchID == 'all' or empty($branchID) or $statusList[$branchID] == 'active')
{
$activeBranchesHtml .= html::a($linkHtml, $branch, '', "class='$selected' data-key='{$branchesPinyin[$branch]}'");
$activeBranchesHtml .= html::a($linkHtml, $branch, '', "class='$selected' data-key='{$branchesPinyin[$branch]}' data-app='{$this->app->tab}'");
}
else
{
$closedBranchesHtml .= html::a($linkHtml, $branch, '', "class='$selected' data-key='{$branchesPinyin[$branch]}'");
$closedBranchesHtml .= html::a($linkHtml, $branch, '', "class='$selected' data-key='{$branchesPinyin[$branch]}' data-app='{$this->app->tab}'");
}
}
?>
+14 -2
View File
@@ -539,7 +539,7 @@ class productModel extends model
if($currentModule == 'tree' and $currentMethod == 'browse') $isShowBranch = true;
if($currentModule == 'product' and strpos($this->config->product->showBranchMethod, $currentMethod) !== false) $isShowBranch = true;
if($this->app->tab == 'qa' and strpos(',testsuite,testreport,testtask,', ",$currentModule,") === false) $isShowBranch = true;
if($this->app->tab == 'qa' and $currentModule == 'testtask' and strpos(',create,edit,', ",$currentMethod,") === false) $isShowBranch = true;
if($this->app->tab == 'qa' and $currentModule == 'testtask' and strpos(',create,edit,browseunits,importunitresult,', ",$currentMethod,") === false) $isShowBranch = true;
if($isShowBranch)
{
$this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]);
@@ -1978,7 +1978,19 @@ class productModel extends model
elseif($module == 'testtask')
{
$extra = $method != 'browse' ? '' : "&extra=$extra";
$link = helper::createLink($module, 'browse', "productID=%s" . ($branch ? "&branch=%s" : '&branch=0') . $extra);
if(strtolower($method) == 'browseunits')
{
$methodName = 'browseUnits';
$param = '&browseType=newest&orderBy=id_desc&recTotal=0&recPerPage=0&pageID=1';
$param .= $this->app->tab == 'project' ? "&projectID={$this->session->project}" : '';
}
else
{
$methodName = 'browse';
$param = ($branch ? "&branch=%s" : '&branch=0') . $extra;
}
$link = helper::createLink($module, $methodName, "productID=%s" . $param);
}
elseif($module == 'bug' && $method == 'view')
{
+1 -1
View File
@@ -82,7 +82,7 @@ foreach($products as $programID => $programProducts)
if($product->status == 'normal' and $product->PO == $this->app->user->account)
{
$myProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected productName' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' " . $locateTab) . '</li>';
$myProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected productName' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$app->tab'") . '</li>';
if($selected == 'selected') $tabActive = 'myProduct';
+2 -2
View File
@@ -175,7 +175,7 @@ class testtask extends control
}
$this->loadModel('project')->setMenu($this->session->project);
$this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits', "projectID=$projectID");
$this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits', "projectID=$projectID", '', 0, '', false);
}
else
{
@@ -1394,7 +1394,7 @@ class testtask extends control
$this->lang->scrum->menu->qa['subMenu']->testcase['subModule'] = 'testtask';
$this->lang->scrum->menu->qa['subMenu']->testtask['subModule'] = '';
$this->loadModel('project')->setMenu($this->session->project);
$this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits');
$this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits', '', '', 0, '', false);
/* Replace language. */
$project = $this->project->getByID($this->session->project);