* Finish task#36500.

This commit is contained in:
qiyu-xie
2021-03-11 20:18:39 +08:00
parent a6764f4bc5
commit b8885bc1ea
3 changed files with 20 additions and 7 deletions
+6 -6
View File
@@ -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,';
+2 -1
View File
@@ -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')
{
+12
View File
@@ -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);