- product->switcherMenu) ? $lang->product->switcherMenu : '';?>
- qa->switcherMenu) ? $lang->qa->switcherMenu : '';?>
+ product->switcherMenu) ? $lang->product->switcherMenu : '';?>
+ qa->switcherMenu) ? $lang->qa->switcherMenu : '';?>
config->systemMode == 'new'):?>
- program->switcherMenu) ? $lang->program->switcherMenu : '';?>
- loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
+ program->switcherMenu) ? $lang->program->switcherMenu : '';?>
+ loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
+ execution->getSwitcher($this->session->execution, $app->rawModule, $app->rawMethod);?>
config->systemMode == 'classic'):?>
- project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
+ project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
diff --git a/module/execution/model.php b/module/execution/model.php
index ac8b393721..ba48b246d8 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -877,11 +877,42 @@ class executionModel extends model
*/
public function getMainAction($module, $method)
{
+ if($method == 'index' or $method == 'all') return;
+
$link = html::a(helper::createLink('execution', 'all'), "
", '', "style='border: none;'");
$html = "
" . $link . "
";
+
return common::hasPriv('execution', 'all') ? $html : '';
}
+ /*
+ * Get execution switcher.
+ *
+ * @param int $executionID
+ * @param string $currentModule
+ * @param string $currentMethod
+ * @access public
+ * @return string
+ */
+ public function getSwitcher($executionID, $currentModule, $currentMethod)
+ {
+ $this->session->set('moreExecutionLink', $this->app->getURI(true));
+
+ $currentExecutionName = $this->lang->execution->common;
+ if($executionID)
+ {
+ $currentExecution = $this->getById($executionID);
+ $currentExecutionName = $currentExecution->name;
+ }
+
+ $dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "objectID=$executionID&module=$currentModule&method=$currentMethod&extra=");
+ $output = "";
+
+ return $output;
+ }
+
/**
* Get project pairs.
*
diff --git a/module/project/model.php b/module/project/model.php
index 5a2264225c..67505c5ab8 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -144,7 +144,6 @@ class projectModel extends model
{
$this->session->set('moreProjectLink', $this->app->getURI(true));
- $this->loadModel('project');
$currentProjectName = $this->lang->project->common;
if($projectID)
{
From c8036c78900e2b1055551ef7bd7957787b0584ba Mon Sep 17 00:00:00 2001
From: qiyu-xie
Date: Wed, 10 Mar 2021 10:23:54 +0800
Subject: [PATCH 3/7] * Fix bug.
---
module/execution/view/ajaxgetdropmenu.html.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/execution/view/ajaxgetdropmenu.html.php b/module/execution/view/ajaxgetdropmenu.html.php
index 5354282d6f..bcb55035d0 100644
--- a/module/execution/view/ajaxgetdropmenu.html.php
+++ b/module/execution/view/ajaxgetdropmenu.html.php
@@ -49,7 +49,7 @@ foreach($executions as $execution)
?>
From 183feb39368b4cc0b44ea55e7baa7237f4b8c695 Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Wed, 10 Mar 2021 10:24:13 +0800
Subject: [PATCH 4/7] * Finish task #36465.
---
module/common/lang/de.php | 17 ++++++----------
module/common/lang/en.php | 17 ++++++----------
module/common/lang/fr.php | 17 ++++++----------
module/common/lang/menuOrder.php | 33 +++++++++++++++-----------------
module/common/lang/vi.php | 15 +++++----------
module/common/lang/zh-cn.php | 20 +++++++++----------
module/company/control.php | 6 ++++++
module/index/js/index.js | 2 ++
module/my/control.php | 3 +++
module/project/js/browse.js | 1 -
module/user/model.php | 3 +--
11 files changed, 60 insertions(+), 74 deletions(-)
diff --git a/module/common/lang/de.php b/module/common/lang/de.php
index 8f95d4b7d1..600abec13f 100644
--- a/module/common/lang/de.php
+++ b/module/common/lang/de.php
@@ -148,7 +148,7 @@ $lang->mainNav->qa = '