* code for task#1598.

This commit is contained in:
xia0ta0
2013-07-29 14:20:59 +08:00
parent 43d88caed4
commit cbb533f0b8
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -323,12 +323,13 @@ class testcase extends control
/**
* View a test case.
*
* @param int $caseID
* @param int $version
* @param int $caseID
* @param int $version
* @param string $from
* @access public
* @return void
*/
public function view($caseID, $version = 0)
public function view($caseID, $version = 0, $from = 'testcase')
{
$case = $this->testcase->getById($caseID, $version);
if(!$case) die(js::error($this->lang->notFound) . js::locate('back'));
@@ -341,6 +342,7 @@ class testcase extends control
$this->view->position[] = $this->lang->testcase->view;
$this->view->case = $case;
$this->view->from = $from;
$this->view->version = $version ? $version : $case->version;
$this->view->productName = $this->products[$productID];
$this->view->modulePath = $this->tree->getParents($case->module);
+1 -1
View File
@@ -174,7 +174,7 @@
<td>
<?php
echo $lang->testcase->statusList[$case->status];
if($case->version > $case->currentVersion)
if($case->version > $case->currentVersion and $from == 'testtask')
{
echo " (<span class='warning'>{$lang->testcase->changed}</span> ";
echo html::a($this->createLink('testcase', 'confirmchange', "caseID=$case->id"), $lang->confirm, 'hiddenwin');