From 6fb0596226d50e996c9bc4ade34b6dc3ebe6a159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Fri, 21 Jan 2022 10:39:59 +0800 Subject: [PATCH] * fix bug #18522. --- extension/lite/execution/ext/model/lite.php | 2 ++ extension/lite/product/ext/control/browse.php | 3 +-- extension/lite/product/ext/lang/zh-cn/lite.php | 3 +++ extension/lite/product/ext/view/browse.html.php | 2 +- extension/lite/tree/ext/control/browsetask.php | 11 +++++++++++ extension/lite/tree/ext/lang/zh-cn/lite.php | 14 ++++++++++++++ 6 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 extension/lite/product/ext/lang/zh-cn/lite.php create mode 100644 extension/lite/tree/ext/control/browsetask.php create mode 100644 extension/lite/tree/ext/lang/zh-cn/lite.php diff --git a/extension/lite/execution/ext/model/lite.php b/extension/lite/execution/ext/model/lite.php index b3d561d125..95f97b295d 100644 --- a/extension/lite/execution/ext/model/lite.php +++ b/extension/lite/execution/ext/model/lite.php @@ -2,11 +2,13 @@ public function setMenu($executionID, $buildID = 0, $extra = '') { common::setMenuVars('execution', $executionID); + $execution = $this->getById($executionID); if(isset($this->lang->execution->menu->kanban)) { $this->loadModel('project')->setMenu($execution->project); $this->lang->kanban->menu->execution['subMenu'] = $this->lang->execution->menu; + if($this->app->rawModule == 'tree') unset($this->lang->kanban->menu->execution['subMenu']); } $kanbanList = $this->getList($execution->project, 'kanban', 'all'); diff --git a/extension/lite/product/ext/control/browse.php b/extension/lite/product/ext/control/browse.php index 9bba69fe0d..cd03b2dc0b 100644 --- a/extension/lite/product/ext/control/browse.php +++ b/extension/lite/product/ext/control/browse.php @@ -3,7 +3,6 @@ class product extends control { public function browse($productID = 0, $branch = '', $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1, $projectID = 0) { - /* Load datatable and execution. */ $this->loadModel('datatable'); $this->loadModel('execution'); @@ -165,7 +164,7 @@ class product extends control $this->view->browseType = $browseType; $this->view->modules = $this->tree->getOptionMenu($productID, 'story', 0, $branchID); $this->view->moduleID = $moduleID; - $this->view->moduleName = ($moduleID and $moduleID !== 'all') ? $this->tree->getById($moduleID)->name : $this->lang->tree->all; + $this->view->moduleName = ($moduleID and $moduleID !== 'all') ? $this->tree->getById($moduleID)->name : $this->lang->tree->allMenu; $this->view->branch = $branch; $this->view->branchID = $branchID; $this->view->branchOption = $branchOption; diff --git a/extension/lite/product/ext/lang/zh-cn/lite.php b/extension/lite/product/ext/lang/zh-cn/lite.php new file mode 100644 index 0000000000..e0e2eb20d7 --- /dev/null +++ b/extension/lite/product/ext/lang/zh-cn/lite.php @@ -0,0 +1,3 @@ +product->noModule = '您现在还没有目录信息'; +$lang->product->storySummary = "本页共 %s 个%s,预计 %s 个{$lang->hourCommon}。"; diff --git a/extension/lite/product/ext/view/browse.html.php b/extension/lite/product/ext/view/browse.html.php index 39dbc8ada6..12ea9f4f80 100644 --- a/extension/lite/product/ext/view/browse.html.php +++ b/extension/lite/product/ext/view/browse.html.php @@ -205,7 +205,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
- tree->manage, '', "class='btn btn-info btn-wide'");?> + tree->manageMenu, '', "class='btn btn-info btn-wide'");?>
diff --git a/extension/lite/tree/ext/control/browsetask.php b/extension/lite/tree/ext/control/browsetask.php new file mode 100644 index 0000000000..bcb80dfd4d --- /dev/null +++ b/extension/lite/tree/ext/control/browsetask.php @@ -0,0 +1,11 @@ +lang->kanban->menu->execution['subModule'] = 'tree'; + $this->lang->kanban->menu->story['subModule'] = ''; + return parent::browseTask($rootID, $productID, $currentModuleID); + } +} diff --git a/extension/lite/tree/ext/lang/zh-cn/lite.php b/extension/lite/tree/ext/lang/zh-cn/lite.php new file mode 100644 index 0000000000..05adc8f226 --- /dev/null +++ b/extension/lite/tree/ext/lang/zh-cn/lite.php @@ -0,0 +1,14 @@ +tree->allMenu = '所有目录'; +$lang->tree->manageMenu = '维护目录'; + +global $app; +if($app->rawModule == 'tree' and $app->rawMethod == 'browse') +{ + $lang->tree->edit = '编辑目录'; + $lang->tree->delete = '删除目录'; + $lang->tree->child = '子目录'; + $lang->tree->manageStoryChild = '维护子目录'; + $lang->tree->name = '目录名称'; + $lang->tree->syncFromProduct = '复制目录'; +}