* Finish task#37299.

This commit is contained in:
leiyong
2021-04-09 06:01:18 +03:00
parent d6d855b9dc
commit 14dd2012cc
7 changed files with 11 additions and 10 deletions

View File

@@ -66,7 +66,7 @@ class bug extends control
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID")));
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID")));
}
/**

View File

@@ -994,10 +994,11 @@ class product extends control
$this->lang->project->menuOrder = $this->lang->{$project->model}->menuOrder;
$this->app->rawModule = $activeMenu;
if($activeMenu == 'bug') $this->lang->{$project->model}->menu->qa['subMenu']->bug['subModule'] = 'product';
if($activeMenu == 'testcase') $this->lang->{$project->model}->menu->qa['subMenu']->testcase['subModule'] = 'product';
if($activeMenu == 'testtask') $this->lang->{$project->model}->menu->qa['subMenu']->testtask['subModule'] = 'product';
if($activeMenu == 'testreport') $this->lang->{$project->model}->menu->qa['subMenu']->testreport['subModule'] = 'product';
if($activeMenu == 'bug') $this->lang->{$project->model}->menu->qa['subMenu']->bug['subModule'] = 'product';
if($activeMenu == 'testcase') $this->lang->{$project->model}->menu->qa['subMenu']->testcase['subModule'] = 'product';
if($activeMenu == 'testtask') $this->lang->{$project->model}->menu->qa['subMenu']->testtask['subModule'] = 'product';
if($activeMenu == 'testreport') $this->lang->{$project->model}->menu->qa['subMenu']->testreport['subModule'] = 'product';
if($activeMenu == 'projectrelease') $this->lang->{$project->model}->menu->release['subModule'] = 'projectrelease';
}
elseif($moduleName == 'qa')
{

View File

@@ -29,7 +29,7 @@ class projectrelease extends control
$this->loadModel('release');
$this->loadModel('project');
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
if(empty($this->view->products)) $this->locate($this->createLink('product', 'create'));
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', 'moduleName=project&activeMenu=projectrelease&projectID=' . $this->session->project)));
}
/**

View File

@@ -60,7 +60,7 @@ class testcase extends control
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID")));
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID")));
}
/**

View File

@@ -63,7 +63,7 @@ class testreport extends control
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID")));
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID")));
}
/**

View File

@@ -32,7 +32,7 @@ class testsuite extends control
parent::__construct($moduleName, $methodName);
$this->view->products = $this->products = $this->loadModel('product')->getPairs();
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=qa&activeMenu=testsuite")));
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=qa&activeMenu=testsuite")));
}
/**

View File

@@ -58,7 +58,7 @@ class testtask extends control
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
}
/**