From b8a95eeca4ee5764b3b8c52a2af5a27ecd6f750b Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 13 Oct 2023 17:18:22 +0800 Subject: [PATCH] * Modify the execution list product drop-down menu. --- module/project/control.php | 3 ++- module/project/ui/execution.html.php | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 03cc2ddd93..bb3e8be52c 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -737,6 +737,7 @@ class project extends control $this->loadModel('execution'); $this->loadModel('task'); $this->loadModel('programplan'); + $this->loadModel('product'); $this->session->set('executionList', $this->app->getURI(true), 'project'); if($this->cookie->showTask) $this->session->set('taskList', $this->app->getURI(true), 'project'); @@ -753,7 +754,7 @@ class project extends control $this->view->title = $this->lang->execution->allExecutions; $this->view->executionStats = $this->execution->getStatData($projectID, $status, $productID, 0, (bool)$this->cookie->showTask, '', $orderBy, $pager); - $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID, 'all', '', false); + $this->view->productList = array(0 => $this->lang->product->all) + $this->product->getProductPairsByProject($projectID, 'all', '', false); $this->view->productID = $productID; $this->view->product = $this->product->getByID($productID); $this->view->projectID = $projectID; diff --git a/module/project/ui/execution.html.php b/module/project/ui/execution.html.php index 6b61e865ca..c1df928e14 100644 --- a/module/project/ui/execution.html.php +++ b/module/project/ui/execution.html.php @@ -84,11 +84,15 @@ $productMenuLink = createLink( 'productID' => '{key}' ) ); + +$productItems = array(); +foreach($productList as $key => $value) $productItems[] = array('text' => $value, 'id' => $key); + featureBar ( to::before(productMenu(set ([ - 'items' => $productList, + 'items' => $productItems, 'activeKey' => $productID, 'closeLink' => '#', 'link' => $productMenuLink