-
+ -
-
+
+
-

我是标签1。

+ automation->details;?>
-

标签2的内容。

+ automation->ztfDetails;?>
-

这是标签3的内容。

+ automation->zendataDetails;?>
From b8885bc1eaeff95d8bb3d7abc219395e5846c969 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 11 Mar 2021 20:18:10 +0800 Subject: [PATCH 11/14] * Finish task#36500. --- module/common/lang/zh-cn.php | 12 ++++++------ module/common/model.php | 3 ++- module/execution/control.php | 12 ++++++++++++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index b3692e0db3..9649086a87 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -355,12 +355,12 @@ $lang->execution->groupMenu = new stdclass(); $lang->execution->groupMenu->groupTask = '分组视图|execution|grouptask|executionID={EXECUTION}'; $lang->execution->groupMenu->tree = '树状图|execution|tree|executionID={EXECUTION}'; -$lang->execution->subMenu = new stdclass(); -$lang->execution->subMenu->setting = new stdclass(); -$lang->execution->subMenu->setting->vie = array('link' => '概况|execution|view|executionID=%s', 'subModule' => 'view', 'alias' => 'edit,start,suspend,putoff,close'); -$lang->execution->subMenu->setting->product = $lang->productCommon . '|execution|manageproducts|executionID=%s'; -$lang->execution->subMenu->setting->team = array('link' => '团队|execution|team|executionID=%s', 'alias' => 'managemembers'); -$lang->execution->subMenu->setting->whitelist = array('link' => '白名单|execution|whitelist|executionID=%s', 'subModule' => 'personnel', 'alias' => 'addwhitelist'); +$lang->execution->settingMenu = new stdclass(); +$lang->execution->settingMenu = new stdclass(); +$lang->execution->settingMenu->view = array('link' => '概况|execution|view|executionID={EXECUTION}', 'subModule' => 'view', 'alias' => 'edit,start,suspend,putoff,close'); +$lang->execution->settingMenu->products = $lang->productCommon . '|execution|manageproducts|executionID={EXECUTION}'; +$lang->execution->settingMenu->team = array('link' => '团队|execution|team|executionID={EXECUTION}', 'alias' => 'managemembers'); +$lang->execution->settingMenu->whitelist = array('link' => '白名单|execution|whitelist|executionID={EXECUTION}', 'subModule' => 'personnel', 'alias' => 'addwhitelist'); $lang->execution->dividerMenu = ',story,build,setting,'; diff --git a/module/common/model.php b/module/common/model.php index 44207d1707..3a990bf37c 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -782,7 +782,8 @@ class commonModel extends model } if($group == 'execution') { - if($methodName == 'grouptask' or $methodName == 'tree') $lang->execution->menu = self::processMenuVars($lang->execution->groupMenu); + if(in_array($methodName, array('grouptask', 'tree'))) $lang->execution->menu = self::processMenuVars($lang->execution->groupMenu); + if(in_array($methodName, array('view', 'manageproducts', 'team', 'whitelist'))) $lang->execution->menu = self::processMenuVars($lang->execution->settingMenu); } if(strpos('qa|bug|testcase|testreport|testtask', $moduleName) !== false and $group == 'project') { diff --git a/module/execution/control.php b/module/execution/control.php index 22fa42e32a..6dd8a9770e 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1089,6 +1089,9 @@ class execution extends control */ public function team($executionID = 0) { + $moduleIndex = array_search('execution', $this->lang->noMenuModule); + if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]); + $execution = $this->commonAction($executionID); $executionID = $execution->id; @@ -1648,6 +1651,9 @@ class execution extends control */ public function view($executionID) { + $moduleIndex = array_search('execution', $this->lang->noMenuModule); + if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]); + $execution = $this->execution->getById($executionID, true); if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back')); @@ -1993,6 +1999,9 @@ class execution extends control */ public function manageProducts($executionID, $from = '') { + $moduleIndex = array_search('execution', $this->lang->noMenuModule); + if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]); + /* use first execution if executionID does not exist. */ if(!isset($this->executions[$executionID])) $executionID = key($this->executions); @@ -2629,6 +2638,9 @@ class execution extends control */ public function whitelist($executionID = 0, $module='execution', $objectType = 'sprint', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { + $moduleIndex = array_search('execution', $this->lang->noMenuModule); + if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]); + /* use first execution if executionID does not exist. */ if(!isset($this->executions[$executionID])) $executionID = key($this->executions); From 8fb5c794818c45e2384cbd94737b8ed8cccd0f73 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 11 Mar 2021 20:38:45 +0800 Subject: [PATCH 12/14] * Finish task#36497. --- module/execution/control.php | 3 ++- module/execution/view/ajaxgetdropmenu.html.php | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 6dd8a9770e..0fc4ed0ff9 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2500,7 +2500,8 @@ class execution extends control $this->view->module = $module; $this->view->method = $method; $this->view->extra = $extra; - $this->view->executions = $this->execution->getByProject($execution->project); + $this->view->projects = $this->project->getPairsByModel(); + $this->view->executions = $this->execution->getList(); $this->display(); } diff --git a/module/execution/view/ajaxgetdropmenu.html.php b/module/execution/view/ajaxgetdropmenu.html.php index fe4e0a05fe..2debb51b63 100644 --- a/module/execution/view/ajaxgetdropmenu.html.php +++ b/module/execution/view/ajaxgetdropmenu.html.php @@ -21,15 +21,16 @@ $executionsPinYin = common::convert2Pinyin($executionNames); foreach($executions as $execution) { + $executionName = zget($projects, $execution->project) . '/' . $execution->name; if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account) { - $myProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $execution->name, '', "class='text-important' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'"); + $myProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $executionName, '', "class='text-important' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'"); } else if($execution->status != 'done' and $execution->status != 'closed' and !($execution->PM == $this->app->user->account)) { - $normalProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $execution->name, '', "title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'"); + $normalProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'"); } - else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $execution->name, '', "title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'"); + else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'"); } ?>
From 3610051e71df7381d5e67ff6daa6a5e7f06ef8e9 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 11 Mar 2021 20:44:47 +0800 Subject: [PATCH 13/14] * Delete the drop-down menu that execution's three-level navigation. --- module/execution/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 3f1b45ad2d..73826c8092 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -115,8 +115,8 @@ class executionModel extends model if($methodName == 'all') $label = $this->lang->execution->allExecutions; if($methodName == 'create' and $moduleName == 'execution') $label = $this->lang->execution->create; - $executionIndex = $this->select($executions, $executionID, null, $moduleName, $methodName, $extra); - if($this->config->systemMode == 'new') $this->lang->modulePageNav = $executionIndex; + //$executionIndex = $this->select($executions, $executionID, null, $moduleName, $methodName, $extra); + //if($this->config->systemMode == 'new') $this->lang->modulePageNav = $executionIndex; foreach($this->lang->execution->menu as $key => $menu) { From 70047ed2af916a99284210b0506d34a74d8e83f5 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Fri, 12 Mar 2021 08:11:48 +0800 Subject: [PATCH 14/14] * Fix bug. --- module/common/view/header.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index f63940aeeb..8d950a20ff 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -25,7 +25,7 @@ $isQa = $rawModule == 'qa'; config->systemMode == 'new'):?> program->switcherMenu) ? $lang->program->switcherMenu : '';?> loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?> - execution->getSwitcher($this->session->execution, $app->rawModule, $app->rawMethod);?> + loadModel('execution')->getSwitcher($this->session->execution, $app->rawModule, $app->rawMethod);?> config->systemMode == 'classic'):?> project->switcherMenu) ? $lang->project->switcherMenu : '';;?>