* adjust style.

This commit is contained in:
pengjiangxiu
2017-03-20 13:24:07 +08:00
parent f43682fec8
commit 1de940c5aa
17 changed files with 150 additions and 108 deletions
+1
View File
@@ -200,6 +200,7 @@ class bug extends control
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
$this->app->loadLang('release');
a($_POST);exit;
if(!empty($_POST) and !isset($_POST['stepIDList']))
{
$response['result'] = 'success';
+1 -2
View File
@@ -583,8 +583,7 @@ class project extends control
$position[] = $this->lang->project->story;
/* Count T B C */
$storyIdList = array();
foreach($stories as $story) $storyIdList[$story->id] = $story->id;
$storyIdList = array_keys($stories);;
$storyTasks = $this->loadModel('task')->getStoryTaskCounts($storyIdList,$projectID);
$storyBugs = $this->loadModel('bug')->getStoryBugCounts($storyIdList,$projectID);
$storyCases = $this->loadModel('testcase')->getStoryCaseCounts($storyIdList);
+30 -30
View File
@@ -103,7 +103,7 @@ class testcase extends control
/* Process case for check story changed. */
$cases = $this->loadModel('story')->checkNeedConfirm($cases);
$cases = $this->testcase->appendBugAndResults($cases);
$cases = $this->testcase->appendData($cases);
/* Build the search form. */
$actionURL = $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID");
@@ -169,7 +169,7 @@ class testcase extends control
$cases = $this->testcase->getModuleCases($productID, $branch, 0, $groupBy);
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
$cases = $this->testcase->appendBugAndResults($cases);
$cases = $this->testcase->appendData($cases);
$groupCases = array();
$groupByList = array();
@@ -360,7 +360,6 @@ class testcase extends control
/* Get the status of stories are not closed. */
$storyStatus = $this->lang->story->statusList;
//unset($storyStatus['closed']);
$modules = array();
if($currentModuleID)
{
@@ -501,6 +500,7 @@ class testcase extends control
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->createBug;
$this->view->runID = $runID;
$this->view->case = $case;
$this->view->caseID = $caseID;
$this->view->version = $version;
$this->display();
@@ -545,22 +545,22 @@ class testcase extends control
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : $this->loadModel('branch')->getById($case->branch);
}
$caseFailCount = $this->dao->select('`case` AS name, COUNT(*) AS value')->from(TABLE_TESTRESULT)->where('caseResult')->eq('fail')->andwhere('`case`')->eq($caseID)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
$caseFails = $this->dao->select('`case` AS name, COUNT(*) AS value')->from(TABLE_TESTRESULT)->where('caseResult')->eq('fail')->andwhere('`case`')->eq($caseID)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
$this->view->position[] = $this->lang->testcase->common;
$this->view->position[] = $this->lang->testcase->view;
$this->view->case = $case;
$this->view->from = $from;
$this->view->taskID = $taskID;
$this->view->version = $version ? $version : $case->version;
$this->view->modulePath = $this->tree->getParents($case->module);
$this->view->users = $this->user->getPairs('noletter');
$this->view->actions = $this->loadModel('action')->getList('case', $caseID);
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('testcase', $caseID);
$this->view->runID = $from == 'testcase' ? 0 : $run->id;
$this->view->isLibCase = $isLibCase;
$this->view->caseFailCount = $caseFailCount ? $caseFailCount : 0;
$this->view->case = $case;
$this->view->from = $from;
$this->view->taskID = $taskID;
$this->view->version = $version ? $version : $case->version;
$this->view->modulePath = $this->tree->getParents($case->module);
$this->view->users = $this->user->getPairs('noletter');
$this->view->actions = $this->loadModel('action')->getList('case', $caseID);
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('testcase', $caseID);
$this->view->runID = $from == 'testcase' ? 0 : $run->id;
$this->view->isLibCase = $isLibCase;
$this->view->caseFails = $caseFails ? $caseFails : 0;
$this->display();
}
@@ -913,21 +913,6 @@ class testcase extends control
die(js::locate($this->session->caseList));
}
/**
* Batch ctory change cases.
*
* @param int $productID
* @access public
* @return void
*/
public function batchStoryChange($productID = 0)
{
$caseIDList = $this->post->caseIDList ? $this->post->caseIDList : die(js::locate($this->session->caseList));
foreach($caseIDList as $caseID) $this->confirmStoryChange($caseID,false);
die(js::locate($this->session->caseList));
}
/**
* Link related cases.
*
@@ -1043,6 +1028,21 @@ class testcase extends control
if($reload) die(js::reload('parent'));
}
/**
* Batch ctory change cases.
*
* @param int $productID
* @access public
* @return void
*/
public function batchConfirmStoryChange($productID = 0)
{
$caseIDList = $this->post->caseIDList ? $this->post->caseIDList : die(js::locate($this->session->caseList));
foreach($caseIDList as $caseID) $this->confirmStoryChange($caseID,false);
die(js::locate($this->session->caseList));
}
/**
* export
*
+30 -31
View File
@@ -64,40 +64,39 @@ $lang->testcase->stepDesc = '步骤';
$lang->testcase->stepExpect = '预期';
$lang->testcase->stepVersion = '版本';
$lang->testcase->common = '用例';
$lang->testcase->index = "用例管理首页";
$lang->testcase->create = "建用例";
$lang->testcase->batchCreate = "批量添加";
$lang->testcase->delete = "删除用例";
$lang->testcase->view = "用例详情";
$lang->testcase->review = "评审";
$lang->testcase->edit = "编辑";
$lang->testcase->batchEdit = "批量编辑 ";
$lang->testcase->batchChangeModule = "批量修改模块";
$lang->testcase->delete = "删除";
$lang->testcase->batchDelete = "批量删除 ";
$lang->testcase->batchStoryChange = "确认变更";
$lang->testcase->batchReview = '批量评审';
$lang->testcase->browse = "用例列表";
$lang->testcase->groupCase = "分组浏览用例";
$lang->testcase->import = "导入";
$lang->testcase->importFile = "导入CSV";
$lang->testcase->importFromLib = "从用例库中导入";
$lang->testcase->showImport = "显示导入内容";
$lang->testcase->exportTemplet = "导出模板";
$lang->testcase->export = "导出数据";
$lang->testcase->reportChart = '报表统计';
$lang->testcase->confirmChange = '确认用例变动';
$lang->testcase->confirmStoryChange = '确认需求变动';
$lang->testcase->copy = '复制用例';
$lang->testcase->group = '分组';
$lang->testcase->groupName = '分组名称';
$lang->testcase->step = '步骤';
$lang->testcase->stepChild = '子步骤';
$lang->testcase->common = '用例';
$lang->testcase->index = "用例管理首页";
$lang->testcase->create = "建用例";
$lang->testcase->batchCreate = "批量添加";
$lang->testcase->delete = "删除用例";
$lang->testcase->view = "用例详情";
$lang->testcase->review = "评审";
$lang->testcase->edit = "编辑";
$lang->testcase->batchEdit = "批量编辑 ";
$lang->testcase->batchChangeModule = "批量修改模块";
$lang->testcase->delete = "删除";
$lang->testcase->batchDelete = "批量删除 ";
$lang->testcase->batchConfirmStoryChange = "确认变更";
$lang->testcase->browse = "用例列表";
$lang->testcase->groupCase = "分组浏览用例";
$lang->testcase->import = "导入";
$lang->testcase->importFile = "导入CSV";
$lang->testcase->importFromLib = "从库中导入";
$lang->testcase->showImport = "显示导入内容";
$lang->testcase->exportTemplet = "导出模板";
$lang->testcase->export = "导出数据";
$lang->testcase->reportChart = '报表统计';
$lang->testcase->confirmChange = '确认用例变动';
$lang->testcase->confirmStoryChange = '确认需求变动';
$lang->testcase->copy = '复制用例';
$lang->testcase->group = '分组';
$lang->testcase->groupName = '分组名称';
$lang->testcase->step = '步骤';
$lang->testcase->stepChild = '子步骤';
$lang->testcase->new = '新增';
$lang->testcase->num = '用例记录数:';
$lang->testcase->num = '用例记录数:';
$lang->testcase->deleteStep = '删除';
$lang->testcase->insertBefore = '之前添加';
+23 -9
View File
@@ -864,7 +864,7 @@ class testcaseModel extends model
{
$action = strtolower($action);
if($action == 'createbug') return $case->caseFailCount > 0;
if($action == 'createbug') return $case->caseFails > 0;
if($action == 'review') return $case->status == 'wait';
return true;
@@ -1258,18 +1258,25 @@ class testcaseModel extends model
* Append bugs and results.
*
* @param array $cases
* @param string $type
* @access public
* @return array
*/
public function appendBugAndResults($cases, $type = 'case')
public function appendData($cases, $type = 'case')
{
$caseIdList = array_keys($cases);
if($type == 'case')
{
$caseBugs = $this->dao->select('count(*) as count, `case`')->from(TABLE_BUG)->where('`case`')->in($caseIdList)->andWhere('deleted')->eq(0)->groupBy('`case`')->fetchPairs('case', 'count');
$results = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)->where('`case`')->in($caseIdList)->groupBy('`case`')->fetchPairs('case', 'count');
$caseFailCount = $this->dao->select('`case` AS name, COUNT(*) AS value')->from(TABLE_TESTRESULT)->where('caseResult')->eq('fail')->andwhere('`case`')->in($caseIdList)->groupBy('name')->orderBy('value DESC')->fetchPairs('name','value');
$stepNumber = $this->dao->select('count(distinct t1.id) as count, t1.`case`')->from(TABLE_CASESTEP)->alias('t1')
$caseFails = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)
->where('caseResult')->eq('fail')
->andwhere('`case`')->in($caseIdList)
->groupBy('`case`')
->fetchPairs('case','count');
$steps = $this->dao->select('count(distinct t1.id) as count, t1.`case`')->from(TABLE_CASESTEP)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.`case`=t2.`id`')
->where('t1.`case`')->in($caseIdList)
->andWhere('t1.type')->eq('item')
@@ -1281,7 +1288,14 @@ class testcaseModel extends model
{
$caseBugs = $this->dao->select('count(*) as count, `case`')->from(TABLE_BUG)->where('`result`')->in($caseIdList)->andWhere('deleted')->eq(0)->groupBy('`case`')->fetchPairs('case', 'count');
$results = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)->where('`run`')->in($caseIdList)->groupBy('`run`')->fetchPairs('case', 'count');
$stepNumber = $this->dao->select('count(distinct t1.id) as count, t1.`case`')->from(TABLE_CASESTEP)->alias('t1')
$caseFails = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)
->where('caseResult')->eq('fail')
->andwhere('`case`')->in($caseIdList)
->groupBy('`case`')
->fetchPairs('case','count');
$steps = $this->dao->select('count(distinct t1.id) as count, t1.`case`')->from(TABLE_CASESTEP)->alias('t1')
->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.`case`=t2.`case`')
->where('t2.`id`')->in($caseIdList)
->andWhere('t1.type')->eq('item')
@@ -1293,10 +1307,10 @@ class testcaseModel extends model
foreach($cases as $key => $case)
{
$caseID = $type == 'case' ? $case->id : $case->case;
$case->bugs = isset($caseBugs[$caseID]) ? $caseBugs[$caseID] : 0;
$case->results = isset($results[$caseID]) ? $results[$caseID] : 0;
$case->caseFailCount = isset($caseFailCount[$caseID])? $caseFailCount[$caseID] : 0;
$case->stepNumber = isset($stepNumber[$caseID]) ? $stepNumber[$caseID] : 0;
$case->bugs = isset($caseBugs[$caseID]) ? $caseBugs[$caseID] : 0;
$case->results = isset($results[$caseID]) ? $results[$caseID] : 0;
$case->caseFails = isset($caseFails[$caseID]) ? $caseFails[$caseID] : 0;
$case->stepNumber = isset($stepNumber[$caseID]) ? $stepNumber[$caseID] : 0;
}
return $cases;
+3 -3
View File
@@ -85,9 +85,9 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
echo '<li>' . html::a('javascript:;', $lang->testcase->review, '', $class) . '</li>';
}
$actionLink = $this->createLink('testcase', 'batchStoryChange', "productID=$productID");
$misc = common::hasPriv('testcase', 'batchStoryChange') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
echo "<li>" . html::a('#', $lang->testcase->batchStoryChange, '', $misc) . "</li>";
$actionLink = $this->createLink('testcase', 'batchConfirmStoryChange', "productID=$productID");
$misc = common::hasPriv('testcase', 'batchConfirmStoryChange') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
echo "<li>" . html::a('#', $lang->testcase->batchConfirmStoryChange, '', $misc) . "</li>";
$actionLink = $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy");
$misc = common::hasPriv('testtask', 'batchRun') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<form target='_parent' method='post'>
<form action='<?php echo $this->createLink('bug', 'create', "product=$case->product&branch=$case->branch&extras=caseID=$case->id,version=$case->version,runID=")?>' target='_parent' method='post'>
<div class='main' id='resultsContainer'>
</div>
</form>
+1 -1
View File
@@ -48,7 +48,7 @@
common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$case->id&version=$case->currentVersion", '', 'button', '', '', 'runCase', false, "data-width='95%'");
common::printIcon('testtask', 'results', "runID=$runID&caseID=$case->id&version=$case->version", '', 'button', '', '', 'results', false, "data-width='95%'");
if($caseFailCount > 0) common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=$runID", '', 'button', 'bug', '', 'iframe', '', "data-width='90%'");
if($caseFails > 0) common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=$runID", '', 'button', 'bug', '', 'iframe', '', "data-width='90%'");
}
if($config->testcase->needReview) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'button', 'review', '', 'iframe');
echo '</div>';
+1 -1
View File
@@ -237,7 +237,7 @@ class testsuiteModel extends model
if(!$append) return $cases;
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
return $this->loadModel('testcase')->appendBugAndResults($cases);
return $this->loadModel('testcase')->appendData($cases);
}
/**
+9 -5
View File
@@ -50,11 +50,15 @@ class testtask extends control
* @access public
* @return void
*/
public function browse($productID = 0, $branch = '', $type = 'wait', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $branch = '', $type = 'local,wait', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true));
$scopeAndStatus = explode(',',$type);
$this->session->set('testTaskVersionScope', $scopeAndStatus[0]);
$this->session->set('testTaskVersionStatus', $scopeAndStatus[1]);
/* Set menu. */
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = (int)$this->cookie->preBranch;
@@ -73,10 +77,10 @@ class testtask extends control
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->orderBy = $orderBy;
$this->view->tasks = $this->testtask->getProductTasks($productID, $branch, $sort, $pager, $type);
$this->view->tasks = $this->testtask->getProductTasks($productID, $branch, $sort, $pager, $scopeAndStatus);
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->pager = $pager;
$this->view->type = $type;
$this->view->type = $scopeAndStatus[1];
$this->view->branch = $branch;
$this->display();
@@ -267,7 +271,7 @@ class testtask extends control
$this->loadModel('search')->setSearchParams($this->config->testcase->search);
/* Append bugs and results. */
$runs = $this->testcase->appendBugAndResults($runs, 'run');
$runs = $this->testcase->appendData($runs, 'run');
$moduleTree = $this->loadModel('tree')->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createTestTaskLink'), $extra = $taskID);
$libModuleTree = $this->tree->getCaseLibTreeInCase('testtask', $taskID, array('treeModel', 'createTestTaskLink'));
@@ -322,7 +326,7 @@ class testtask extends control
$runs = $this->testtask->getRuns($taskID, 0, $groupBy);
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
$runs = $this->testcase->appendBugAndResults($runs, 'run');
$runs = $this->testcase->appendData($runs, 'run');
$groupCases = array();
$groupByList = array();
+5 -4
View File
@@ -45,14 +45,13 @@ function loadFilesName()
$(document).ready(function()
{
/* First unbind ajaxForm for form.*/
// First unbind ajaxForm for form.
$("form[data-type='ajax']").unbind('submit');
setForm();
/* Bind ajaxForm for form again. */
// Bind ajaxForm for form again.
$.ajaxForm("form[data-type='ajax']", function(response)
{
console.info(response);
if(response.locate)
{
if(response.locate == 'reload' && response.target == 'parent')
@@ -62,6 +61,8 @@ $(document).ready(function()
} else if(response.next) {
location.href = response.locate;
} else {
// Get cases result
$('#resultsContainer').load(response.locate + " #casesResults", function()
{
$('#tr-detail_1').show();
@@ -76,7 +77,7 @@ $(document).ready(function()
$('#casesResults table caption .result-tip').html($('#resultTip').html());
$("#submit").text('保存');
$("#submit").text(caseResultSave);
$("#submit").attr({"disabled":"disabled"});
});
}
+4 -1
View File
@@ -35,8 +35,11 @@ $lang->testtask->wait = "待测版本";
$lang->testtask->block = "阻塞";
$lang->testtask->activate = "激活";
$lang->testtask->testing = "测试中版本";
$lang->testtask->blockedA = "被阻塞版本";
$lang->testtask->blocked = "被阻塞版本";
$lang->testtask->done = "已测版本";
$lang->testtask->totalStatus = "全部";
$lang->testtask->all = "全部产品";
$lang->testtask->caseResultSave = "保存";
$lang->testtask->common = '测试视图版本';
$lang->testtask->product = '所属' . $lang->productCommon;
+5 -4
View File
@@ -67,7 +67,7 @@ class testtaskModel extends model
* @access public
* @return array
*/
public function getProductTasks($productID, $branch = 0, $orderBy = 'id_desc', $pager = null, $type = '')
public function getProductTasks($productID, $branch = 0, $orderBy = 'id_desc', $pager = null, $scopeAndStatus = array())
{
return $this->dao->select("t1.*, t2.name AS productName, t3.name AS projectName, t4.name AS buildName, if(t4.name != '', t4.branch, t5.branch) AS branch")
->from(TABLE_TESTTASK)->alias('t1')
@@ -75,10 +75,11 @@ class testtaskModel extends model
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project = t3.id')
->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = t4.id')
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.project = t5.project')
->where('t1.product')->eq((int)$productID)
->where('t1.deleted')->eq(0)
->beginIF($scopeAndStatus[0] == 'local')->andWhere('t1.product')->eq((int)$productID)->fi()
->andWhere('t5.product = t1.product')
->andWhere('t1.deleted')->eq(0)
->andWhere('t1.status')->eq($type)
->beginIF($scopeAndStatus[1] == 'totalStatus')->andWhere('t1.status')->in(array('blocked','doing','wait','done'))->fi()
->beginIF($scopeAndStatus[1] != 'totalStatus')->andWhere('t1.status')->eq($scopeAndStatus[1])->fi()
->beginIF($branch)->andWhere("if(t4.branch, t4.branch, t5.branch) = '$branch'")->fi()
->orderBy($orderBy)
->page($pager)
+34 -13
View File
@@ -12,13 +12,35 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmDelete', $lang->testtask->confirmDelete)?>
<div id="featurebar">
<ul class="nav">
<li id='waitTab'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=wait"), $lang->testtask->wait);?></li>
<li id='doingTab'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=doing"), $lang->testtask->testing);?></li>
<li id='blockedTab'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=blocked"), $lang->testtask->blockedA);?></li>
<li id='doneTab'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=done"), $lang->testtask->done);?></li>
<li>
<span class='dropdown'>
<?php
$scope = $this->session->testTaskVersionScope;
$status = $this->session->testTaskVersionStatus;
$viewName = $scope == 'local'? $productName : $lang->testtask->all;
?>
<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'><?php echo $viewName?><span class='caret'></span></button>
<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>
<?php
echo "<li>" . html::a(inlink('browse', "productID=$productID&branch=$branch&type=all,$status"), $lang->testtask->all) . "</li>";
echo "<li>" . html::a(inlink('browse', "productID=$productID&branch=$branch&type=local,$status"), $productName) . "</li>";
?>
</ul>
</span>
</li>
<li id='waitTab'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,wait"), $lang->testtask->wait);?></li>
<li id='doingTab'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,doing"), $lang->testtask->testing);?></li>
<li id='blockedTab'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,blocked"), $lang->testtask->blocked);?></li>
<li id='doneTab'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,done"), $lang->testtask->done);?></li>
<li id='totalStatusTab'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,totalStatus"), $lang->testtask->totalStatus);?></li>
</ul>
<div class="actions"><?php common::printIcon('testtask', 'create', "product=$productID");?></div>
</div>
<table class='table tablesorter table-fixed' id='taskList'>
@@ -27,7 +49,9 @@
<tr>
<th class='w-id text-left'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-200px text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
<th class='text-left'> <?php echo $lang->testtask->project . '/' . $lang->testtask->build;?>
<th class='text-left'> <?php common::printOrderLink('product', $orderBy, $vars, $lang->testtask->product);?></th>
<th class='text-left'> <?php common::printOrderLink('project', $orderBy, $vars, $lang->testtask->project);?></th>
<th class='text-left'> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
<th class='w-user text-left'> <?php common::printOrderLink('owner', $orderBy, $vars, $lang->testtask->owner);?></th>
<th class='w-100px text-left'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->begin);?></th>
<th class='w-100px text-left'><?php common::printOrderLink('end', $orderBy, $vars, $lang->testtask->end);?></th>
@@ -38,14 +62,11 @@
<tbody>
<?php foreach($tasks as $task):?>
<tr class='text-left'>
<td><?php echo html::a(inlink('view', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
<td><?php echo html::a(inlink('cases', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
<td class='text-left' title="<?php echo $task->name?>"><?php echo html::a(inlink('cases', "taskID=$task->id"), $task->name);?></td>
<td title="<?php echo $task->projectName . '/' . $task->buildName?>">
<?php
echo $task->projectName . '/';
$task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));;
?>
</td>
<td title="<?php echo $task->productName?>"><?php echo $task->productName?></td>
<td title="<?php echo $task->projectName?>"><?php echo $task->projectName?></td>
<td><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName, '','class="iframe"'));?></td>
<td><?php echo zget($users, $task->owner);?></td>
<td><?php echo $task->begin?></td>
<td><?php echo $task->end?></td>
@@ -68,7 +89,7 @@
</tr>
<?php endforeach;?>
</tbody>
<tfoot><tr><td colspan='8'><?php $pager->show();?></td></tr></tfoot>
<tfoot><tr><td colspan='10'><?php $pager->show();?></td></tr></tfoot>
</table>
<script>$(function(){$('#<?php echo $type?>Tab').addClass('active')})</script>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -49,7 +49,7 @@
</tr>
<tr class='result-detail hide' id='tr-detail_<?php echo $trCount++; ?>'>
<td colspan='7' class='pd-0'>
<form action='<?php echo $this->createLink('bug', 'create', "product=$case->product&branch=$case->branch&extras=caseID=$case->id,version=$case->version,runID=")?>' target='_parent' method='post'>
<form action='<?php echo $this->createLink('bug', 'create', "product=$case->product&branch=$case->branch&extras=caseID=$case->id,version=$case->version,runID=")?>' target='_blank' method='post'>
<table class='table table-condensed borderless mg-0 resultSteps'>
<thead>
<tr>
+1
View File
@@ -12,6 +12,7 @@
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php include '../../common/view/form.html.php';?>
<?php js::set('caseResultSave', $lang->testtask->caseResultSave);?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['usecase']);?> <strong><?php echo $run->case->id;?></strong></span>
-2
View File
@@ -36,12 +36,10 @@ function loadList(type, id)
if(type == 'bug' || type == 'task')
{
//获取要待办的任务
$.get(link,function(data,status) {
if(data) {
$(divClass).html(data);
} else {
//没有指派给自己的任务进行提醒,并重置.
alert(noTodo);
$("#type").val("custom");
$(divClass).html($(divID).html());