From 4024e8da008b97b5d03f4cb7fddd2ca8a6ec2516 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 10 Oct 2025 05:51:04 +0000 Subject: [PATCH] * [task#150565] Add the groupID for stage list. --- module/admin/config.php | 2 +- module/admin/lang/menu.php | 2 +- module/stage/control.php | 16 +++++++++----- module/stage/ui/browse.html.php | 39 +++------------------------------ 4 files changed, 16 insertions(+), 43 deletions(-) diff --git a/module/admin/config.php b/module/admin/config.php index d0fd40143e..7791dc504b 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -8,7 +8,7 @@ if(!isset($config->safe->weak)) $config->safe->weak = '123456,password,12345,123 $config->admin->menuGroup['system'] = array('custom|mode', 'backup', 'cron', 'action|trash', 'admin|xuanxuan', 'setting|xuanxuan', 'admin|license', 'admin|checkweak', 'admin|resetpwdsetting', 'admin|safe', 'cache|setting', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'admin|metriclib', 'ldap', 'custom|libreoffice', 'conference', 'watermark', 'client', 'system|browsebackup', 'system|restorebackup'); $config->admin->menuGroup['company'] = array('dept', 'company', 'user', 'group', 'tutorial'); $config->admin->menuGroup['switch'] = array('admin|setmodule'); -$config->admin->menuGroup['feature'] = array('auditcl', 'stage', 'baseline', 'design', 'custom|flow', 'custom|code', 'custom|percent','custom|estimate', 'custom|hours', 'subject', 'holiday', 'reviewsetting', 'custom|project', 'custom|set', 'custom|product', 'custom|execution', 'custom|required', 'custom|kanban', 'measurement', 'meetingroom', 'custom|browsestoryconcept', 'custom|kanban', 'sqlbuilder', 'report', 'custom|limittaskdate', 'measurement'); +$config->admin->menuGroup['feature'] = array('auditcl', 'stage|settype', 'baseline', 'design', 'custom|flow', 'custom|code', 'custom|percent','custom|estimate', 'custom|hours', 'subject', 'holiday', 'reviewsetting', 'custom|project', 'custom|set', 'custom|product', 'custom|execution', 'custom|required', 'custom|kanban', 'measurement', 'meetingroom', 'custom|browsestoryconcept', 'custom|kanban', 'sqlbuilder', 'report', 'custom|limittaskdate', 'measurement'); $config->admin->menuGroup['message'] = array('mail', 'webhook', 'sms', 'message'); $config->admin->menuGroup['dev'] = array('dev', 'entry', 'editor'); $config->admin->menuGroup['extension'] = array('extension'); diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 56812395b9..e6420f98a8 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -92,7 +92,7 @@ $lang->admin->menuList->feature['tabMenu']['project']['percent'] = array('link' $lang->admin->menuList->feature['tabMenu']['project']['hours'] = array('link' => "{$lang->workingHour}|custom|hours|", 'subModule' => 'holiday', 'links' => array('holiday|browse|', 'custom|hours|')); $lang->admin->menuList->feature['tabMenu']['execution']['execution'] = array('link' => "{$lang->execution->common}|custom|required|module=execution", 'links' => array("custom|execution|"), 'alias' => 'execution', 'exclude' => 'custom-required'); -$lang->admin->menuList->feature['tabMenu']['execution']['stage'] = array('link' => "{$lang->stage->common}|stage|settype|", 'subModule' => 'stage', 'links' => array('stage|browse|')); +$lang->admin->menuList->feature['tabMenu']['execution']['stage'] = array('link' => "{$lang->stage->common}|stage|settype|", 'subModule' => 'stage'); $lang->admin->menuList->feature['tabMenu']['execution']['task'] = array('link' => "{$lang->task->common}|custom|required|module=task", 'links' => array('custom|set|module=task&field=priList', 'custom|limittaskdate|'), 'alias' => 'limittaskdate','exclude' => 'custom-required'); $lang->admin->menuList->feature['tabMenu']['qa']['bug'] = array('link' => "{$lang->bug->common}|custom|required|module=bug", 'links' => array("custom|set|module=bug&field=priList"), 'exclude' => 'custom-required,custom-set'); diff --git a/module/stage/control.php b/module/stage/control.php index b94e917262..b5a84f74f6 100644 --- a/module/stage/control.php +++ b/module/stage/control.php @@ -16,12 +16,13 @@ class stage extends control * 瀑布模型阶段列表页。 * Waterfall model stage list page. * + * @param int $groupID * @param string $orderBy * @param string $type waterfall|waterfallplus * @access public * @return void */ - public function browse(string $orderBy = "id_asc", string $type = 'waterfall') + public function browse(int $groupID = 0, string $orderBy = "id_asc", string $type = 'waterfall') { if($type == 'waterfallplus') $this->locate($this->createLink('stage', 'plusBrowse', "orderBy={$orderBy}&type=waterfallplus")); @@ -29,6 +30,7 @@ class stage extends control $this->view->stages = $this->stage->getStages($orderBy, 0, $type); $this->view->orderBy = $orderBy; $this->view->type = $type; + $this->view->groupID = $groupID; $this->display(); } @@ -58,11 +60,12 @@ class stage extends control * 创建一个阶段。 * Create a stage. * + * @param int $groupID * @param string $type waterfall|waterfallplus * @access public * @return void */ - public function create(string $type = 'waterfall') + public function create(int $groupID = 0, string $type = 'waterfall') { if($_POST) { @@ -74,7 +77,8 @@ class stage extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'load' => true)); } - $this->view->title = $this->lang->stage->common . $this->lang->hyphen . $this->lang->stage->create; + $this->view->title = $this->lang->stage->common . $this->lang->hyphen . $this->lang->stage->create; + $this->view->groupID = $groupID; $this->display(); } @@ -83,11 +87,12 @@ class stage extends control * 批量创建阶段。 * Batch create stages. * + * @param int $groupID * @param string $type waterfall|waterfallplus * @access public * @return void */ - public function batchCreate(string $type = 'waterfall') + public function batchCreate(int $groupID = 0, string $type = 'waterfall') { if($_POST) { @@ -98,7 +103,8 @@ class stage extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'load' => inlink($type == 'waterfall' ? 'browse' : 'plusBrowse', "orderBy=id_asc&type=$type"))); } - $this->view->title = $this->lang->stage->common . $this->lang->hyphen . $this->lang->stage->batchCreate; + $this->view->title = $this->lang->stage->common . $this->lang->hyphen . $this->lang->stage->batchCreate; + $this->view->groupID = $groupID; $this->display(); } diff --git a/module/stage/ui/browse.html.php b/module/stage/ui/browse.html.php index 95917eb281..904bb2bded 100644 --- a/module/stage/ui/browse.html.php +++ b/module/stage/ui/browse.html.php @@ -14,8 +14,8 @@ namespace zin; /* zin: Define the toolbar on main menu. */ $canCreateStage = hasPriv('stage', 'create'); $canbatchCreateStage = hasPriv('stage', 'batchCreate'); -if($canCreateStage) $createItem = array('icon' => 'plus', 'class' => 'primary', 'text' => $lang->stage->create, 'url' => $this->createLink('stage', 'create', "type={$type}"), 'data-toggle' => 'modal'); -if($canbatchCreateStage) $batchCreateItem = array('icon' => 'plus', 'class' => 'primary mr-4', 'text' => $lang->stage->batchCreate, 'url' => $this->createLink('stage', 'batchCreate', "type={$type}")); +if($canCreateStage) $createItem = array('icon' => 'plus', 'class' => 'primary', 'text' => $lang->stage->create, 'url' => $this->createLink('stage', 'create', "groupID={$groupID}&type={$type}"), 'data-toggle' => 'modal'); +if($canbatchCreateStage) $batchCreateItem = array('icon' => 'plus', 'class' => 'primary mr-4', 'text' => $lang->stage->batchCreate, 'url' => $this->createLink('stage', 'batchCreate', "groupID={$groupID}&type={$type}")); div ( setClass('main-col main-content'), @@ -35,39 +35,6 @@ div ) ); -if(hasPriv('stage', 'settype')) -{ - $menuItems[] = li - ( - setClass('menu-item'), - a - ( - set::href(createLink('stage', 'settype')), - $lang->stage->setType - ) - ); -} - -$menuItems[] = li -( - setClass('menu-item'), - a - ( - setClass('active'), - set::href(createLink('stage', 'browse')), - $lang->stage->browse - ) -); - -sidebar -( - div - ( - setClass('cell p-2.5 bg-white'), - menu($menuItems) - ) -); - $tableData = initTableData($stages, $config->stage->dtable->fieldList, $this->stage); dtable ( @@ -75,4 +42,4 @@ dtable set::data($tableData), set::orderBy($orderBy), set::sortLink(createLink('stage', 'browse', "orderBy={name}_{sortType}&type={$type}")) -); \ No newline at end of file +);