From 6d750abaf0e8edb08c795e699f79db51f322dbe1 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 14 Sep 2022 16:37:27 +0800 Subject: [PATCH] * Finish task #68996. --- module/product/control.php | 1 + module/product/view/browse.html.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/product/control.php b/module/product/control.php index ee3d3e1427..72c732df21 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -347,6 +347,7 @@ class product extends control $this->view->storyType = $storyType; $this->view->from = $this->app->tab; $this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'story', $showModule) : array(); + $this->view->project = $this->loadModel('project')->getByID($projectID); $this->display(); } diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 67099b3ebe..e99aeab382 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -208,7 +208,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; $buttonTitle = $lang->execution->linkStoryByPlan; $dataToggle = 'data-toggle="modal"'; } - if(common::hasPriv('projectstory', 'linkStory')) + if(!empty($project->hasProduct) && common::hasPriv('projectstory', 'linkStory')) { $buttonLink = $this->createLink('projectstory', 'linkStory', "project=$projectID"); $buttonTitle = $lang->execution->linkStory;