* finish task #40900.

This commit is contained in:
wangyidong
2021-08-04 16:58:15 +08:00
parent 392f0b1525
commit 87a04e4857
4 changed files with 59 additions and 49 deletions
+19 -15
View File
@@ -40,25 +40,29 @@ class testtask extends control
$this->loadModel('product');
/* Get product data. */
$products = array();
$objectID = 0;
if($this->app->openApp == 'project')
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(!isonlybody())
{
$objectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($objectID, false);
}
elseif($this->app->openApp == 'execution')
{
$objectID = $this->session->execution;
$products = $this->loadModel('execution')->getProducts($objectID, false);
}
else
{
$products = $this->product->getPairs();
}
if($this->app->openApp == 'project')
{
$objectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($objectID, false);
}
elseif($this->app->openApp == 'execution')
{
$objectID = $this->session->execution;
$products = $this->loadModel('execution')->getProducts($objectID, false);
}
else
{
$products = $this->product->getPairs();
}
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
}
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
}
/**