* Refact cases page and link case page of testtask.
This commit is contained in:
@@ -97,7 +97,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-col">
|
||||
<div class="cell" id="queryBox"></div>
|
||||
<form class="main-table table-story" data-ride="table" method="post" id='productStoryForm'>
|
||||
|
||||
@@ -151,7 +151,7 @@ class testreport extends control
|
||||
$build = $this->build->getById($task->build);
|
||||
$stories = empty($build->stories) ? array() : $this->story->getByList($build->stories);
|
||||
|
||||
$builds[$build->id] = $build;
|
||||
if(!empty($build->id)) $builds[$build->id] = $build;
|
||||
$bugs = $this->testreport->getBugs4Test($builds, $productID, $begin, $end);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($suites):?>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -69,6 +69,9 @@ js::set('flow', $this->config->global->flow);
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div id='pageActions'>
|
||||
<?php common::printLink('testsuite', 'libView', "libID=$libID", "<i class='icon icon-file-text'> </i>" . $lang->testsuite->view, '', "class='btn'");?>
|
||||
</div>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div id="sidebarHeader">
|
||||
<?php echo html::commonButton('<i class="icon icon-caret-left"></i>', '', 'btn btn-icon btn-sm btn-info sidebar-toggle');?>
|
||||
@@ -105,9 +108,6 @@ js::set('flow', $this->config->global->flow);
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<div id='pageActions'>
|
||||
<?php common::printLink('testsuite', 'libView', "libID=$libID", "<i class='icon icon-file-text'> </i>" . $lang->testsuite->view, '', "class='btn'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="side-col" id="sidebar">
|
||||
@@ -190,8 +190,8 @@ js::set('flow', $this->config->global->flow);
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($cases):?>
|
||||
<div class='table-footer'>
|
||||
<?php if($cases):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<div class='btn-group dropup'>
|
||||
@@ -244,9 +244,9 @@ js::set('flow', $this->config->global->flow);
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -72,15 +72,15 @@
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($cases):?>
|
||||
<div class='table-footer'>
|
||||
<?php if($cases):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class='table-actions btn-toolbar'>
|
||||
<?php echo html::submitButton('', '', 'btn');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -980,6 +980,6 @@ class testtask extends control
|
||||
->where('task')->eq((int)$taskID)
|
||||
->andWhere('`case`')->in($this->post->caseIDList)
|
||||
->exec();
|
||||
die(js::locate($this->session->caseList));
|
||||
die(js::locate($this->session->caseList, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
tbody > tr > td > .btn-icon {margin-right: 3px;}
|
||||
tbody > tr > td .icon-bug {margin-left: -8px;}
|
||||
|
||||
tfoot .table-actions #assignedTo_chosen a.chosen-default{height:26px;line-height:15px}
|
||||
tfoot .table-actions .input-group-addon{padding:4px 12px;}
|
||||
.table-footer .table-actions .input-group {float: left;}
|
||||
.table-footer .table-actions #assignedTo_chosen a.chosen-default{height:28px;line-height:15px}
|
||||
.table-footer .table-actions .input-group-addon{padding:4px 12px;}
|
||||
.table-footer
|
||||
.table-footer.fixedTfootAction .chosen-results li.active-result {color: black;}
|
||||
.table-footer .table-actions .input-group #assignedTo_chosen .chosen-single{height:28px;padding:3px 6px}
|
||||
.table-footer .table-actions .input-group #assignedTo_chosen .chosen-single span{font-size:12px;}
|
||||
.table-footer .table-actions .input-group #assignedTo_chosen .chosen-single div{line-height:10px;}
|
||||
|
||||
tfoot.fixedTfootAction .chosen-results li.active-result {color: black;}
|
||||
tfoot .table-actions .input-group #assignedTo_chosen .chosen-single{height:24px;padding:3px 6px}
|
||||
tfoot .table-actions .input-group #assignedTo_chosen .chosen-single span{font-size:12px;}
|
||||
tfoot .table-actions .input-group #assignedTo_chosen .chosen-single div{line-height:10px;}
|
||||
#pageActions {top: -60px;}
|
||||
|
||||
@@ -1132,16 +1132,23 @@ class testtaskModel extends model
|
||||
if($id == 'id') $class .= ' cell-id';
|
||||
if($id == 'lastRunResult') $class .= " $run->lastRunResult";
|
||||
if($id == 'assignedTo' && $run->assignedTo == $account) $class .= ' red';
|
||||
if($id == 'actions') $class .= 'c-actions';
|
||||
|
||||
echo "<td class='" . $class . "'" . ($id=='title' ? "title='{$run->title}'":'') . ">";
|
||||
switch ($id)
|
||||
{
|
||||
case 'id':
|
||||
if($mode == 'table') echo "<input type='checkbox' name='caseIDList[]' value='{$run->case}'/> ";
|
||||
echo $canView ? html::a($caseLink, sprintf('%03d', $run->case)) : sprintf('%03d', $run->case);
|
||||
if($mode == 'table')
|
||||
{
|
||||
echo html::checkbox('caseIDList', array($run->case => sprintf('%03d', $run->case)));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $canView ? html::a($caseLink, sprintf('%03d', $run->case)) : sprintf('%03d', $run->case);
|
||||
}
|
||||
break;
|
||||
case 'pri':
|
||||
echo "<span class='pri" . zget($this->lang->testcase->priList, $run->pri, $run->pri) . "'>";
|
||||
echo "<span class='label-pri label-pri-" . $run->pri . "'>";
|
||||
echo zget($this->lang->testcase->priList, $run->pri, $run->pri);
|
||||
echo "</span>";
|
||||
break;
|
||||
@@ -1222,7 +1229,7 @@ class testtaskModel extends model
|
||||
if(common::hasPriv('testtask', 'unlinkCase', $run))
|
||||
{
|
||||
$unlinkURL = helper::createLink('testtask', 'unlinkCase', "caseID=$run->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\",\"casesForm\",confirmUnlink)", '<i class="icon-unlink"></i>', '', "title='{$this->lang->testtask->unlinkCase}' class='btn-icon'");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\",\"casesForm\",confirmUnlink)", '<i class="icon-unlink"></i>', '', "title='{$this->lang->testtask->unlinkCase}' class='btn'");
|
||||
}
|
||||
|
||||
common::printIcon('testcase', 'createBug', "product=$run->product&branch=$run->branch&extra=projectID=$task->project,buildID=$task->build,caseID=$run->case,version=$run->version,runID=$run->id,testtask=$task->id", $run, 'list', 'bug', '', 'iframe', '', "data-width='90%'");
|
||||
|
||||
@@ -1,36 +1,39 @@
|
||||
<div id='featurebar'>
|
||||
<div class='heading'>
|
||||
<?php echo "<span class='prefix'>" . html::icon($lang->icons['usecase']) . '</span><strong>' . $task->name . '</strong>';?>
|
||||
<div id='pageActions'>
|
||||
<?php common::printLink('testtask', 'view', "taskID=$taskID", "<i class='icon icon-file-text'> </i>{$lang->testtask->view}</i>", '', "class='btn'");?>
|
||||
<?php common::printLink('testreport', 'browse', "objectID=$productID&objectType=product&extra=$taskID", "<span class='text'>{$lang->testtask->reportField}</span>", '', "class='btn'");?>
|
||||
</div>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div id='sidebarHeader'>
|
||||
<?php echo html::commonButton('<i class="icon icon-caret-left"></i>', '', 'btn btn-icon btn-sm btn-info sidebar-toggle');?>
|
||||
<div class="title">
|
||||
<?php
|
||||
$this->app->loadLang('tree');
|
||||
echo isset($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? inlink('cases', "taskID=$taskID&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("taskCaseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='nav'>
|
||||
<li>
|
||||
<div class='label-angle <?php echo !empty($moduleID) ? 'with-close' : ''?>'>
|
||||
<?php
|
||||
$this->app->loadLang('tree');
|
||||
echo isset($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? inlink('cases', "taskID=$taskID&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("taskCaseModule")';
|
||||
echo html::a($removeLink, "<span class='close'>×</span>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php
|
||||
$hasCasesPriv = common::hasPriv('testtask', 'cases');
|
||||
$hasGroupPriv = common::hasPriv('testtask', 'groupcase');
|
||||
?>
|
||||
<?php
|
||||
if($hasCasesPriv) echo "<li id='allTab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=all¶m=0"), $lang->testtask->allCases) . "</li>";
|
||||
if($hasCasesPriv) echo "<li id='assignedtomeTab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=assignedtome¶m=0"), $lang->testtask->assignedToMe) . "</li>";
|
||||
if($hasCasesPriv) echo html::a($this->inlink('cases', "taskID=$taskID&browseType=all¶m=0"), "<span class='text'>{$lang->testtask->allCases}</span>", '', "id='allTab' class='btn btn-link'");
|
||||
if($hasCasesPriv) echo html::a($this->inlink('cases', "taskID=$taskID&browseType=assignedtome¶m=0"), "<span class='text'>{$lang->testtask->assignedToMe}</span>", '', "id='assignedtomeTab' class='btn btn-link'");
|
||||
|
||||
if($hasGroupPriv and $this->config->global->flow != 'onlyTest')
|
||||
{
|
||||
echo "<li id='groupTab' class='dropdown'>";
|
||||
$groupBy = isset($groupBy) ? $groupBy : '';
|
||||
$current = zget($lang->testcase->groups, isset($groupBy) ? $groupBy : '', '');
|
||||
echo "<div class='btn-group'>";
|
||||
$active = $browseType == 'group' ? 'btn-active-text' : '';
|
||||
$groupBy = isset($groupBy) ? $groupBy : '';
|
||||
$current = zget($lang->testcase->groups, isset($groupBy) ? $groupBy : '', '');
|
||||
if(empty($current)) $current = $lang->testcase->groups[''];
|
||||
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "data-toggle='dropdown'");
|
||||
echo html::a('javascript:;', "<span class='text'>{$current} <span class='caret'></span></span>", '', "class='btn btn-link $active' data-toggle='dropdown'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
foreach ($lang->testcase->groups as $key => $value)
|
||||
{
|
||||
@@ -38,27 +41,20 @@
|
||||
echo '<li' . ($key == $groupBy ? " class='active'" : '') . '>';
|
||||
echo html::a($this->inlink('groupCase', "taskID=$taskID&groupBy=$key"), $value);
|
||||
}
|
||||
echo '</ul></li>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
|
||||
if($this->methodName == 'cases') echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a></li> ";
|
||||
if(common::hasPriv('testtask', 'view')) echo '<li>' . html::a(inlink('view', "taskID=$taskID"), $lang->testtask->view) . '</li>';
|
||||
if(common::hasPriv('testreport', 'browse')) echo '<li>' . html::a($this->createLink('testreport', 'browse', "objectID=$productID&objectType=product&extra=$taskID"), $lang->testtask->reportField) . '</li>';
|
||||
if($this->methodName == 'cases') echo "<a class='btn btn-link querybox-toggle' id='bysearchTab'><i class='icon icon-search muted'></i>{$lang->testcase->bySearch}</a>";
|
||||
?>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
echo "<div class='btn-group'>";
|
||||
common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'button', 'link');
|
||||
common::printIcon('testcase', 'export', "productID=$productID&orderBy=`case`_desc&taskID=$task->id", '', 'button', '', '', 'iframe export');
|
||||
common::printIcon('testcase', 'export', "productID=$productID&orderBy=`case`_desc&taskID=$task->id", '', 'button', '', '', 'export');
|
||||
common::printIcon('testtask', 'report', "productID=$productID&taskID=$task->id&browseType=$browseType&branchID=$task->branch&moduleID=" . (empty($moduleID) ? '' : $moduleID));
|
||||
echo '</div>';
|
||||
echo "<div class='btn-group'>";
|
||||
common::printRPN($this->session->testtaskList, '');
|
||||
echo '</div>';
|
||||
common::printBack($this->session->testtaskList, 'btn btn-link');
|
||||
?>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<?php
|
||||
$headerHooks = glob(dirname(dirname(__FILE__)) . "/ext/view/featurebar.*.html.hook.php");
|
||||
|
||||
@@ -15,115 +15,126 @@
|
||||
<?php include './caseheader.html.php';?>
|
||||
<?php js::set('confirmUnlink', $lang->testtask->confirmUnlinkCase)?>
|
||||
<?php js::set('taskCaseBrowseType', ($browseType == 'bymodule' and $this->session->taskCaseBrowseType == 'bysearch') ? 'all' : $this->session->taskCaseBrowseType);?>
|
||||
<script language="Javascript">
|
||||
var browseType = '<?php echo $browseType;?>';
|
||||
var moduleID = '<?php echo $moduleID;?>';
|
||||
</script>
|
||||
<div class='side' id='casesbox'>
|
||||
<a class='side-handle' data-id='testtaskTree'><i class='icon-caret-left'></i></a>
|
||||
<div class='side-body'>
|
||||
<div class='panel panel-sm'>
|
||||
<div class='panel-heading nobr'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $productName;?></strong></div>
|
||||
<div class='panel-body'>
|
||||
<?php echo $moduleTree;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<?php js::set('moduleID', $moduleID);?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='side-col' id='sidebar'>
|
||||
<div class='cell'><?php echo $moduleTree;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main'>
|
||||
<script>setTreeBox();</script>
|
||||
<form method='post' name='casesform' id='casesForm'>
|
||||
<?php
|
||||
$vars = "taskID=$task->id&browseType=$browseType¶m=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
|
||||
$datatableId = $this->moduleName . ucfirst($this->methodName);
|
||||
$useDatatable = (isset($this->config->datatable->$datatableId->mode) and $this->config->datatable->$datatableId->mode == 'datatable');
|
||||
<div class='main-col'>
|
||||
<div class="cell" id="queryBox"></div>
|
||||
<form class='main-table table-cases' data-ride='table' method='post' name='casesform' id='casesForm'>
|
||||
<?php
|
||||
$vars = "taskID=$task->id&browseType=$browseType¶m=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
|
||||
$datatableId = $this->moduleName . ucfirst($this->methodName);
|
||||
$useDatatable = (isset($this->config->datatable->$datatableId->mode) and $this->config->datatable->$datatableId->mode == 'datatable');
|
||||
|
||||
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
|
||||
$canBatchAssign = common::hasPriv('testtask', 'batchAssign');
|
||||
$canBatchRun = common::hasPriv('testtask', 'batchRun');
|
||||
$hasCheckbox = ($canBatchEdit or $canBatchAssign or $canBatchRun);
|
||||
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
|
||||
$canBatchUnlink = common::hasPriv('testtask', 'batchUnlinkCases');
|
||||
$canBatchAssign = common::hasPriv('testtask', 'batchAssign');
|
||||
$canBatchRun = common::hasPriv('testtask', 'batchRun');
|
||||
$hasCheckbox = ($canBatchEdit or $canBatchUnlink or $canBatchAssign or $canBatchRun);
|
||||
|
||||
if($useDatatable) include '../../common/view/datatable.html.php';
|
||||
if(!$useDatatable) include '../../common/view/tablesorter.html.php';
|
||||
if($useDatatable) include '../../common/view/datatable.html.php';
|
||||
if(!$useDatatable) include '../../common/view/tablesorter.html.php';
|
||||
|
||||
$this->config->testcase->datatable->defaultField = $this->config->testtask->datatable->defaultField;
|
||||
$this->config->testcase->datatable->fieldList['actions']['width'] = '100';
|
||||
$this->config->testcase->datatable->defaultField = $this->config->testtask->datatable->defaultField;
|
||||
$this->config->testcase->datatable->fieldList['actions']['width'] = '156';
|
||||
|
||||
$setting = $this->datatable->getSetting('testtask');
|
||||
$widths = $this->datatable->setFixedFieldWidth($setting);
|
||||
$columns = 0;
|
||||
?>
|
||||
<table class='table table-condensed table-hover table-striped tablesorter table-fixed <?php echo $useDatatable ? 'datatable' : ''?>' id='caseList' data-checkable='<?php echo $hasCheckbox?>' data-fixed-left-width='<?php echo $widths['leftWidth']?>' data-fixed-right-width='<?php echo $widths['rightWidth']?>' data-custom-menu='true' data-checkbox-name='caseIDList[]'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
foreach($setting as $key => $value)
|
||||
{
|
||||
if($value->show)
|
||||
{
|
||||
$this->datatable->printHead($value, $orderBy, $vars);
|
||||
$columns ++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($runs as $run):?>
|
||||
<tr class='text-center' data-id='<?php echo $run->case?>'>
|
||||
<?php foreach($setting as $key => $value) $this->testtask->printCell($value, $run, $users, $task, $branches, $useDatatable ? 'datatable' : 'table');?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='<?php echo $columns?>'>
|
||||
<?php if($runs):?>
|
||||
<div class='table-actions clearfix'>
|
||||
<?php if($hasCheckbox) echo html::selectButton();?>
|
||||
<div class='btn-group dropup'>
|
||||
<?php
|
||||
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID");
|
||||
$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>
|
||||
$setting = $this->datatable->getSetting('testtask');
|
||||
$widths = $this->datatable->setFixedFieldWidth($setting);
|
||||
$columns = 0;
|
||||
?>
|
||||
<table class='table has-sort-table' id='caseList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
foreach($setting as $key => $value)
|
||||
{
|
||||
if($value->show)
|
||||
{
|
||||
$this->datatable->printHead($value, $orderBy, $vars);
|
||||
$columns ++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($runs as $run):?>
|
||||
<tr>
|
||||
<?php foreach($setting as $key => $value) $this->testtask->printCell($value, $run, $users, $task, $branches, $useDatatable ? 'datatable' : 'table');?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($runs):?>
|
||||
<div class='table-footer'>
|
||||
<?php if($hasCheckbox):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class='table-actions btn-toolbar'>
|
||||
<div class='btn-group dropup'>
|
||||
<?php
|
||||
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID");
|
||||
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
?>
|
||||
<?php if($canBatchUnlink):?>
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<?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')\"");
|
||||
}
|
||||
$actionLink = $this->createLink('testtask', 'batchUnlinkCases', "taskID=$task->id");
|
||||
$misc = "onclick=\"setFormAction('$actionLink')\"";
|
||||
echo "<li>" . html::a('javascript:;', $lang->testtask->unlinkCase, '', $misc) . "</li>";
|
||||
?>
|
||||
</div>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<?php echo $pager->show();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php if($canBatchAssign):?>
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->testtask->assign;?> <span class="caret"></span></button>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<?php
|
||||
$withSearch = count($assignedTos) > 10;
|
||||
$actionLink = inLink('batchAssign', "taskID=$task->id");
|
||||
echo html::select('assignedTo', $assignedTos, '', 'class="hidden"');
|
||||
if($withSearch):
|
||||
?>
|
||||
<div class="input-control search-box search-box-circle has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="list-group">
|
||||
<?php foreach ($assignedTos as $key => $value):?>
|
||||
<?php
|
||||
if(empty($key) or $key == 'closed') continue;
|
||||
echo html::a("javascript:$(\"#assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\")", $value);
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
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('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#module' + moduleID).addClass('active');
|
||||
$('#' + taskCaseBrowseType + 'Tab').addClass('active');
|
||||
$('#' + taskCaseBrowseType + 'Tab').addClass('btn-active-text');
|
||||
<?php if($browseType == 'bysearch'):?>
|
||||
$shortcut = $('#QUERY<?php echo (int)$param;?>Tab');
|
||||
if($shortcut.size() > 0)
|
||||
|
||||
@@ -11,123 +11,120 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['testtask']);?> <strong><?php echo $task->id;?></strong></span>
|
||||
<strong><?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $task->id), $task->name, '_blank');?></strong>
|
||||
<small class='text-muted'> <?php echo $lang->testtask->linkCase;?> <?php echo html::icon($lang->icons['link']);?></small>
|
||||
<div class='heading-actions'>
|
||||
<?php
|
||||
$lang->testtask->linkCase = $lang->testtask->linkByStory;
|
||||
common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bystory", '', 'button', '', '', 'btn-primary btn-sm');
|
||||
|
||||
echo "<span class='dropdown'>";
|
||||
echo "<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'>{$lang->testtask->linkBySuite} <span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
|
||||
if($suiteList)
|
||||
{
|
||||
foreach($suiteList as $suiteID => $suite)
|
||||
{
|
||||
$active = ($type == 'bysuite' and (int)$param == $suiteID) ? "class='active'" : '';
|
||||
$suiteName = $suite->name;
|
||||
if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
|
||||
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bysuite¶m=$suiteID"), $suiteName) . "</li>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<li>" . html::a('###', $lang->testsuite->noticeNone) . "</li>";
|
||||
}
|
||||
echo "</ul></span>";
|
||||
|
||||
echo "<span class='dropdown'>";
|
||||
echo "<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'>{$lang->testtask->linkByBuild} <span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
|
||||
if($testTask)
|
||||
{
|
||||
foreach($testTask as $tmpID => $tmpTitle)
|
||||
{
|
||||
$active = ($type == 'bybuild' and (int)$param == $tmpID) ? "class='active'" : '';
|
||||
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bybuild¶m=$tmpID"), $tmpTitle) . "</li>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<li>" . html::a('###', $lang->testtask->noticeNoOther) . "</li>";
|
||||
}
|
||||
echo "</ul></span>";
|
||||
//$lang->testtask->linkCase = $lang->testtask->linkByBug;
|
||||
//common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bybug", '', 'button', 'link');
|
||||
?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php common::printBack($this->session->testtaskList, 'btn btn-link');?>
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo $task->name;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
echo "<div class='btn-group'>";
|
||||
common::printRPN($this->session->testtaskList);
|
||||
echo '</div>';
|
||||
$lang->testtask->linkCase = $lang->testtask->linkByStory;
|
||||
common::printLink('testtask', 'linkCase', "taskID=$taskID&type=bystory", $lang->testtask->linkByStory, '', "class='btn btn-primary'");
|
||||
|
||||
echo "<span class='dropdown'>";
|
||||
echo "<button class='btn btn-primary' type='button' data-toggle='dropdown'>{$lang->testtask->linkBySuite} <span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
|
||||
if($suiteList)
|
||||
{
|
||||
foreach($suiteList as $suiteID => $suite)
|
||||
{
|
||||
$active = ($type == 'bysuite' and (int)$param == $suiteID) ? "class='active'" : '';
|
||||
$suiteName = $suite->name;
|
||||
if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
|
||||
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bysuite¶m=$suiteID"), $suiteName) . "</li>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<li>" . html::a('###', $lang->testsuite->noticeNone) . "</li>";
|
||||
}
|
||||
echo "</ul></span>";
|
||||
|
||||
echo "<span class='dropdown'>";
|
||||
echo "<button class='btn btn-primary' type='button' data-toggle='dropdown'>{$lang->testtask->linkByBuild} <span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
|
||||
if($testTask)
|
||||
{
|
||||
foreach($testTask as $tmpID => $tmpTitle)
|
||||
{
|
||||
$active = ($type == 'bybuild' and (int)$param == $tmpID) ? "class='active'" : '';
|
||||
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bybuild¶m=$tmpID"), $tmpTitle) . "</li>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<li>" . html::a('###', $lang->testtask->noticeNoOther) . "</li>";
|
||||
}
|
||||
echo "</ul></span>";
|
||||
?>
|
||||
</div>
|
||||
<div id='querybox' class='show'></div>
|
||||
</div>
|
||||
<form method='post'>
|
||||
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable'>
|
||||
<caption class='text-left text-special'>
|
||||
<?php echo html::icon('unlink');?> <strong><?php echo $lang->testtask->unlinkedCases;?></strong> (<?php echo $pager->recTotal;?>)
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-60px'><nobr><?php echo $lang->testtask->linkVersion;?></nobr></th>
|
||||
<th class='w-pri'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class='w-type'><?php echo $lang->testcase->type;?></th>
|
||||
<th class='w-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->testtask->lastRunAccount;?></th>
|
||||
<th class='w-120px'><?php echo $lang->testtask->lastRunTime;?></th>
|
||||
<th class='w-80px'><?php echo $lang->testtask->lastRunResult;?></th>
|
||||
<th class='w-status'><?php echo $lang->statusAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr class='text-center'>
|
||||
<td class='cell-id'>
|
||||
<input type='checkbox' name='cases[]' value='<?php echo $case->id;?>' />
|
||||
<?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?>
|
||||
</td>
|
||||
<td class='text-center'><?php echo html::select("versions[$case->id]", array_combine(range($case->version, 1), range($case->version, 1)), '', 'class="form-control input-sm" style="padding: 0 5px; height: 20px"');?> </td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<td class='text-left'>
|
||||
<?php
|
||||
echo $case->title . ' ( ';
|
||||
for($i = $case->version; $i >= 1; $i --)
|
||||
{
|
||||
echo html::a($this->createLink('testcase', 'view', "caseID=$case->id&version=$i", '', true), "#$i", '', "class='iframe' data-width='95%'");
|
||||
}
|
||||
echo ')';
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td><?php echo $users[$case->openedBy];?></td>
|
||||
<td><?php echo $users[$case->lastRunner];?></td>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
|
||||
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
<td class='case-<?php echo $case->status?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='10'>
|
||||
<?php if($cases):?>
|
||||
<div class='table-actions pd-0 clearfix'><?php echo html::selectButton() . html::submitButton();?></div>
|
||||
<?php endif;?>
|
||||
<div class='text-right'><?php $pager->show();?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form class='main-table table-case' data-ride='table' method='post'>
|
||||
<table class='table'>
|
||||
<div class="table-header">
|
||||
<div class="table-statistic"><strong><?php echo $lang->testtask->unlinkedCases;?></strong> (<?php echo $pager->recTotal;?>)</div>
|
||||
</div>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'>
|
||||
<?php if($cases):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='w-80px text-center'><nobr><?php echo $lang->testtask->linkVersion;?></nobr></th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class='c-type'><?php echo $lang->testcase->type;?></th>
|
||||
<th class='c-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->testtask->lastRunAccount;?></th>
|
||||
<th class='w-120px'><?php echo $lang->testtask->lastRunTime;?></th>
|
||||
<th class='w-80px'><?php echo $lang->testtask->lastRunResult;?></th>
|
||||
<th class='c-status'><?php echo $lang->statusAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr>
|
||||
<td class='cell-id'>
|
||||
<?php echo html::checkbox('cases', array($case->id => sprintf('%03d', $case->id)));?>
|
||||
</td>
|
||||
<td class='text-center'><?php echo html::select("versions[$case->id]", array_combine(range($case->version, 1), range($case->version, 1)), '', 'class="form-control"');?> </td>
|
||||
<td><span class='label-pri label-pri-<?php echo $case->pri;?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<td class='text-left'>
|
||||
<?php
|
||||
echo $case->title . ' ( ';
|
||||
for($i = $case->version; $i >= 1; $i --)
|
||||
{
|
||||
echo html::a($this->createLink('testcase', 'view', "caseID=$case->id&version=$i", '', true), "#$i", '', "class='iframe' data-width='95%'");
|
||||
}
|
||||
echo ')';
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td><?php echo $users[$case->openedBy];?></td>
|
||||
<td><?php echo $users[$case->lastRunner];?></td>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
|
||||
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
<td class='case-<?php echo $case->status?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($cases):?>
|
||||
<div class='table-footer'>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar"><?php echo html::submitButton('', '', 'btn');?></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user