Merge branch 'sprint/170_mayue_44493,44494' into 'sprint/170'

* Finish task #44493,44494.

See merge request easycorp/zentaopms!477
This commit is contained in:
李玉春
2021-11-17 02:33:33 +00:00
7 changed files with 33 additions and 11 deletions
+9 -2
View File
@@ -174,7 +174,6 @@ class testcase extends control
$this->testcase->buildSearchForm($productID, $this->products, $queryID, $actionURL);
$showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : '';
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
/* Get module tree.*/
if($projectID and empty($productID))
@@ -186,13 +185,20 @@ class testcase extends control
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createCaseLink'), '', $branch);
}
$product = $this->product->getById($productID);
if($product and $product->type != 'normal')
{
$this->app->loadLang('datatable');
$this->lang->datatable->showBranch = sprintf($this->lang->datatable->showBranch, $this->lang->product->branchName[$product->type]);
}
/* Assign. */
$tree = $moduleID ? $this->tree->getByID($moduleID) : '';
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common;
$this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch"), $this->products[$productID]);
$this->view->position[] = $this->lang->testcase->common;
$this->view->productID = $productID;
$this->view->product = $this->product->getById($productID);
$this->view->product = $product;
$this->view->productName = $this->products[$productID];
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch);
$this->view->moduleTree = $moduleTree;
@@ -211,6 +217,7 @@ class testcase extends control
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
$this->view->suiteID = $suiteID;
$this->view->setModule = true;
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
$this->display();
}