* [task#150565] Add the groupID for stage list.

This commit is contained in:
xieqiyu
2025-10-10 05:51:04 +00:00
parent 43135d9b09
commit 4024e8da00
4 changed files with 16 additions and 43 deletions
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -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');
+11 -5
View File
@@ -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();
}
+3 -36
View File
@@ -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}"))
);
);