diff --git a/module/common/lang/de.php b/module/common/lang/de.php index e9529dc6f5..08c98ec4fd 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -150,6 +150,7 @@ $lang->openedByAB = 'Ersteller'; $lang->assignedToAB = 'Bearbeiter'; $lang->typeAB = 'Typ'; $lang->nameAB = 'Name'; +$lang->code = 'Code'; $lang->pri = 'Priority'; $lang->delayed = 'Delayed'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 16edf7074d..66ec104c45 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -150,6 +150,7 @@ $lang->openedByAB = 'CreatedBy'; $lang->assignedToAB = 'AssignedTo'; $lang->typeAB = 'Type'; $lang->nameAB = 'Name'; +$lang->code = 'Code'; $lang->pri = 'Priority'; $lang->delayed = 'Delayed'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index d6aad09697..7007d61b66 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -150,6 +150,7 @@ $lang->openedByAB = 'Créé par'; $lang->assignedToAB = 'Affecté à'; $lang->typeAB = 'Type'; $lang->nameAB = 'Name'; +$lang->code = 'Code'; $lang->pri = 'Priority'; $lang->delayed = 'Delayed'; diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index b7703e2dc1..df4811793d 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -488,7 +488,7 @@ $lang->admin->menu = new stdclass(); $lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); $lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,'); $lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'class' => 'dropdown dropdown-hover', 'exclude' => 'custom-index,custom-set,custom-product,custom-execution,custom-kanban,custom-required,custom-flow,custom-score,custom-feedback,custom-timezone,custom-mode'); -$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate'); +$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate,custom-code'); $lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension'); $lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry'); $lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook'); @@ -506,7 +506,9 @@ if($config->systemMode == 'new') $lang->admin->menu->allModel['subMenu'] = new stdclass(); $lang->admin->menu->allModel['subMenu']->storyConcept = array('link' => "{$lang->storyConcept}|custom|browsestoryconcept|"); -$lang->admin->menu->allModel['menuOrder'][5] = 'storyConcept'; +$lang->admin->menu->allModel['subMenu']->code = array('link' => "{$lang->code}|custom|code|"); +$lang->admin->menu->allModel['menuOrder'][5] = 'storyConcept'; +$lang->admin->menu->allModel['menuOrder'][30] = 'code'; $lang->admin->menu->waterfall['subMenu'] = new stdclass(); $lang->admin->menu->waterfall['subMenu']->stage = array('link' => "{$lang->stage->common}|stage|setType|", 'subModule' => 'stage'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index c63345b39f..e303e4b881 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -150,6 +150,7 @@ $lang->openedByAB = '创建'; $lang->assignedToAB = '指派'; $lang->typeAB = '类型'; $lang->nameAB = '名称'; +$lang->code = '代号'; $lang->pri = '优先级'; $lang->delayed = '已延期'; diff --git a/module/custom/control.php b/module/custom/control.php index 0f367ed8f3..a770c7b2e6 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -848,4 +848,23 @@ class custom extends control $this->loadModel('setting')->deleteItems("owner=system&module={$module}&key=requiredFields"); return print(js::reload('parent.parent')); } + + /** + * Set code. + * + * @access public + * @return void + */ + public function code() + { + if($_POST) + { + $this->loadModel('setting')->setItem('system.common.setCode', $this->post->code); + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); + } + + $this->view->title = $this->lang->custom->code; + + $this->display(); + } } diff --git a/module/custom/css/code.css b/module/custom/css/code.css new file mode 100644 index 0000000000..15877ee3c8 --- /dev/null +++ b/module/custom/css/code.css @@ -0,0 +1,2 @@ +#readOnlyOfCode {font-size: 13px; color: #5e626d;} +#readOnlyOfCode i {font-size: 14px; color: #0075ff; margin-right: 3px;} diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index 138c8e66c7..43c9441c60 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -54,6 +54,7 @@ $lang->custom->allUsers = 'All Users'; $lang->custom->account = 'Users'; $lang->custom->role = 'Role'; $lang->custom->dept = 'Dept'; +$lang->custom->code = $lang->code; if($config->systemMode == 'new') $lang->custom->execution = 'Execution'; if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = 'Execution'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 13c3c059e0..cc93a500bf 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -54,6 +54,7 @@ $lang->custom->allUsers = 'All Users'; $lang->custom->account = 'Users'; $lang->custom->role = 'Role'; $lang->custom->dept = 'Dept'; +$lang->custom->code = $lang->code; if($config->systemMode == 'new') $lang->custom->execution = 'Execution'; if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = $lang->executionCommon; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 511446f33d..3bd4bff524 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -54,6 +54,7 @@ $lang->custom->allUsers = 'All Users'; $lang->custom->account = 'Users'; $lang->custom->role = 'Role'; $lang->custom->dept = 'Dept'; +$lang->custom->code = $lang->code; if($config->systemMode == 'new') $lang->custom->execution = 'Execution'; if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = 'Execution'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 00f417f1e9..4ea7776a77 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -54,6 +54,8 @@ $lang->custom->allUsers = '所有人员'; $lang->custom->account = '人员'; $lang->custom->role = '职位'; $lang->custom->dept = '部门'; +$lang->custom->code = $lang->code; +$lang->custom->setCode = '是否启用代号'; if($config->systemMode == 'new') $lang->custom->execution = '执行'; if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = $lang->executionCommon; @@ -208,6 +210,7 @@ $lang->custom->notice->confirmReviewCase = '是否将待评审的用例修改 $lang->custom->notice->storyReviewTip = '按人员、职位、部门勾选后,取所有人员的并集。'; $lang->custom->notice->selectAllTip = '勾选所有人员后,会清空并置灰评审人员,同时隐藏职位、部门。'; $lang->custom->notice->repeatKey = '%s键重复'; +$lang->custom->notice->readOnlyOfCode = '代号是一种管理话术,主要便于保密或作为别名存在。启用代号管理后,系统中的项目集、产品、项目、执行在创建、编辑、详情、列表等页面均会展示代号信息。'; $lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?"; $lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?"; diff --git a/module/custom/view/code.html.php b/module/custom/view/code.html.php new file mode 100644 index 0000000000..e9c414196d --- /dev/null +++ b/module/custom/view/code.html.php @@ -0,0 +1,47 @@ + + * @package custom + * @version $Id$ + * @link https://www.zentao.net + */ +?> + +