* finish task #2861.
This commit is contained in:
@@ -533,23 +533,24 @@ $lang->testcase->methodOrder[80] = 'unlinkCase';
|
||||
|
||||
/* Test task. */
|
||||
$lang->resource->testtask = new stdclass();
|
||||
$lang->resource->testtask->index = 'index';
|
||||
$lang->resource->testtask->create = 'create';
|
||||
$lang->resource->testtask->browse = 'browse';
|
||||
$lang->resource->testtask->view = 'view';
|
||||
$lang->resource->testtask->cases = 'lblCases';
|
||||
$lang->resource->testtask->groupCase = 'groupCase';
|
||||
$lang->resource->testtask->edit = 'edit';
|
||||
$lang->resource->testtask->start = 'start';
|
||||
$lang->resource->testtask->close = 'close';
|
||||
$lang->resource->testtask->delete = 'delete';
|
||||
$lang->resource->testtask->batchAssign = 'batchAssign';
|
||||
$lang->resource->testtask->linkcase = 'linkCase';
|
||||
$lang->resource->testtask->unlinkcase = 'lblUnlinkCase';
|
||||
$lang->resource->testtask->runcase = 'lblRunCase';
|
||||
$lang->resource->testtask->results = 'lblResults';
|
||||
$lang->resource->testtask->results = 'lblResults';
|
||||
$lang->resource->testtask->batchRun = 'batchRun';
|
||||
$lang->resource->testtask->index = 'index';
|
||||
$lang->resource->testtask->create = 'create';
|
||||
$lang->resource->testtask->browse = 'browse';
|
||||
$lang->resource->testtask->view = 'view';
|
||||
$lang->resource->testtask->cases = 'lblCases';
|
||||
$lang->resource->testtask->groupCase = 'groupCase';
|
||||
$lang->resource->testtask->edit = 'edit';
|
||||
$lang->resource->testtask->start = 'start';
|
||||
$lang->resource->testtask->close = 'close';
|
||||
$lang->resource->testtask->delete = 'delete';
|
||||
$lang->resource->testtask->batchAssign = 'batchAssign';
|
||||
$lang->resource->testtask->linkcase = 'linkCase';
|
||||
$lang->resource->testtask->unlinkcase = 'lblUnlinkCase';
|
||||
$lang->resource->testtask->batchUnlinkCases = 'batchUnlinkCases';
|
||||
$lang->resource->testtask->runcase = 'lblRunCase';
|
||||
$lang->resource->testtask->results = 'lblResults';
|
||||
$lang->resource->testtask->results = 'lblResults';
|
||||
$lang->resource->testtask->batchRun = 'batchRun';
|
||||
|
||||
$lang->testtask->methodOrder[0] = 'index';
|
||||
$lang->testtask->methodOrder[5] = 'create';
|
||||
@@ -566,6 +567,7 @@ $lang->testtask->methodOrder[55] = 'linkcase';
|
||||
$lang->testtask->methodOrder[60] = 'unlinkcase';
|
||||
$lang->testtask->methodOrder[65] = 'runcase';
|
||||
$lang->testtask->methodOrder[70] = 'results';
|
||||
$lang->testtask->methodOrder[75] = 'batchUnlinkCases';
|
||||
|
||||
/* Doc. */
|
||||
$lang->resource->doc = new stdclass();
|
||||
|
||||
@@ -653,6 +653,26 @@ class testtask extends control
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch unlink cases.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchUnlinkCases($taskID)
|
||||
{
|
||||
if(isset($_POST['caseIDList']))
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_TESTRUN)
|
||||
->where('task')->eq((int)$taskID)
|
||||
->andWhere('`case`')->in($this->post->caseIDList)
|
||||
->exec();
|
||||
}
|
||||
|
||||
die(js::locate($this->createLink('testtask', 'cases', "taskID=$taskID")));
|
||||
}
|
||||
|
||||
/**
|
||||
* Run case.
|
||||
*
|
||||
|
||||
+23
-22
@@ -9,28 +9,29 @@
|
||||
* @version $Id: en.php 4490 2013-02-27 03:27:05Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->testtask->index = "Index";
|
||||
$lang->testtask->create = "Create";
|
||||
$lang->testtask->delete = "Delete";
|
||||
$lang->testtask->view = "Info";
|
||||
$lang->testtask->edit = "Edit";
|
||||
$lang->testtask->browse = "Test Tasks";
|
||||
$lang->testtask->linkCase = "Relate Cases";
|
||||
$lang->testtask->unlinkCase = "Unrelate";
|
||||
$lang->testtask->batchAssign = "Batch Assign";
|
||||
$lang->testtask->runCase = "Run";
|
||||
$lang->testtask->batchRun = "Batch Run";
|
||||
$lang->testtask->results = "Result";
|
||||
$lang->testtask->createBug = "Bug(+)";
|
||||
$lang->testtask->assign = 'Assign';
|
||||
$lang->testtask->cases = 'Cases';
|
||||
$lang->testtask->groupCase = "View By";
|
||||
$lang->testtask->pre = 'Previous';
|
||||
$lang->testtask->next = 'Next';
|
||||
$lang->testtask->start = "Start";
|
||||
$lang->testtask->close = "Close";
|
||||
$lang->testtask->wait = "Build to be Tested";
|
||||
$lang->testtask->done = "Tested Build";
|
||||
$lang->testtask->index = "Index";
|
||||
$lang->testtask->create = "Create";
|
||||
$lang->testtask->delete = "Delete";
|
||||
$lang->testtask->view = "Info";
|
||||
$lang->testtask->edit = "Edit";
|
||||
$lang->testtask->browse = "Test Tasks";
|
||||
$lang->testtask->linkCase = "Relate Cases";
|
||||
$lang->testtask->unlinkCase = "Unrelate";
|
||||
$lang->testtask->batchUnlinkCases = "Batch unlink cases";
|
||||
$lang->testtask->batchAssign = "Batch Assign";
|
||||
$lang->testtask->runCase = "Run";
|
||||
$lang->testtask->batchRun = "Batch Run";
|
||||
$lang->testtask->results = "Result";
|
||||
$lang->testtask->createBug = "Bug(+)";
|
||||
$lang->testtask->assign = 'Assign';
|
||||
$lang->testtask->cases = 'Cases';
|
||||
$lang->testtask->groupCase = "View By";
|
||||
$lang->testtask->pre = 'Previous';
|
||||
$lang->testtask->next = 'Next';
|
||||
$lang->testtask->start = "Start";
|
||||
$lang->testtask->close = "Close";
|
||||
$lang->testtask->wait = "Build to be Tested";
|
||||
$lang->testtask->done = "Tested Build";
|
||||
|
||||
$lang->testtask->common = 'Test build';
|
||||
$lang->testtask->product = $lang->productCommon;
|
||||
|
||||
@@ -9,28 +9,29 @@
|
||||
* @version $Id: zh-cn.php 4490 2013-02-27 03:27:05Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->testtask->index = "版本首页";
|
||||
$lang->testtask->create = "提交测试";
|
||||
$lang->testtask->delete = "删除版本";
|
||||
$lang->testtask->view = "概况";
|
||||
$lang->testtask->edit = "编辑版本";
|
||||
$lang->testtask->browse = "版本列表";
|
||||
$lang->testtask->linkCase = "关联用例";
|
||||
$lang->testtask->unlinkCase = "移除";
|
||||
$lang->testtask->batchAssign = "批量指派";
|
||||
$lang->testtask->runCase = "执行";
|
||||
$lang->testtask->batchRun = "批量执行";
|
||||
$lang->testtask->results = "结果";
|
||||
$lang->testtask->createBug = "提Bug";
|
||||
$lang->testtask->assign = '指派';
|
||||
$lang->testtask->cases = '用例';
|
||||
$lang->testtask->groupCase = "分组浏览用例";
|
||||
$lang->testtask->pre = '上一个';
|
||||
$lang->testtask->next = '下一个';
|
||||
$lang->testtask->start = "开始";
|
||||
$lang->testtask->close = "关闭";
|
||||
$lang->testtask->wait = "待测版本";
|
||||
$lang->testtask->done = "已测版本";
|
||||
$lang->testtask->index = "版本首页";
|
||||
$lang->testtask->create = "提交测试";
|
||||
$lang->testtask->delete = "删除版本";
|
||||
$lang->testtask->view = "概况";
|
||||
$lang->testtask->edit = "编辑版本";
|
||||
$lang->testtask->browse = "版本列表";
|
||||
$lang->testtask->linkCase = "关联用例";
|
||||
$lang->testtask->unlinkCase = "移除";
|
||||
$lang->testtask->batchUnlinkCases = "批量移除用例";
|
||||
$lang->testtask->batchAssign = "批量指派";
|
||||
$lang->testtask->runCase = "执行";
|
||||
$lang->testtask->batchRun = "批量执行";
|
||||
$lang->testtask->results = "结果";
|
||||
$lang->testtask->createBug = "提Bug";
|
||||
$lang->testtask->assign = '指派';
|
||||
$lang->testtask->cases = '用例';
|
||||
$lang->testtask->groupCase = "分组浏览用例";
|
||||
$lang->testtask->pre = '上一个';
|
||||
$lang->testtask->next = '下一个';
|
||||
$lang->testtask->start = "开始";
|
||||
$lang->testtask->close = "关闭";
|
||||
$lang->testtask->wait = "待测版本";
|
||||
$lang->testtask->done = "已测版本";
|
||||
|
||||
$lang->testtask->common = '测试视图版本';
|
||||
$lang->testtask->product = '所属' . $lang->productCommon;
|
||||
|
||||
@@ -50,29 +50,38 @@ var moduleID = '<?php echo $moduleID;?>';
|
||||
<td colspan='10'>
|
||||
<?php if($runs):?>
|
||||
<div class='table-actions clearfix'>
|
||||
<?php
|
||||
if($hasCheckbox) echo html::selectButton();
|
||||
if($canBatchEdit)
|
||||
{
|
||||
<?php if($hasCheckbox) echo html::selectButton();?>
|
||||
<div class='btn-group dropup'>
|
||||
<?php
|
||||
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID");
|
||||
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
|
||||
}
|
||||
if($canBatchAssign)
|
||||
{
|
||||
$actionLink = inLink('batchAssign', "taskID=$task->id");
|
||||
echo "<div class='input-group w-200px'>";
|
||||
echo html::select('assignedTo', $assignedTos, '', 'class="form-control chosen"');
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a("javascript:setFormAction(\"$actionLink\")", $lang->testtask->assign);
|
||||
echo '</span></div>';
|
||||
}
|
||||
if($canBatchRun)
|
||||
{
|
||||
$actionLink = inLink('batchRun', "productID=$productID&orderBy=id_desc&from=testtask&taskID=$taskID");
|
||||
echo html::commonButton($lang->testtask->runCase, "onclick=\"setFormAction('$actionLink')\"");
|
||||
}
|
||||
?>
|
||||
|
||||
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
?>
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php
|
||||
$actionLink = $this->createLink('testtask', 'batchUnlinkCases', "taskID=$task->id");
|
||||
$misc = common::hasPriv('testtask', 'batchUnlinkCases') ? "onclick=\"setFormAction('$actionLink')\"" : "class='disabled'";
|
||||
echo "<li>" . html::a('javascript:;', $lang->testtask->unlinkCase, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
if($canBatchAssign)
|
||||
{
|
||||
$actionLink = inLink('batchAssign', "taskID=$task->id");
|
||||
echo "<div class='input-group w-200px'>";
|
||||
echo html::select('assignedTo', $assignedTos, '', 'class="form-control chosen"');
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a("javascript:setFormAction(\"$actionLink\")", $lang->testtask->assign);
|
||||
echo '</span></div>';
|
||||
}
|
||||
if($canBatchRun)
|
||||
{
|
||||
$actionLink = inLink('batchRun', "productID=$productID&orderBy=id_desc&from=testtask&taskID=$taskID");
|
||||
echo html::commonButton($lang->testtask->runCase, "onclick=\"setFormAction('$actionLink')\"");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo $pager->show();?>
|
||||
|
||||
Reference in New Issue
Block a user