From 6f272700beb34b468057841a84e043298f92df66 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 23 Nov 2022 00:48:31 +0000 Subject: [PATCH] * Fix bug #23269. --- module/product/js/browse.js | 5 +++++ module/product/lang/de.php | 1 + module/product/lang/en.php | 1 + module/product/lang/fr.php | 1 + module/product/lang/zh-cn.php | 1 + module/product/view/browse.html.php | 18 ++++++++++++++---- 6 files changed, 23 insertions(+), 4 deletions(-) diff --git a/module/product/js/browse.js b/module/product/js/browse.js index c52126edd9..1f3eeabaa8 100644 --- a/module/product/js/browse.js +++ b/module/product/js/browse.js @@ -27,6 +27,11 @@ $(function() } }) + $('#reviewItem ~ ul > li').on('click', function() + { + if(storyString !== '') alert(reviewStory); + }); + $(document).on('click', '.story-toggle', function(e) { var $toggle = $(this); diff --git a/module/product/lang/de.php b/module/product/lang/de.php index aade1f1b1d..956a5be528 100644 --- a/module/product/lang/de.php +++ b/module/product/lang/de.php @@ -101,6 +101,7 @@ $lang->product->changeLineError = "Products already exist under the product $lang->product->programEmpty = 'Program should not be empty!'; $lang->product->nameIsDuplicate = "『%s』 product line already exists, please reset!"; $lang->product->nameIsDuplicated = "Product Line『%s』 exists. Go to Admin->System->Data->Recycle Bin to restore it, if you are sure it is deleted."; +$lang->product->reviewStory = 'You are not a reviewer for needs " %s %s", and cannot review. This operation has been filtered'; $lang->product->id = 'ID'; $lang->product->program = "Program"; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index ebba2b6f43..c227b21f3f 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -101,6 +101,7 @@ $lang->product->changeLineError = "Products already exist under the product $lang->product->programEmpty = 'Program should not be empty!'; $lang->product->nameIsDuplicate = "『%s』 product line already exists, please reset!"; $lang->product->nameIsDuplicated = "Product Line『%s』 exists. Go to Admin->System->Data->Recycle Bin to restore it, if you are sure it is deleted."; +$lang->product->reviewStory = 'You are not a reviewer for needs " %s %s", and cannot review. This operation has been filtered'; $lang->product->id = 'ID'; $lang->product->program = "Program"; diff --git a/module/product/lang/fr.php b/module/product/lang/fr.php index 1869910653..ceca43916b 100644 --- a/module/product/lang/fr.php +++ b/module/product/lang/fr.php @@ -101,6 +101,7 @@ $lang->product->changeLineError = "Products already exist under the product $lang->product->programEmpty = 'Program should not be empty!'; $lang->product->nameIsDuplicate = "『%s』 product line already exists, please reset!"; $lang->product->nameIsDuplicated = "Product Line『%s』 exists. Go to Admin->System->Data->Recycle Bin to restore it, if you are sure it is deleted."; +$lang->product->reviewStory = 'You are not a reviewer for needs " %s %s", and cannot review. This operation has been filtered'; $lang->product->id = 'ID'; $lang->product->program = "Program"; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index fc6a52dfef..7ddc003b3c 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -101,6 +101,7 @@ $lang->product->changeLineError = "产品线下已有产品,不可修改 $lang->product->programEmpty = '项目集不能为空'; $lang->product->nameIsDuplicate = "『%s』产品线已经存在,请重新设置!"; $lang->product->nameIsDuplicated = "产品线已经有『%s』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。"; +$lang->product->reviewStory = '您不是研发需求"%s %s"的评审人,无法评审,本次操作已被过滤。'; $lang->product->id = '编号'; $lang->product->program = "所属项目集"; diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 49ac4d4a5b..deaa183c43 100755 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -401,10 +401,16 @@ js::set('vision', $this->config->vision);
product] = $story->product; - $storyProductID = count($storyProductIds) > 1 ? 0 : $productID; - $disabled = $canBatchEdit ? '' : "disabled='disabled'"; - $actionLink = $this->createLink('story', 'batchEdit', "productID=$storyProductID&projectID=$projectID&branch=$branch&storyType=$storyType"); + $storyString = ''; + foreach($stories as $story) + { + $storyProductIds[$story->product] = $story->product; + if(!in_array($this->app->user->account, $story->reviewer)) $storyString .= $story->title . ','; + } + $reviewStoryTips = sprintf($lang->product->reviewStory, '', $storyString); + $storyProductID = count($storyProductIds) > 1 ? 0 : $productID; + $disabled = $canBatchEdit ? '' : "disabled='disabled'"; + $actionLink = $this->createLink('story', 'batchEdit', "productID=$storyProductID&projectID=$projectID&branch=$branch&storyType=$storyType"); ?> edit, "data-form-action='$actionLink' $disabled");?> @@ -694,6 +700,10 @@ js::set('vision', $this->config->vision);
+