From 5bce51622bbf718d2749740316e90174e0e58a06 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Mon, 7 Sep 2020 15:35:54 +0800 Subject: [PATCH] * Adjust estimate unit settings. --- config/zentaopms.php | 36 +++++++++++------------ module/custom/view/estimate.html.php | 21 +++++-------- module/workestimation/view/index.html.php | 6 +++- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index c91d33a7d4..3d9c507e50 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -85,29 +85,29 @@ $config->storyCommonList['vi'][0] = 'Câu chuyện'; $config->storyCommonList['vi'][1] = 'Câu chuyện'; /* Story common list. */ -$config->hourPointCommonList['zh-cn'][0] = '工时'; -$config->hourPointCommonList['zh-cn'][1] = '故事点'; -$config->hourPointCommonList['zh-cn'][2] = '功能点'; +$config->hourPointCommonList['zh-cn'][0] = '故事点'; +$config->hourPointCommonList['zh-cn'][1] = '功能点'; +$config->hourPointCommonList['zh-cn'][2] = '代码行'; -$config->hourPointCommonList['zh-tw'][0] = '工时'; -$config->hourPointCommonList['zh-tw'][1] = '故事点'; -$config->hourPointCommonList['zh-tw'][2] = '功能点'; +$config->hourPointCommonList['zh-tw'][0] = '故事点'; +$config->hourPointCommonList['zh-tw'][1] = '功能点'; +$config->hourPointCommonList['zh-tw'][2] = '代碼行'; -$config->hourPointCommonList['en'][0] = 'hour'; -$config->hourPointCommonList['en'][1] = 'story point'; -$config->hourPointCommonList['en'][2] = 'function point'; +$config->hourPointCommonList['en'][0] = 'story point'; +$config->hourPointCommonList['en'][1] = 'function point'; +$config->hourPointCommonList['en'][2] = 'loc point'; -$config->hourPointCommonList['de'][0] = 'hour'; -$config->hourPointCommonList['de'][1] = 'story point'; -$config->hourPointCommonList['de'][2] = 'function point'; +$config->hourPointCommonList['de'][0] = 'story point'; +$config->hourPointCommonList['de'][1] = 'function point'; +$config->hourPointCommonList['de'][2] = 'loc point'; -$config->hourPointCommonList['fr'][0] = 'hour'; -$config->hourPointCommonList['fr'][1] = 'story point'; -$config->hourPointCommonList['fr'][2] = 'function point'; +$config->hourPointCommonList['fr'][0] = 'story point'; +$config->hourPointCommonList['fr'][1] = 'function point'; +$config->hourPointCommonList['fr'][2] = 'loc point'; -$config->hourPointCommonList['vi'][0] = 'giờ'; -$config->hourPointCommonList['vi'][1] = 'điểm'; -$config->hourPointCommonList['vi'][2] = 'function point'; +$config->hourPointCommonList['vi'][0] = 'điểm'; +$config->hourPointCommonList['vi'][1] = 'function point'; +$config->hourPointCommonList['vi'][2] = 'loc point'; /* Plan common list. */ $config->planCommonList['zh-cn'][0] = '计划'; diff --git a/module/custom/view/estimate.html.php b/module/custom/view/estimate.html.php index cba9a42443..27b1654642 100644 --- a/module/custom/view/estimate.html.php +++ b/module/custom/view/estimate.html.php @@ -28,14 +28,9 @@ $lang->custom->system[] = 'estimate'; custom->unitList['manhour'] . $lang->custom->unitList['loc']; - } - else - { - echo $lang->custom->unitList['efficiency'] . $lang->hourCommon; - } + if($unit == 0) echo $lang->custom->unitList['efficiency'] . $lang->custom->conceptOptions->hourPoint[0]; + if($unit == 1) echo $lang->custom->unitList['efficiency'] . $lang->custom->conceptOptions->hourPoint[1]; + if($unit == 2) echo $lang->custom->unitList['manhour'] . $lang->custom->unitList['loc']; ?> @@ -85,8 +80,8 @@ $lang->custom->system[] = 'estimate'; -custom->conceptOptions->hourPoint[1]);?> -custom->conceptOptions->hourPoint[2]);?> +custom->conceptOptions->hourPoint[0]);?> +custom->conceptOptions->hourPoint[1]);?> custom->unitList['loc']);?> custom->unitList['efficiency']);?> custom->unitList['manhour']);?> @@ -94,9 +89,9 @@ $lang->custom->system[] = 'estimate'; $('#estimateTab').addClass('btn-active-text'); $('input[name="hourPoint"]').change(function() { - if($(this).val() == 1) $('#efficiency + span').text(efficiency + storyPoint); - if($(this).val() == 2) $('#efficiency + span').text(efficiency + functionPoint); - if($(this).val() == 3) $('#efficiency + span').text(manhour + loc); + if($(this).val() == 0) $('#efficiency + span').text(efficiency + storyPoint); + if($(this).val() == 1) $('#efficiency + span').text(efficiency + functionPoint); + if($(this).val() == 2) $('#efficiency + span').text(manhour + loc); }) diff --git a/module/workestimation/view/index.html.php b/module/workestimation/view/index.html.php index bbd2fe84dd..b55e9ef9c3 100644 --- a/module/workestimation/view/index.html.php +++ b/module/workestimation/view/index.html.php @@ -38,7 +38,11 @@
- custom->unitList['manhour'] . $lang->custom->unitList['loc'] : $lang->custom->unitList['efficiency'] . $lang->hourCommon;?> + custom->unitList['efficiency'] . $lang->hourCommon; + if($hourPoint == 1) echo $lang->custom->unitList['efficiency'] . $lang->hourCommon; + if($hourPoint == 2) echo $lang->custom->unitList['manhour'] . $lang->custom->unitList['loc']; + ?>