From 3154474094a34f249e4d7304be6a891316cdcd6e Mon Sep 17 00:00:00 2001 From: guanxiying Date: Wed, 30 Jun 2021 18:39:30 +0800 Subject: [PATCH] * Add the session list and adjust the assetlib link in dynamic. --- module/action/control.php | 7 +++++ module/action/model.php | 5 ++++ module/my/control.php | 54 ++++++++++++++++++++++----------------- 3 files changed, 42 insertions(+), 24 deletions(-) diff --git a/module/action/control.php b/module/action/control.php index a7154db51a..4b628d3376 100755 --- a/module/action/control.php +++ b/module/action/control.php @@ -48,6 +48,13 @@ class action extends control $this->session->set('researchplanList', $uri, 'project'); $this->session->set('researchreportList', $uri, 'project'); $this->session->set('meetingList', $uri, 'project'); + $this->session->set('storyLibList', $uri, 'assetlib'); + $this->session->set('issueLibList', $uri, 'assetlib'); + $this->session->set('riskLibList', $uri, 'assetlib'); + $this->session->set('opportunityLibList', $uri, 'assetlib'); + $this->session->set('practiceLibList', $uri, 'assetlib'); + $this->session->set('componentLibList', $uri, 'assetlib'); + /* Get deleted objects. */ $this->app->loadClass('pager', $static = true); diff --git a/module/action/model.php b/module/action/model.php index 74b1846ada..d7da893c39 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1038,6 +1038,11 @@ class actionModel extends model if(!is_array($objectLabel)) $action->objectLabel = $objectLabel; if(is_array($objectLabel) and isset($objectLabel[$actionType])) $action->objectLabel = $objectLabel[$actionType]; } + if(isset($this->config->maxVersion) and $action->objectType == 'assetlib') + { + $libType = $this->dao->select('type')->from(TABLE_ASSETLIB)->where('id')->eq($action->objectID)->fetch('type'); + if(strpos('story,issue,risk,opportunity,practice,component', $libType) !== false) $action->objectLabel = $this->lang->action->label->{$libType . 'assetlib'}; + } /* If action type is login or logout, needn't link. */ if($actionType == 'svncommited' or $actionType == 'gitcommited') diff --git a/module/my/control.php b/module/my/control.php index 55ccafa53e..121a20a0f4 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -1000,30 +1000,36 @@ class my extends control { /* Save session. */ $uri = $this->app->getURI(true); - $this->session->set('productList', $uri, 'product'); - $this->session->set('storyList', $uri, 'product'); - $this->session->set('designList', $uri, 'project'); - $this->session->set('productPlanList', $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('caselibList', $uri, 'qa'); - $this->session->set('testsuiteList', $uri, 'qa'); - $this->session->set('testtaskList', $uri, 'qa'); - $this->session->set('reportList', $uri, 'qa'); - $this->session->set('docList', $uri, 'doc'); - $this->session->set('todoList', $uri, 'my'); - $this->session->set('riskList', $uri, 'project'); - $this->session->set('issueList', $uri, 'project'); - $this->session->set('stakeholderList', $uri, 'project'); - $this->session->set('meetingroomList', $uri, 'admin'); - $this->session->set('meetingList', $uri, 'project'); - $this->session->set('meetingList', $uri, 'my'); + $this->session->set('productList', $uri, 'product'); + $this->session->set('storyList', $uri, 'product'); + $this->session->set('designList', $uri, 'project'); + $this->session->set('productPlanList', $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('caselibList', $uri, 'qa'); + $this->session->set('testsuiteList', $uri, 'qa'); + $this->session->set('testtaskList', $uri, 'qa'); + $this->session->set('reportList', $uri, 'qa'); + $this->session->set('docList', $uri, 'doc'); + $this->session->set('todoList', $uri, 'my'); + $this->session->set('riskList', $uri, 'project'); + $this->session->set('issueList', $uri, 'project'); + $this->session->set('stakeholderList', $uri, 'project'); + $this->session->set('meetingroomList', $uri, 'admin'); + $this->session->set('meetingList', $uri, 'project'); + $this->session->set('meetingList', $uri, 'assetlib'); + $this->session->set('storyLibList', $uri, 'assetlib'); + $this->session->set('issueLibList', $uri, 'assetlib'); + $this->session->set('riskLibList', $uri, 'assetlib'); + $this->session->set('opportunityLibList', $uri, 'assetlib'); + $this->session->set('practiceLibList', $uri, 'assetlib'); + $this->session->set('componentLibList', $uri, 'assetlib'); /* Set the pager. */ $this->app->loadClass('pager', $static = true);