diff --git a/module/custom/control.php b/module/custom/control.php index 359ede3447..e3c49ee477 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -647,8 +647,14 @@ class custom extends control $this->app->loadLang('upgrade'); - $hasMoreData = $this->custom->hasMoreData() ? 'yes' : 'no'; - $this->lang->custom->changeModeContentTips['lean'] = $this->lang->custom->hasMoreData[$hasMoreData]; + $this->lang->custom->changeModeContentTips['lean'] = $this->lang->custom->hasMoreData['yes']; + + $counts = $this->custom->getCounts(); + foreach($counts as $function => $count) + { + if($count) unset($this->lang->custom->needClosedFunctions[$function]); + } + if(!empty($this->lang->custom->needClosedFunctions)) $this->lang->custom->changeModeContentTips['lean'] = sprintf($this->lang->custom->hasMoreData['no'], implode($this->lang->comma, $this->lang->custom->needClosedFunctions)); $this->view->title = $this->lang->custom->mode; $this->view->position[] = $this->lang->custom->common; diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index 48db02f85a..43a1ff02c9 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -245,12 +245,16 @@ $lang->custom->saveFail = 'Failed to save!'; $lang->custom->page = ' Page'; $lang->custom->changeModeTips = 'Historical deleted data does not participate in the data merging process. After switching the mode, it will not support restoration. Please know.'; -$lang->custom->changeModeTitleTips['new'] = 'Are you sure you want to switch to the new mode?'; -$lang->custom->changeModeTitleTips['lean'] = 'Are you sure you want to switch to the lean mode?'; +$lang->custom->changeModeTitleTips['new'] = 'Please double confirm to switch to New mode.'; +$lang->custom->changeModeTitleTips['lean'] = 'Please double confirm to switch to Lean mode.'; $lang->custom->changeModeContentTips['new'] = 'The new mode is suitable for medium and large R&D teams. After switching the new mode, the system will enable functions such as program sets.'; $lang->custom->hasMoreData['yes'] = 'After switching to lean mode, the system will close the program function, and the related functions of the program will be hidden.'; -$lang->custom->hasMoreData['no'] = 'After switching to lean mode, the system will close functions such as program sets, waterfall projects, asset libraries and user requirements.'; +$lang->custom->hasMoreData['no'] = 'After switching to lean mode, the system will close functions such as program sets, %s.'; + +$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall'; +$lang->custom->needClosedFunctions['URStory'] = 'User Story'; +if($config->edition == 'max') $lang->custom->needClosedFunctions['assetLib'] = 'Assetlib'; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; @@ -292,4 +296,4 @@ $lang->custom->scrum->setConcept = 'Set concept'; $lang->custom->reviewRules['allpass'] = 'All passed'; $lang->custom->reviewRules['halfpass'] = 'More than half passed'; -$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set'; \ No newline at end of file +$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 62bc5dc392..b6f2b641b3 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -245,12 +245,16 @@ $lang->custom->saveFail = 'Failed to save!'; $lang->custom->page = ' Page'; $lang->custom->changeModeTips = 'Historical deleted data does not participate in the data merging process. After switching the mode, it will not support restoration. Please know.'; -$lang->custom->changeModeTitleTips['new'] = 'Are you sure you want to switch to the new mode?'; -$lang->custom->changeModeTitleTips['lean'] = 'Are you sure you want to switch to the lean mode?'; +$lang->custom->changeModeTitleTips['new'] = 'Please double confirm to switch to New mode.'; +$lang->custom->changeModeTitleTips['lean'] = 'Please double confirm to switch to Lean mode.'; $lang->custom->changeModeContentTips['new'] = 'The new mode is suitable for medium and large R&D teams. After switching the new mode, the system will enable functions such as program sets.'; $lang->custom->hasMoreData['yes'] = 'After switching to lean mode, the system will close the program function, and the related functions of the program will be hidden.'; -$lang->custom->hasMoreData['no'] = 'After switching to lean mode, the system will close functions such as program sets, waterfall projects, asset libraries and user requirements.'; +$lang->custom->hasMoreData['no'] = 'After switching to lean mode, the system will close functions such as program sets, %s.'; + +$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall'; +$lang->custom->needClosedFunctions['URStory'] = 'User Story'; +if($config->edition == 'max') $lang->custom->needClosedFunctions['assetLib'] = 'Assetlib'; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; @@ -292,4 +296,4 @@ $lang->custom->scrum->setConcept = 'Set concept'; $lang->custom->reviewRules['allpass'] = 'All passed'; $lang->custom->reviewRules['halfpass'] = 'More than half passed'; -$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set'; \ No newline at end of file +$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set'; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 1c68cf073c..7297b77d29 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -245,12 +245,16 @@ $lang->custom->saveFail = 'Echec de la sauvegarde !'; $lang->custom->page = ' Page'; $lang->custom->changeModeTips = 'Historical deleted data does not participate in the data merging process. After switching the mode, it will not support restoration. Please know.'; -$lang->custom->changeModeTitleTips['new'] = 'Are you sure you want to switch to the new mode?'; -$lang->custom->changeModeTitleTips['lean'] = 'Are you sure you want to switch to the lean mode?'; +$lang->custom->changeModeTitleTips['new'] = 'Please double confirm to switch to New mode.'; +$lang->custom->changeModeTitleTips['lean'] = 'Please double confirm to switch to Lean mode.'; $lang->custom->changeModeContentTips['new'] = 'The new mode is suitable for medium and large R&D teams. After switching the new mode, the system will enable functions such as program sets.'; $lang->custom->hasMoreData['yes'] = 'After switching to lean mode, the system will close the program function, and the related functions of the program will be hidden.'; -$lang->custom->hasMoreData['no'] = 'After switching to lean mode, the system will close functions such as program sets, waterfall projects, asset libraries and user requirements.'; +$lang->custom->hasMoreData['no'] = 'After switching to lean mode, the system will close functions such as program sets, %s.'; + +$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall'; +$lang->custom->needClosedFunctions['URStory'] = 'User Story'; +if($config->edition == 'max') $lang->custom->needClosedFunctions['assetLib'] = 'Assetlib'; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; @@ -292,4 +296,4 @@ $lang->custom->scrum->setConcept = 'Set concept'; $lang->custom->reviewRules['allpass'] = 'All passed'; $lang->custom->reviewRules['halfpass'] = 'More than half passed'; -$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set'; \ No newline at end of file +$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index f0cbf982a1..a93604106b 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -250,7 +250,11 @@ $lang->custom->changeModeTitleTips['lean'] = '您确定要切换到迅捷模式 $lang->custom->changeModeContentTips['new'] = '综合模式适用于中大型研发团队,切换综合模式后,系统将启用项目集等功能。'; $lang->custom->hasMoreData['yes'] = '切换到迅捷模式后,系统将关闭项目集功能,项目集的相关功能将会被隐藏。'; -$lang->custom->hasMoreData['no'] = '切换到迅捷模式后,系统将关闭项目集、瀑布项目、资产库、用户需求等功能。'; +$lang->custom->hasMoreData['no'] = '切换到迅捷模式后,系统将关闭项目集,%s等功能。'; + +$lang->custom->needClosedFunctions['waterfall'] = '瀑布项目'; +$lang->custom->needClosedFunctions['URStory'] = '用户需求'; +if($config->edition == 'max') $lang->custom->needClosedFunctions['assetLib'] = '资产库'; $lang->custom->scoreStatus[1] = '开启'; $lang->custom->scoreStatus[0] = '关闭'; @@ -292,4 +296,4 @@ $lang->custom->scrum->setConcept = '设置项目概念'; $lang->custom->reviewRules['allpass'] = '全部通过通过'; $lang->custom->reviewRules['halfpass'] = '半数以上通过通过'; -$lang->custom->switchModeHelper = '请选择一个默认项目集,后续在系统中新增的数据将关联在默认项目集下'; \ No newline at end of file +$lang->custom->switchModeHelper = '请选择一个默认项目集,后续在系统中新增的数据将关联在默认项目集下'; diff --git a/module/custom/model.php b/module/custom/model.php index 5e379719aa..9f70f7cd9b 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -818,19 +818,18 @@ class customModel extends model } /** - * Check for waterfall, assetLib, URStory data in new mode. + * Get waterfall, assetLib, URStory counts. * * @access public - * @return bool + * @return array */ - public function hasMoreData() + public function getCounts() { - $assetLibCount = 0; - if($this->config->edition == 'max') $assetLibCount = $this->dao->select('COUNT(*) AS assetLibCount')->from(TABLE_ASSETLIB)->where('deleted')->ne('0')->fetch('assetLibCount'); + $counts = array(); + $counts['waterfall'] = $this->dao->select('COUNT(*) AS waterfallCount')->from(TABLE_PROJECT)->where('model')->eq('waterfall')->andWhere('deleted')->eq('0')->fetch('waterfallCount'); + $counts['URStory'] = $this->dao->select('COUNT(*) AS URStoryCount')->from(TABLE_STORY)->where('type')->eq('requirement')->andWhere('deleted')->eq('0')->fetch('URStoryCount'); + if($this->config->edition == 'max') $count['assetLib'] = $this->dao->select('COUNT(*) AS assetLibCount')->from(TABLE_ASSETLIB)->where('deleted')->eq('0')->fetch('assetLibCount'); - $waterfallCount = $this->dao->select('COUNT(*) AS waterfallCount')->from(TABLE_PROJECT)->where('model')->eq('waterfall')->andWhere('deleted')->ne('0')->fetch('waterfallCount'); - $URStoryCount = $this->dao->select('COUNT(*) AS URStoryCount')->from(TABLE_STORY)->where('type')->eq('requirement')->andWhere('deleted')->ne('0')->fetch('URStoryCount'); - - return $waterfallCount || $assetLibCount || $URStoryCount; + return $counts; } } diff --git a/module/index/js/index.js b/module/index/js/index.js index 9354e04071..d46dab6ee4 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -26,7 +26,7 @@ url: manualUrl || $helpLink.attr('href'), external: true, text: manualText || $helpLink.text(), - appUrl: config.webRoot + '#app=help' + appUrl: config.webRoot + '#app=help' }; var $menuMainNav = $('#menuMainNav').empty(); window.appsMenuItems.forEach(function(item) diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index 0a9daea551..17feb11ba9 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -100,7 +100,7 @@ $lang->my->executionLink = '执行默认着陆页'; $lang->my->programLinkList = array(); $lang->my->programLinkList['program-browse'] = '默认进入项目集列表,可以查看所有的项目集'; $lang->my->programLinkList['program-project'] = '默认进入最近一个项目集的项目列表,可以查看当前项目集下所有项目'; -$lang->my->programLinkList['program-kanban'] = '默认进入项目集看板,可以可视化的查看到所有项目集的进展情况'; +$lang->my->programLinkList['program-kanban'] = '默认进入项目集看板,可以可视化的查看到所有项目集的进展情况'; $lang->my->productLinkList = array(); $lang->my->productLinkList['product-index'] = '默认进入产品主页,可以了解公司整体的产品状况'; @@ -113,7 +113,7 @@ $lang->my->projectLinkList = array(); $lang->my->projectLinkList['project-browse'] = '默认进入项目列表,可以查看所有的项目'; $lang->my->projectLinkList['project-execution'] = '默认进入项目下所有执行列表,查看所有执行信息'; $lang->my->projectLinkList['project-index'] = '默认进入最近一个项目仪表盘,可以查看当前项目概况'; -$lang->my->projectLinkList['project-kanban'] = '默认进入项目看板,可以可视化的查看到所有项目的进展情况'; +$lang->my->projectLinkList['project-kanban'] = '默认进入项目看板,可以可视化的查看到所有项目的进展情况'; $lang->my->executionLinkList = array(); $lang->my->executionLinkList['execution-all'] = '默认进入执行列表,可以查看所有的执行';