From 84c62782743dc510304a8063003f37bd7fd1fcc3 Mon Sep 17 00:00:00 2001 From: wangyuting2 <851424971@qq.com> Date: Wed, 3 Aug 2022 13:32:21 +0800 Subject: [PATCH] * Finish task #63288. --- module/bug/view/browse.html.php | 1 + module/build/lang/de.php | 1 - module/build/lang/en.php | 1 - module/build/lang/fr.php | 1 - module/build/lang/vi.php | 1 - module/build/lang/zh-cn.php | 3 -- module/caselib/lang/de.php | 1 - module/caselib/lang/en.php | 1 - module/caselib/lang/fr.php | 1 - module/caselib/lang/vi.php | 1 - module/caselib/lang/zh-cn.php | 1 - module/caselib/view/browse.html.php | 3 +- module/common/model.php | 34 +++++++++++++++++++ module/execution/lang/de.php | 2 ++ module/execution/lang/en.php | 2 ++ module/execution/lang/fr.php | 2 ++ module/execution/lang/vi.php | 2 ++ module/execution/lang/zh-cn.php | 2 ++ module/execution/view/all.html.php | 1 + module/execution/view/build.html.php | 3 +- module/execution/view/task.html.php | 1 + module/product/view/all.html.php | 1 + module/productplan/view/browsebylist.html.php | 1 + module/program/view/browse.html.php | 1 + module/project/lang/de.php | 2 ++ module/project/lang/en.php | 2 ++ module/project/lang/fr.php | 2 ++ module/project/lang/vi.php | 2 ++ module/project/lang/zh-cn.php | 2 ++ module/project/view/browsebycard.html.php | 1 + module/project/view/browsebylist.html.php | 1 + module/project/view/build.html.php | 3 +- module/release/lang/de.php | 1 - module/release/lang/en.php | 1 - module/release/lang/fr.php | 1 - module/release/lang/vi.php | 1 - module/release/lang/zh-cn.php | 1 - module/release/view/browse.html.php | 1 + module/story/lang/de.php | 1 - module/story/lang/en.php | 1 - module/story/lang/fr.php | 1 - module/story/lang/vi.php | 1 - module/story/lang/zh-cn.php | 1 - module/testsuite/control.php | 6 ++-- module/testsuite/lang/de.php | 1 - module/testsuite/lang/en.php | 1 - module/testsuite/lang/fr.php | 1 - module/testsuite/lang/vi.php | 1 - module/testsuite/lang/zh-cn.php | 1 - module/testsuite/view/browse.html.php | 6 ++-- module/testtask/view/browse.html.php | 1 + 51 files changed, 77 insertions(+), 35 deletions(-) diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 8774ed36d9..b3e3e81c65 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -37,6 +37,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
moduleName, $this->methodName); foreach($menus as $menuItem) { diff --git a/module/build/lang/de.php b/module/build/lang/de.php index 57cda9034a..d714465ad7 100644 --- a/module/build/lang/de.php +++ b/module/build/lang/de.php @@ -69,5 +69,4 @@ $lang->build->action->buildopened = '$date, erstellt von $actor $lang->backhome = 'zurück'; -$lang->build->featureBar = array(); $lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/en.php b/module/build/lang/en.php index 8b24223361..73ec7a1d33 100644 --- a/module/build/lang/en.php +++ b/module/build/lang/en.php @@ -69,5 +69,4 @@ $lang->build->action->buildopened = '$date, created by $actor, $lang->backhome = 'back'; -$lang->build->featureBar = array(); $lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/fr.php b/module/build/lang/fr.php index 0b9e940d36..48326670ad 100644 --- a/module/build/lang/fr.php +++ b/module/build/lang/fr.php @@ -69,5 +69,4 @@ $lang->build->action->buildopened = '$date, Build $extra créé $lang->backhome = 'Retour'; -$lang->build->featureBar = array(); $lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/vi.php b/module/build/lang/vi.php index a083e3d0cc..e0080ba5da 100644 --- a/module/build/lang/vi.php +++ b/module/build/lang/vi.php @@ -65,5 +65,4 @@ $lang->build->action->buildopened = '$date, được tạo bởi $actor< $lang->backhome = 'Trở lại'; -$lang->build->featureBar = array(); $lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php index 54c6d8456a..c45863af1a 100644 --- a/module/build/lang/zh-cn.php +++ b/module/build/lang/zh-cn.php @@ -68,6 +68,3 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, 由 $actor 创建版本 $extra。' . "\n"; $lang->backhome = '返回'; - -$lang->build->featureBar = array(); -$lang->build->featureBar['browse']['all'] = '所有版本'; diff --git a/module/caselib/lang/de.php b/module/caselib/lang/de.php index 265cab49f9..d36368dae3 100644 --- a/module/caselib/lang/de.php +++ b/module/caselib/lang/de.php @@ -45,6 +45,5 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Do you want to delete this library?'; $lang->caselib->noModule = '
You have no modules.
Manage it now.
'; -$lang->caselib->featureBar = array(); $lang->caselib->featureBar['browse']['all'] = 'All'; $lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/en.php b/module/caselib/lang/en.php index 265cab49f9..d36368dae3 100644 --- a/module/caselib/lang/en.php +++ b/module/caselib/lang/en.php @@ -45,6 +45,5 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Do you want to delete this library?'; $lang->caselib->noModule = '
You have no modules.
Manage it now.
'; -$lang->caselib->featureBar = array(); $lang->caselib->featureBar['browse']['all'] = 'All'; $lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/fr.php b/module/caselib/lang/fr.php index c7795763d0..0b62e64e5f 100644 --- a/module/caselib/lang/fr.php +++ b/module/caselib/lang/fr.php @@ -45,6 +45,5 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Voulez vous supprimer cette library ?'; $lang->caselib->noModule = "
Vous n'avez aucun modules.
Gérer les modules maintenant.
"; -$lang->caselib->featureBar = array(); $lang->caselib->featureBar['browse']['all'] = 'All'; $lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/vi.php b/module/caselib/lang/vi.php index 250c6056ac..468d4ff3d9 100644 --- a/module/caselib/lang/vi.php +++ b/module/caselib/lang/vi.php @@ -40,6 +40,5 @@ $lang->caselib->legendDesc = 'Mô tả'; $lang->caselib->libraryDelete = 'Bạn có muốn xóa thư viện này?'; $lang->caselib->noModule = '
Chưa có Module.
Quản lý ngay.
'; -$lang->caselib->featureBar = array(); $lang->caselib->featureBar['browse']['all'] = 'All'; $lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/zh-cn.php b/module/caselib/lang/zh-cn.php index 135381b55d..06c5ee8d67 100644 --- a/module/caselib/lang/zh-cn.php +++ b/module/caselib/lang/zh-cn.php @@ -45,6 +45,5 @@ $lang->caselib->legendDesc = '描述'; $lang->caselib->libraryDelete = '您确认要删除该用例库吗?'; $lang->caselib->noModule = '
您现在还没有模块信息
请维护用例库模块
'; -$lang->caselib->featureBar = array(); $lang->caselib->featureBar['browse']['all'] = '所有'; $lang->caselib->featureBar['browse']['wait'] = '待评审'; diff --git a/module/caselib/view/browse.html.php b/module/caselib/view/browse.html.php index 2183f6a916..da0d3bd499 100644 --- a/module/caselib/view/browse.html.php +++ b/module/caselib/view/browse.html.php @@ -40,7 +40,8 @@ js::set('flow', $config->global->flow);
testcase->needReview && empty($config->testcase->forceReview)) unset($lang->caselib->featureBar['wait']); + common::sortFeatureMenu(); + if(!$config->testcase->needReview && empty($config->testcase->forceReview)) unset($lang->caselib->featureBar['browse']['wait']); foreach($lang->caselib->featureBar['browse'] as $featureType => $label) { $activeClass = $browseType == $featureType ? 'btn-active-text' : ''; diff --git a/module/common/model.php b/module/common/model.php index 4f68d398e7..e991e7ee6d 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -3373,6 +3373,40 @@ EOD; return $Parsedown->text($markdown); } + + /** + * Sort featureBar. + * + * @static + * @access public + * @return bool + */ + public static function sortFeatureMenu() + { + global $lang, $app; + + $module = $app->rawModule; + $method = $app->rawMethod; + + /* It will be sorted according to the workflow in the future */ + if(!empty($lang->featureBarSort[$module][$method])) + { + $featureBar = array(); + if(empty($lang->$module->featureBar[$method])) return false; + foreach($lang->$module->featureBar[$method] as $key => $label) + { + foreach($lang->featureBarSort[$module][$method] as $currentKey => $afterKey) + { + if($key == $currentKey) continue; + $featureBar[$method][$key] = $label; + if($key == $afterKey) $featureBar[$method][$currentKey] = $lang->$module->featureBar[$method][$currentKey]; + } + } + $lang->$module->featureBar = $featureBar; + } + + return true; + } } class common extends commonModel diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 627fb63b7f..d7b76b33d7 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -512,6 +512,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = 'Ich bin beteiligt.'; $lang->execution->doingProject = 'Laufende Projekte'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index b230ea3f39..a87ac46f06 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -512,6 +512,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = 'Mine'; $lang->execution->doingProject = 'Ongoing Projects'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index bb12d7782a..df78e79283 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -512,6 +512,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = "J'étais impliqué"; $lang->execution->doingProject = 'Projets en cours'; diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php index c1f02f6280..242f3d7b1a 100644 --- a/module/execution/lang/vi.php +++ b/module/execution/lang/vi.php @@ -418,6 +418,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = 'Tôi tham gia'; $lang->execution->doingProject = 'Hiện trường'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 12477116d0..730eecadd9 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -512,6 +512,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = '所有版本'; + $lang->execution->myExecutions = '我参与的'; $lang->execution->doingProject = '进行中的项目'; diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 2cca80f2ba..512b25aae3 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -48,6 +48,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
+ execution->featureBar['all'] as $key => $label):?> $label";?> {$pager->recTotal}";?> diff --git a/module/execution/view/build.html.php b/module/execution/view/build.html.php index 1e54a870b6..3f2e90bc4b 100644 --- a/module/execution/view/build.html.php +++ b/module/execution/view/build.html.php @@ -16,7 +16,8 @@