* Assign switcherObjectID, and all products are displayed only if multiple products exist.
This commit is contained in:
@@ -609,11 +609,12 @@ class execution extends control
|
||||
|
||||
$this->executionZen->assignTestcaseVars($executionID, $productID, $branchID, $moduleID, $orderBy, $type, $pager);
|
||||
|
||||
$this->view->execution = $execution;
|
||||
$this->view->productOption = $productOption;
|
||||
$this->view->branchOption = $branchOption;
|
||||
$this->view->switcherParams = "executionID={$executionID}&productID={$productID}¤tMethod=testcase";
|
||||
$this->view->switcherText = isset($products[$productID]) ? $products[$productID]->name : $this->lang->product->all;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->productOption = $productOption;
|
||||
$this->view->branchOption = $branchOption;
|
||||
$this->view->switcherParams = "executionID={$executionID}&productID={$productID}¤tMethod=testcase";
|
||||
$this->view->switcherText = isset($products[$productID]) ? $products[$productID]->name : $this->lang->product->all;
|
||||
$this->view->switcherObjectID = $productID;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,13 +15,18 @@ namespace zin;
|
||||
* Define the grouped data list.
|
||||
*/
|
||||
|
||||
$defaultItem = array();
|
||||
$defaultItem['id'] = 0;
|
||||
$defaultItem['text'] = $lang->product->all;
|
||||
$defaultItem['active'] = $productID == 0;
|
||||
$defaultItem['type'] = 'product';
|
||||
$data = array('normal' => array(), 'closed' => array());
|
||||
|
||||
$data = array('normal' => array($defaultItem), 'closed' => array());
|
||||
if(count($products) > 1)
|
||||
{
|
||||
$defaultItem = array();
|
||||
$defaultItem['id'] = 0;
|
||||
$defaultItem['text'] = $lang->product->all;
|
||||
$defaultItem['active'] = $productID == 0;
|
||||
$defaultItem['type'] = 'product';
|
||||
|
||||
$data['normal'][] = $defaultItem;
|
||||
}
|
||||
|
||||
foreach($products as $product)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user