This commit is contained in:
孙华伟
2022-02-25 13:37:32 +08:00
parent 0067119fbe
commit 68ef9809dd
2 changed files with 3 additions and 5 deletions

View File

@@ -815,9 +815,7 @@ class execution extends control
$showModule = !empty($this->config->datatable->executionStory->showModule) ? $this->config->datatable->executionStory->showModule : '';
$modulePairs = $showModule ? $this->tree->getModulePairs($type == 'byproduct' ? $param : 0, 'story', $showModule) : array();
$isAllProduct = true;
if($this->cookie->storyProductParam or $this->cookie->storyModuleParam or $this->cookie->storyBranchParam) $isAllProduct = false;
/* Assign. */
$this->view->title = $title;
$this->view->position = $position;
$this->view->productID = $productID;
@@ -829,7 +827,7 @@ class execution extends control
$this->view->orderBy = $orderBy;
$this->view->type = $this->session->executionStoryBrowseType;
$this->view->param = $param;
$this->view->isAllProduct = $isAllProduct;
$this->view->isAllProduct = ($this->cookie->storyProductParam or $this->cookie->storyModuleParam or $this->cookie->storyBranchParam) ? false : true;
$this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($executionID, 0, array('treeModel', 'createStoryLink'));
$this->view->modulePairs = $modulePairs;
$this->view->tabID = 'story';

View File

@@ -86,7 +86,7 @@
if($common::hasPriv('story', 'create') and common::hasPriv('story', 'batchCreate'))
{
if(!$isAllProduct or count($products) == 1) echo "<button type='button' class='btn btn-secondary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
if(!($isAllProduct and count($products) > 1)) echo "<button type='button' class='btn btn-secondary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
echo "<ul class='dropdown-menu pull-right'>";
echo '<li>' . html::a($createStoryLink, $lang->story->create, '', "data-app='execution'") . '</li>';
echo '<li>' . html::a($batchCreateLink, $lang->story->batchCreate, '', "data-app='execution'") . '</li>';