+ custom->setHours;?>
+ custom->setWeekend;?>
+ createLink('holiday', 'browse'), $lang->custom->setHoliday);?>
+
+
+
+
+
+
+
+
+
+diff --git a/module/admin/config.php b/module/admin/config.php index 38d2b8494c..6a4ce7c360 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -10,7 +10,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', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice', 'conference', 'client'); $config->admin->menuGroup['user'] = array('dept', 'company', 'user', 'group'); $config->admin->menuGroup['switch'] = array('admin|setmodule'); -$config->admin->menuGroup['model'] = array('auditcl', 'stage', 'design', 'cmcl', 'reviewcl', 'custom|required', 'custom|set', 'custom|flow', 'custom|code', 'custom|estimate', 'subject', 'process', 'activity', 'zoutput', 'classify'); +$config->admin->menuGroup['model'] = array('auditcl', 'stage', 'design', 'cmcl', 'reviewcl', 'custom|required', 'custom|set', 'custom|flow', 'custom|code', 'custom|estimate', 'custom|hours', 'subject', 'process', 'activity', 'zoutput', 'classify'); $config->admin->menuGroup['feature'] = array('custom|set', 'custom|product', 'custom|execution', 'custom|required', 'custom|kanban', 'approvalflow', 'measurement', 'meetingroom', 'custom|browsestoryconcept', 'custom|kanban', 'sqlbuilder', 'report'); $config->admin->menuGroup['template'] = array('custom|set', 'baseline'); $config->admin->menuGroup['message'] = array('mail', 'webhook', 'sms', 'message'); @@ -84,9 +84,11 @@ $config->admin->helpURL['extension'] = 'https://www.zentao.net/book/zentaopms/53 $config->admin->helpURL['dev'] = 'https://www.zentao.net/book/zentaopms/537.html'; $config->admin->helpURL['convert'] = 'https://www.zentao.net/book/zentaopms/656.html'; -$config->admin->navsGroup['my'] = ',todo,block,'; -$config->admin->navsGroup['product'] = ',product,story,productplan,release,'; -$config->admin->navsGroup['execution'] = ',execution,task,'; -$config->admin->navsGroup['project'] = ',project,story,'; -$config->admin->navsGroup['qa'] = ',bug,testcase,testsuite,testtask,testreport,caselib,'; +$config->admin->navsGroup['feature']['my'] = ',todo,block,'; +$config->admin->navsGroup['feature']['product'] = ',product,story,productplan,release,'; +$config->admin->navsGroup['feature']['project'] = ',project,'; +$config->admin->navsGroup['feature']['execution'] = ',execution,task,'; +$config->admin->navsGroup['feature']['project'] = ',project,story,'; +$config->admin->navsGroup['feature']['qa'] = ',bug,testcase,testsuite,testtask,testreport,caselib,'; +$config->admin->navsGroup['model']['common'] = ',project,build,issue,risk,opportunity,nc,'; if($config->vision == 'lite') $config->admin->navsGroup['my'] .= 'task,'; diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 16271276d9..b580d21f30 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -75,7 +75,7 @@ $lang->admin->menuList->switch['subMenu']['setmodule'] = array('link' => "{$lang $lang->admin->menuList->switch['menuOrder']['5'] = 'setmodule'; -$lang->admin->menuList->model['subMenu']['common'] = array('link' => "{$lang->globalSetting}|custom|required|module=project", 'subModule' => 'custom'); +$lang->admin->menuList->model['subMenu']['common'] = array('link' => "{$lang->globalSetting}|custom|required|module=project", 'subModule' => 'custom,subject'); $lang->admin->menuList->model['subMenu']['scrum'] = array('link' => "{$lang->scrumModel}|auditcl|scrumbrowse|", 'subModule' => 'auditcl'); $lang->admin->menuList->model['subMenu']['waterfall'] = array('link' => "{$lang->waterfallModel}|stage|settype|", 'subModule' => 'stage'); @@ -83,7 +83,18 @@ $lang->admin->menuList->model['menuOrder']['5'] = 'common'; $lang->admin->menuList->model['menuOrder']['10'] = 'scrum'; $lang->admin->menuList->model['menuOrder']['15'] = 'waterfall'; +$lang->admin->menuList->model['tabMenu']['common']['project'] = array('link' => "{$lang->project->common}|custom|required|module=project", 'alias' => 'set', 'exclude' => 'custom'); +$lang->admin->menuList->model['tabMenu']['common']['build'] = array('link' => "{$lang->build->common}|custom|required|module=build", 'alias' => 'set', 'exclude' => 'custom'); +$lang->admin->menuList->model['tabMenu']['common']['flow'] = array('link' => "{$lang->custom->flow}|custom|flow|", 'divider' => true); +$lang->admin->menuList->model['tabMenu']['common']['code'] = array('link' => "{$lang->code}|custom|code|"); +$lang->admin->menuList->model['tabMenu']['common']['hours'] = array('link' => "{$lang->workingHour}|custom|hours|"); $lang->admin->menuList->model['tabMenu']['waterfall']['stage'] = array('link' => "{$lang->stage->common}|stage|settype|", 'subModule' => 'stage'); +$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['5'] = 'project'; +$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['10'] = 'build'; +$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['35'] = 'flow'; +$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['40'] = 'code'; +$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['45'] = 'hours'; +$lang->admin->menuList->model['tabMenu']['menuOrder']['waterfall']['5'] = 'stage'; $lang->admin->menuList->feature['subMenu']['my'] = array('link' => "{$lang->my->common}|custom|set|module=todo&field=priList", 'exclude' => 'set,required'); $lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|required|module=product", 'exclude' => 'set,required', 'alias' => 'browsestoryconcept,product'); @@ -95,7 +106,6 @@ $lang->admin->menuList->feature['subMenu']['user'] = array('link' => "{$l $lang->admin->menuList->feature['tabMenu']['my']['todo'] = array('link' => "{$lang->todo->common}|custom|set|module=todo&field=priList", 'exclude' => 'custom-set'); $lang->admin->menuList->feature['tabMenu']['my']['block'] = array('link' => "{$lang->block->common}|custom|set|module=block&field=closed", 'exclude' => 'custom-set'); -if($config->vision == 'lite') $lang->admin->menuList->feature['tabMenu']['my']['task'] = array('link' => "{$lang->task->common}|custom|required|module=task", 'links' => array('custom|set|module=task&field=priList'), 'exclude' => 'custom-required,custom-set'); $lang->admin->menuList->feature['tabMenu']['product']['product'] = array('link' => "{$lang->productCommon}|custom|required|module=product", 'links' => array("custom|browsestoryconcept|", 'custom|product|'), 'alias' => 'browsestoryconcept,product', 'exclude' => 'custom-required'); $lang->admin->menuList->feature['tabMenu']['product']['story'] = array('link' => "{$lang->SRCommon}|custom|required|module=story", 'links' => array("custom|set|module=story&field=categoryList"), 'exclude' => 'custom-required,custom-set'); @@ -112,6 +122,21 @@ $lang->admin->menuList->feature['tabMenu']['qa']['testtask'] = array('link' => $lang->admin->menuList->feature['tabMenu']['qa']['testreport'] = array('link' => "{$lang->testreport->common}|custom|required|module=testreport", 'exclude' => 'custom-required'); $lang->admin->menuList->feature['tabMenu']['qa']['caselib'] = array('link' => "{$lang->testcase->caselib}|custom|required|module=caselib", 'exclude' => 'custom-required'); +$lang->admin->menuList->feature['tabMenu']['menuOrder']['my']['5'] = 'todo'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['my']['10'] = 'block'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['product']['5'] = 'product'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['product']['10'] = 'story'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['product']['15'] = 'productplan'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['product']['20'] = 'release'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['execution']['5'] = 'extension'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['execution']['10'] = 'task'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['qa']['5'] = 'bug'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['qa']['10'] = 'testcase'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['qa']['15'] = 'testsuite'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['qa']['20'] = 'testtask'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['qa']['25'] = 'testreport'; +$lang->admin->menuList->feature['tabMenu']['menuOrder']['qa']['30'] = 'caselib'; + $lang->admin->menuList->feature['menuOrder']['5'] = 'my'; $lang->admin->menuList->feature['menuOrder']['10'] = 'product'; $lang->admin->menuList->feature['menuOrder']['15'] = 'execution'; @@ -177,8 +202,13 @@ if($config->vision == 'lite') unset($lang->admin->menuList->feature['menuOrder']['25']); $lang->admin->menuList->feature['subMenu']['project'] = array('link' => "{$lang->projectCommon}|custom|execution|", 'exclude' => 'set,required', 'alias' => 'execution'); + $lang->admin->menuList->feature['tabMenu']['my']['task'] = array('link' => "{$lang->task->common}|custom|required|module=task", 'links' => array('custom|set|module=task&field=priList'), 'exclude' => 'custom-required,custom-set'); $lang->admin->menuList->feature['tabMenu']['project']['project'] = array('link' => "{$lang->projectCommon}|custom|required|module=project", 'exclude' => 'custom-required'); $lang->admin->menuList->feature['tabMenu']['project']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|"); $lang->admin->menuList->feature['tabMenu']['project']['story'] = array('link' => "{$lang->SRCommon}|custom|required|module=story", 'links' => array("custom|set|module=story&field=priList"), 'exclude' => 'custom-required,custom-set'); + $lang->admin->menuList->feature['tabMenu']['menuOrder']['my']['15'] = 'task'; + $lang->admin->menuList->feature['tabMenu']['menuOrder']['project']['5'] = 'project'; + $lang->admin->menuList->feature['tabMenu']['menuOrder']['project']['10'] = 'execution'; + $lang->admin->menuList->feature['tabMenu']['menuOrder']['project']['15'] = 'story'; $lang->admin->menuList->feature['menuOrder']['15'] = 'project'; } diff --git a/module/admin/model.php b/module/admin/model.php index 033e8b3d53..e92dff1001 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -280,16 +280,22 @@ class adminModel extends model $subModule = ''; if($moduleName == 'custom' and strpos(',required,set,', $methodName) !== false) { - if(isset($this->config->admin->navsGroup[$subMenuKey]) and strpos($this->config->admin->navsGroup[$subMenuKey], ",$firstParam,") !== false) $subModule = 'custom'; + if(isset($this->config->admin->navsGroup[$menuKey][$subMenuKey]) and strpos($this->config->admin->navsGroup[$menuKey][$subMenuKey], ",$firstParam,") !== false) $subModule = 'custom'; if($firstParam == $subMenuKey) $subModule = 'custom'; } if(!empty($subModule)) $subMenu['subModule'] = $subModule; if(isset($this->lang->admin->menuList->$menuKey['tabMenu'][$subMenuKey])) { - if(!empty($subModule)) $this->lang->admin->menuList->$menuKey['tabMenu'][$subMenuKey][$firstParam]['subModule'] = $subModule; + if(!empty($subModule)) + { + $this->lang->admin->menuList->$menuKey['tabMenu'][$subMenuKey][$firstParam]['subModule'] = $subModule; + unset($this->lang->admin->menuList->$menuKey['tabMenu'][$subMenuKey][$firstParam]['exclude']); + } $subMenu['subMenu'] = $this->lang->admin->menuList->$menuKey['tabMenu'][$subMenuKey]; } + if(isset($this->lang->admin->menuList->$menuKey['tabMenu']['menuOrder'][$subMenuKey])) $subMenu['menuOrder'] = $this->lang->admin->menuList->$menuKey['tabMenu']['menuOrder'][$subMenuKey]; + if(isset($this->lang->admin->menuList->$menuKey['tabMenu']['dividerMenu'][$subMenuKey])) $subMenu['dividerMenu'] = $this->lang->admin->menuList->$menuKey['tabMenu']['dividerMenu'][$subMenuKey]; $this->lang->admin->menu->$subMenuKey = $subMenu; } @@ -435,9 +441,10 @@ class adminModel extends model */ public function getMenuKey() { - $moduleName = $this->app->rawModule; - $methodName = $this->app->rawMethod; - $paramName = $this->app->rawParams ? reset($this->app->rawParams) : ''; + $moduleName = $this->app->rawModule; + $methodName = $this->app->rawMethod; + $firstParam = $this->app->rawParams ? reset($this->app->rawParams) : ''; + $secondParam = $this->app->rawParams ? next($this->app->rawParams) : ''; foreach($this->config->admin->menuGroup as $menuKey => $menuGroup) { @@ -449,7 +456,7 @@ class adminModel extends model { if($moduleName == 'custom' and ($methodName == 'required' or $methodName == 'set')) { - if(in_array($paramName, $this->config->admin->menuModuleGroup[$menuKey]["custom|$methodName"])) return $menuKey; + if(in_array($firstParam, $this->config->admin->menuModuleGroup[$menuKey]["custom|$methodName"])) return $menuKey; } else { diff --git a/module/common/model.php b/module/common/model.php index 23c4c33146..94118aed9d 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1348,7 +1348,6 @@ class commonModel extends model $active = ''; if($subModule and in_array($currentModule, $subModule)) $active = 'active'; - // if($alias and $moduleName == $currentModule and strpos(",$alias,", ",$currentMethod,") !== false) $active = 'active'; if($menuItem->link) { $target = ''; @@ -1362,7 +1361,9 @@ class commonModel extends model if(isset($menuItem->link['method'])) $method = $menuItem->link['method']; } - if($module == $currentModule and (($method == $currentMethod and strpos(",$exclude,", ",$currentModule-$currentMethod,") === false) or strpos(",$alias,", ",$currentMethod,") !== false)) $active = 'active'; + if($module == $currentModule and $method == $currentMethod) $active = 'active'; + if($module == $currentModule and strpos(",$alias,", ",$currentMethod,") !== false) $active = 'active'; + if(strpos(",$exclude,", ",$currentModule-$currentMethod,") !== false or strpos(",$exclude,", ",$currentModule,") !== false) $active = ''; $label = $menuItem->text; $dropMenu = ''; diff --git a/module/custom/control.php b/module/custom/control.php index 1dda366ead..7cee237ff5 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -99,12 +99,6 @@ class custom extends control $this->view->forceReview = zget($this->config->$module, 'forceReview', ''); $this->view->forceNotReview = zget($this->config->$module, 'forceNotReview', ''); } - if($module == 'task' and $field == 'hours') - { - $this->app->loadConfig('execution'); - $this->view->weekend = $this->config->execution->weekend; - $this->view->workhours = $this->config->execution->defaultWorkhours; - } if($module == 'bug' and $field == 'longlife') { $this->app->loadConfig('bug'); @@ -190,10 +184,6 @@ class custom extends control $this->testcase->batchReview(array_keys($waitCases), 'pass'); } } - elseif($module == 'task' and $field == 'hours') - { - $this->loadModel('setting')->setItems('system.execution', fixer::input('post')->get()); - } elseif($module == 'bug' and $field == 'longlife') { $this->loadModel('setting')->setItems('system.bug', fixer::input('post')->get()); @@ -617,7 +607,6 @@ class custom extends control if($_POST) { $this->custom->setConcept(); - $this->loadModel('setting')->setItem('system.custom.URAndSR', $this->post->URAndSR); if($this->config->edition != 'max') $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint); $this->app->loadLang('common'); @@ -873,4 +862,18 @@ class custom extends control $this->display(); } + + public function hours() + { + if($_POST) + { + $this->loadModel('setting')->setItems('system.execution', fixer::input('post')->get()); + } + + $this->app->loadConfig('execution'); + $this->view->title = $this->lang->workingHour; + $this->view->weekend = $this->config->execution->weekend; + $this->view->workhours = $this->config->execution->defaultWorkhours; + $this->display(); + } } diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index 6b8f57a992..703d9b25f8 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -215,6 +215,9 @@ $lang->custom->reviewList[0] = 'Off'; $lang->custom->deletedList[1] = 'Show'; $lang->custom->deletedList[0] = 'Hide'; +$lang->custom->setHours = 'Setting Hours'; +$lang->custom->setWeekend = 'Setting Weekend'; +$lang->custom->setHoliday = 'Setting Holiday'; $lang->custom->workingHours = 'hours/day'; $lang->custom->weekend = 'Weekend'; $lang->custom->weekendList[2] = '2-Day Off'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index ac56c928f5..a58fbcdefc 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -215,6 +215,9 @@ $lang->custom->reviewList[0] = 'Off'; $lang->custom->deletedList[1] = 'Show'; $lang->custom->deletedList[0] = 'Hide'; +$lang->custom->setHours = 'Setting Hours'; +$lang->custom->setWeekend = 'Setting Weekend'; +$lang->custom->setHoliday = 'Setting Holiday'; $lang->custom->workingHours = 'Hours/Day'; $lang->custom->weekend = 'Weekend'; $lang->custom->weekendList[2] = '2-Day Off'; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 771a21c075..8f6b0598f8 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -215,6 +215,9 @@ $lang->custom->reviewList[0] = 'Off'; $lang->custom->deletedList[1] = 'Montrer'; $lang->custom->deletedList[0] = 'Cacher'; +$lang->custom->setHours = 'Setting Hours'; +$lang->custom->setWeekend = 'Setting Weekend'; +$lang->custom->setHoliday = 'Setting Holiday'; $lang->custom->workingHours = 'Heures/Jour'; $lang->custom->weekend = 'Weekend'; $lang->custom->weekendList[2] = '2-Jour'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 9709f50a47..c043869f9a 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -8,7 +8,7 @@ $lang->custom->set = '自定义配置'; $lang->custom->restore = '恢复默认'; $lang->custom->key = '键'; $lang->custom->value = '值'; -$lang->custom->flow = '流程'; +$lang->custom->flow = '流程设置'; $lang->custom->working = '工作方式'; $lang->custom->select = '请选择流程:'; $lang->custom->branch = '多分支'; @@ -215,6 +215,9 @@ $lang->custom->reviewList[0] = '关闭'; $lang->custom->deletedList[1] = '列出'; $lang->custom->deletedList[0] = '不列出'; +$lang->custom->setHours = '工时设置'; +$lang->custom->setWeekend = '休息日设置'; +$lang->custom->setHoliday = '节假日设置'; $lang->custom->workingHours = '每天可用工时'; $lang->custom->weekend = '休息日'; $lang->custom->weekendList[2] = '双休'; diff --git a/module/custom/model.php b/module/custom/model.php index 9dad54b82c..ed3dad0ed8 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -233,6 +233,7 @@ class customModel extends model $dropMenu = ''; $alias = ''; $exclude = ''; + $divider = false; $link = (is_array($item) and isset($item['link'])) ? $item['link'] : $item; /* The variable of item has not link and is not link then ignore it. */ @@ -287,6 +288,7 @@ class customModel extends model if(isset($item['dropMenu'])) $dropMenu = $item['dropMenu']; if(isset($item['alias'])) $alias = $item['alias']; if(isset($item['exclude'])) $exclude = $item['exclude']; + if(isset($item['divider'])) $divider = $item['divider']; } $hidden = isset($customMenuMap[$name]) && isset($customMenuMap[$name]->hidden) && $customMenuMap[$name]->hidden; @@ -327,6 +329,7 @@ class customModel extends model if($dropMenu) $menuItem->dropMenu = $dropMenu; if($alias) $menuItem->alias = $alias; if($exclude) $menuItem->exclude = $exclude; + if($divider) $menuItem->divider = $divider; if($isTutorialMode) $menuItem->tutorial = true; /* Hidden menu by config in mobile. */ @@ -363,7 +366,7 @@ class customModel extends model else { $isFirst = false; - $menu[$item->order]->divider = false; + if(!isset($menu[$item->order]->divider))$menu[$item->order]->divider = false; } } diff --git a/module/custom/view/flow.html.php b/module/custom/view/flow.html.php index fb4e630adb..99a1a67293 100644 --- a/module/custom/view/flow.html.php +++ b/module/custom/view/flow.html.php @@ -33,14 +33,6 @@
| custom->workingHours;?> | -- | - |
|---|---|---|
| custom->weekend;?> | -custom->weekendList, $weekend);?> | -|
| - | ||