* adjust code.

This commit is contained in:
wangyidong
2015-11-05 11:32:04 +08:00
parent 388df75ec1
commit da84d5164c
2 changed files with 2 additions and 4 deletions

View File

@@ -473,7 +473,6 @@ class testcase extends control
if($from == 'testtask') $run = $this->loadModel('testtask')->getRunByCase($taskID, $caseID);
$productID = $case->product;
$product = $this->loadModel('product')->getById($productID);
$this->testcase->setMenu($this->products, $productID, $case->branch);
$this->view->title = "CASE #$case->id $case->title - " . $this->products[$productID];
@@ -486,8 +485,7 @@ class testcase extends control
$this->view->taskID = $taskID;
$this->view->version = $version ? $version : $case->version;
$this->view->productName = $this->products[$productID];
$this->view->product = $product;
$this->view->branchName = $product->type == 'normal' ? '' : $this->loadModel('branch')->getById($case->branch);
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : $this->loadModel('branch')->getById($case->branch);
$this->view->modulePath = $this->tree->getParents($case->module);
$this->view->users = $this->user->getPairs('noletter');
$this->view->actions = $this->loadModel('action')->getList('case', $caseID);

View File

@@ -122,7 +122,7 @@
<th class='w-60px'><?php echo $lang->testcase->product;?></th>
<td><?php if(!common::printLink('testcase', 'browse', "productID=$case->product", $productName)) echo $productName;?></td>
</tr>
<?php if($product->type != 'normal'):?>
<?php if($this->session->currentProductType != 'normal'):?>
<tr>
<th><?php echo $lang->product->branch;?></th>
<td><?php if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$case->branch", $branchName)) echo $branchName;?></td>