diff --git a/module/product/ui/browse.html.php b/module/product/ui/browse.html.php index cbeb9c9b81..443a4b9655 100644 --- a/module/product/ui/browse.html.php +++ b/module/product/ui/browse.html.php @@ -190,14 +190,14 @@ foreach($stories as $story) { $story->rawModule = $story->module; $options['branches'] = zget($branchOptions, $story->product, array()); - $data[] = $this->story->formatStoryForList($story, $options); + $data[] = $this->story->formatStoryForList($story, $options, $storyType); if(!isset($story->children)) continue; /* Children. */ foreach($story->children as $key => $child) { $child->rawModule = $child->module; - $data[] = $this->story->formatStoryForList($child, $options); + $data[] = $this->story->formatStoryForList($child, $options, $storyType); } } diff --git a/module/story/model.php b/module/story/model.php index f755ace9ff..e7aa4714f4 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4373,12 +4373,13 @@ class storyModel extends model * * @param object $story * @param array $options + * @param string $storyType sting|requirement * @access public * @return object */ - public function formatStoryForList(object $story, array $options = array()): object + public function formatStoryForList(object $story, array $options = array(), string $storyType = 'story'): object { - $story->actions = $this->buildActionButtonList($story, 'browse', zget($options, 'execution', null)); + $story->actions = $this->buildActionButtonList($story, 'browse', zget($options, 'execution', null), $storyType); $story->estimate = $story->estimate . $this->config->hourUnit; $story->taskCount = zget(zget($options, 'storyTasks', array()), $story->id, 0); diff --git a/module/story/tao.php b/module/story/tao.php index 045cf62045..ba9553bf42 100644 --- a/module/story/tao.php +++ b/module/story/tao.php @@ -1578,6 +1578,15 @@ class storyTao extends storyModel $tutorialMode = commonModel::isTutorialMode(); + if($storyType == 'requirement') + { + $this->lang->story->changeTip = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->changeTip); + $this->lang->story->reviewTip['active'] = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->reviewTip['active']); + $this->lang->story->reviewTip['notReviewer'] = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->reviewTip['notReviewer']); + $this->lang->story->recallTip['actived'] = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->recallTip['actived']); + $this->lang->story->subDivideTip['notWait'] = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->subDivideTip['notWait']); + } + static $taskGroups = array(); $actSubmitreview = array(); @@ -1620,9 +1629,18 @@ class storyTao extends storyModel $title = $this->lang->story->review; if(!$canReview && $story->status != 'closed') { - if($story->status == 'active') $title = $this->lang->story->reviewTip['active']; - if($storyReviewer && in_array($this->app->user->account, $storyReviewer)) $title = $this->lang->story->reviewTip['reviewed']; if($storyReviewer && !in_array($this->app->user->account, $storyReviewer)) $title = $this->lang->story->reviewTip['notReviewer']; + if($story->status == 'active') + { + if($storyReviewer && in_array($this->app->user->account, $storyReviewer)) + { + $title = $this->lang->story->reviewTip['reviewed']; + } + else + { + $title = $this->lang->story->reviewTip['active']; + } + } } $actReview = array('name' => 'review', 'url' => $canReview ? $reviewLink : null, 'hint' => $title, 'disabled' => !$canReview);