* Fix bug#41258.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -62,7 +62,6 @@ window.renderCell = function(result, info)
|
||||
{
|
||||
const story = info.row.data;
|
||||
let html = '';
|
||||
if(showBranch) html += "<span class='label gray-pale rounded-xl clip'>" + story.branch + "</span> ";
|
||||
if(typeof modulePairs[story.rawModule] != 'undefined') html += "<span class='label gray-pale rounded-xl clip'>" + modulePairs[story.rawModule] + "</span> ";
|
||||
if(story.parent > 0) html += "<span class='label gray-pale rounded-xl clip'>" + (storyType == 'requirement' ? 'SR' : childrenAB) + "</span> ";
|
||||
if(html) result.unshift({html});
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user