From a73d28f969089534966da7fda4105f41de47a65c Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Fri, 18 Jun 2021 08:58:56 +0800 Subject: [PATCH 1/3] * Finish task#39387. --- module/action/control.php | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/module/action/control.php b/module/action/control.php index e21987216a..a7154db51a 100755 --- a/module/action/control.php +++ b/module/action/control.php @@ -28,23 +28,26 @@ class action extends control /* Save session. */ $uri = $this->app->getURI(true); - $this->session->set('productList', $uri, 'product'); - $this->session->set('productPlanList', $uri, 'product'); - $this->session->set('storyList', $uri, 'product'); - $this->session->set('releaseList', $uri, 'product'); - $this->session->set('programList', $uri, 'program'); - $this->session->set('projectList', $uri, 'project'); - $this->session->set('executionList', $uri, 'execution'); - $this->session->set('taskList', $uri, 'execution'); - $this->session->set('buildList', $uri, 'execution'); - $this->session->set('bugList', $uri, 'qa'); - $this->session->set('caseList', $uri, 'qa'); - $this->session->set('testtaskList', $uri, 'qa'); - $this->session->set('docList', $uri, 'doc'); - $this->session->set('opportunityList', $uri, 'project'); - $this->session->set('riskList', $uri, 'project'); - $this->session->set('trainplanList', $uri, 'project'); - $this->session->set('roomList', $uri, 'admin'); + $this->session->set('productList', $uri, 'product'); + $this->session->set('productPlanList', $uri, 'product'); + $this->session->set('storyList', $uri, 'product'); + $this->session->set('releaseList', $uri, 'product'); + $this->session->set('programList', $uri, 'program'); + $this->session->set('projectList', $uri, 'project'); + $this->session->set('executionList', $uri, 'execution'); + $this->session->set('taskList', $uri, 'execution'); + $this->session->set('buildList', $uri, 'execution'); + $this->session->set('bugList', $uri, 'qa'); + $this->session->set('caseList', $uri, 'qa'); + $this->session->set('testtaskList', $uri, 'qa'); + $this->session->set('docList', $uri, 'doc'); + $this->session->set('opportunityList', $uri, 'project'); + $this->session->set('riskList', $uri, 'project'); + $this->session->set('trainplanList', $uri, 'project'); + $this->session->set('roomList', $uri, 'admin'); + $this->session->set('researchplanList', $uri, 'project'); + $this->session->set('researchreportList', $uri, 'project'); + $this->session->set('meetingList', $uri, 'project'); /* Get deleted objects. */ $this->app->loadClass('pager', $static = true); From 53cf8a8b2a1df922efd2f5b9e19cbb3f1d5ccd5b Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 18 Jun 2021 09:05:37 +0800 Subject: [PATCH 2/3] * Finish task #39451. --- module/action/view/trash.html.php | 6 +++--- module/block/control.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 99c500d277..1e0f21625f 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -68,9 +68,9 @@ } else { - $app = ''; - if($action->objectType == 'meeting') $app = $action->project ? "data-app='project'" : "data-app='my'"; - echo html::a($this->createLink($module, $methodName, $params), $action->objectName, '_self', "title={$action->objectName} $app"); + $openApp = ''; + if($action->objectType == 'meeting') $openApp = $action->project ? "data-app='project'" : "data-app='my'"; + echo html::a($this->createLink($module, $methodName, $params), $action->objectName, '_self', "title={$action->objectName} $openApp"); } ?> diff --git a/module/block/control.php b/module/block/control.php index 6c8a84fe10..d5d9686b37 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1755,7 +1755,7 @@ class block extends control $today = helper::today(); $now = date('H:i:s', strtotime(helper::now())); - $stmt = $this->dao->select('*')->from(TABLE_MEETING) + $meetings = $this->dao->select('*')->from(TABLE_MEETING) ->Where('deleted')->eq('0') ->andWhere('(date')->gt($today) ->orWhere('(begin')->gt($now) @@ -1764,9 +1764,9 @@ class block extends control ->andwhere('(host')->eq($this->app->user->account) ->orWhere('participant')->in($this->app->user->account) ->markRight(1) - ->orderBy('id_desc'); - if(isset($params->meetingNum)) $stmt->limit($params->meetingNum); - $meetings = $stmt->fetchAll(); + ->orderBy('id_desc') + ->beginIF(isset($params->meetingNum))->limit($params->meetingNum) + ->fetchAll(); $count['meeting'] = count($meetings); $this->view->meetings = $meetings; From abe711e3341e00fdf6b7fc5d4d90a21fd2d62388 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 18 Jun 2021 09:10:40 +0800 Subject: [PATCH 3/3] * Finish task #39450. --- module/block/config.php | 2 ++ module/block/control.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/module/block/config.php b/module/block/config.php index 8d4cdb2fe6..cce425b4f7 100644 --- a/module/block/config.php +++ b/module/block/config.php @@ -37,3 +37,5 @@ $config->block->shortBlock['']['contribute'] = 'contribute'; $config->statistic = new stdclass(); $config->statistic->storyStages = array('wait', 'planned', 'developing', 'testing', 'released'); + +$config->block->workMethods = 'task,story,requirement,bug,testcase,testtask,issue,risk,meeting'; diff --git a/module/block/control.php b/module/block/control.php index d5d9686b37..22ae906204 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -253,7 +253,7 @@ class block extends control /* The list assigned to me jumps to the work page when click more button. */ $block->moreLink = $this->createLink($moduleName, $method, $vars); - if($moduleName == 'my' and strpos('task|story|requirement|bug|testcase|testtask|issue|risk|meeting', $method)) + if($moduleName == 'my' and strpos($this->config->block->workMethods, $method)) { $block->moreLink = $this->createLink($moduleName, 'work', 'mode=' . $method . '&' . $vars); }