From c98f16ac27bf1cd9d70e3cee1609c0f7eff8a43d Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 16 Jan 2024 14:11:59 +0800 Subject: [PATCH] * Fix bug#41258. --- module/datatable/control.php | 3 --- module/datatable/ui/ajaxdisplay.html.php | 11 ----------- module/execution/zen.php | 1 - module/product/js/browse.ui.js | 1 - module/product/ui/browse.html.php | 2 -- module/product/zen.php | 19 ------------------- 6 files changed, 37 deletions(-) diff --git a/module/datatable/control.php b/module/datatable/control.php index 133170783a..ebad8bbb73 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -28,9 +28,6 @@ class datatable extends control $this->app->loadLang($currentModule); $this->app->loadConfig($currentModule); - if($currentModule == 'product' && $currentMethod == 'browse') $this->view->showBranch = $this->loadModel('branch')->showBranch($this->session->product); - if($currentModule == 'projectstory' && $currentMethod == 'story') $this->view->showBranch = $this->loadModel('branch')->showBranch(0, 0, $this->session->project); - $this->view->datatableID = $datatableID; $this->view->moduleName = $moduleName; $this->view->methodName = $methodName; diff --git a/module/datatable/ui/ajaxdisplay.html.php b/module/datatable/ui/ajaxdisplay.html.php index 1443d54df6..cb10262e3d 100644 --- a/module/datatable/ui/ajaxdisplay.html.php +++ b/module/datatable/ui/ajaxdisplay.html.php @@ -56,17 +56,6 @@ form set::value($showAllModule) ) ) : null, - !empty($showBranch) ? formGroup - ( - set::label($lang->datatable->showBranch), - radiolist - ( - set::name('showBranch'), - set::inline(true), - set::items($lang->datatable->showBranchList), - set::value(isset($config->$currentModule->$currentMethod->showBranch) ? $config->$currentModule->$currentMethod->showBranch : 1) - ) - ) : null, input ( set('class', 'hidden'), diff --git a/module/execution/zen.php b/module/execution/zen.php index 19daaeb1f7..8ab05d46c5 100644 --- a/module/execution/zen.php +++ b/module/execution/zen.php @@ -418,7 +418,6 @@ class executionZen extends execution $this->view->moduleTree = $moduleTree; $this->view->moduleID = $moduleID; $this->view->moduleName = $moduleID ? $tree->name : $this->lang->tree->all; - $this->view->showBranch = $this->loadModel('branch')->showBranch($productID); } /** diff --git a/module/product/js/browse.ui.js b/module/product/js/browse.ui.js index 94df202703..208d0c7c98 100644 --- a/module/product/js/browse.ui.js +++ b/module/product/js/browse.ui.js @@ -62,7 +62,6 @@ window.renderCell = function(result, info) { const story = info.row.data; let html = ''; - if(showBranch) html += "" + story.branch + " "; if(typeof modulePairs[story.rawModule] != 'undefined') html += "" + modulePairs[story.rawModule] + " "; if(story.parent > 0) html += "" + (storyType == 'requirement' ? 'SR' : childrenAB) + " "; if(html) result.unshift({html}); diff --git a/module/product/ui/browse.html.php b/module/product/ui/browse.html.php index d56a3fdb1e..d15bfbdd40 100644 --- a/module/product/ui/browse.html.php +++ b/module/product/ui/browse.html.php @@ -20,7 +20,6 @@ $isProjectStory = $this->app->rawModule == 'projectstory'; $projectHasProduct = $isProjectStory && !empty($project->hasProduct); $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; $storyBrowseType = $this->session->storyBrowseType; -$branchType = $showBranch ? $product->type : ''; $storyProductIds = array(); foreach($stories as $story) $storyProductIds[$story->product] = $story->product; @@ -302,7 +301,6 @@ data('storyBrowseType', $storyBrowseType); jsVar('childrenAB', $lang->story->childrenAB); jsVar('projectID', $projectID); jsVar('modulePairs', $modulePairs); -jsVar('showBranch', $showBranch); jsVar('storyType', $storyType); jsVar('checkedSummary', $storyType == 'story' ? $lang->product->checkedSRSummary : $lang->product->checkedURSummary); diff --git a/module/product/zen.php b/module/product/zen.php index 116a89cd1f..d1e3544849 100644 --- a/module/product/zen.php +++ b/module/product/zen.php @@ -919,24 +919,6 @@ class productZen extends product return $this->tree->getTreeMenu($productID, 'story', 0, $userFunc, $extra, $branch, "¶m=$param&storyType=$storyType"); } - /** - * 是否展示分支。 - * Can show the branch. - * - * @param int $projectID - * @param int $productID - * @param string $storyType - * @param bool $isProjectStory - * @access protected - * @return bool - */ - protected function canShowBranch(int $projectID, int $productID, string $storyType, bool $isProjectStory): bool - { - if($isProjectStory && $storyType == 'story') return $this->loadModel('branch')->showBranch($productID, 0, $projectID); - - return $this->loadModel('branch')->showBranch($productID); - } - /** * 获取项目下的产品列表。 * Get products of the project. @@ -1488,7 +1470,6 @@ class productZen extends product $this->view->branch = $branch; $this->view->branchID = $branchID; $this->view->modulePairs = !empty($showModule) ? $this->tree->getModulePairs($productID, 'story', $showModule) : array(); - $this->view->showBranch = $this->canShowBranch($projectID, $productID, $storyType, $isProjectStory); $this->view->branchOptions = (empty($product) && $isProjectStory) ? $this->getBranchOptions($projectProducts, $projectID) : array($productID => $branchOpt); $this->view->branchTagOption = $branchTagOpt; $this->view->projectProducts = $projectProducts;