* finish task #4105.

This commit is contained in:
wangyidong
2018-05-15 17:24:21 +08:00
parent dbc4f92af2
commit a6315cfd2f
7 changed files with 85 additions and 64 deletions
-2
View File
@@ -9,5 +9,3 @@ tbody > tr > td .icon-bug {margin-left: -8px;}
.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;}
#pageActions {top: -60px;}
-1
View File
@@ -1,6 +1,5 @@
$(document).ready(function()
{
setModal4List('runCase', 'caseList', function(){$(".iframe").modalTrigger({width:1024, type:'iframe'});}, 1024);
if(browseType == 'bysearch') ajaxGetSearchForm();
if($('#caseList thead th.w-title').width() < 150) $('#caseList thead th.w-title').width(150);
});
+5 -1
View File
@@ -28,7 +28,7 @@ class testtaskModel extends model
if($testtask)
{
$testtasks = $this->getProductTasks($productID, $branch, 'id_desc', null, array('local', 'totalStatus'));
$testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus'));
$selectHtml .= "<div class='btn-group angle-btn'>";
$selectHtml .= "<div class='btn-group'>";
@@ -38,6 +38,10 @@ class testtaskModel extends model
$selectHtml .= "</ul>";
$selectHtml .= "</div>";
$selectHtml .= "</div>";
$this->lang->modulePageActions = '';
if(common::hasPriv('testtask', 'view')) $this->lang->modulePageActions .= html::a(helper::createLink('testtask', 'view', "taskID={$testtask->id}"), "<i class='icon icon-file-text'> </i>" . $this->lang->testtask->view, '', "class='btn'");
if(common::hasPriv('testreport', 'browse')) $this->lang->modulePageActions .= html::a(helper::createLink('testreport', 'browse', "objectID=$productID&objectType=product&extra={$testtask->id}"), "<i class='icon icon-flag'> </i>" . $this->lang->testtask->reportField, '', "class='btn'");
}
$this->app->loadLang('qa');
-4
View File
@@ -1,7 +1,3 @@
<div id='pageActions'>
<?php common::printLink('testtask', 'view', "taskID=$taskID", "<i class='icon icon-file-text'> </i>" . $lang->testtask->view, '', "class='btn'");?>
<?php common::printLink('testreport', 'browse', "objectID=$productID&objectType=product&extra=$taskID", "<i class='icon icon-flag'> </i>" . $lang->testtask->reportField, '', "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');?>
+1 -1
View File
@@ -23,7 +23,7 @@
</div>
<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'>
<form class='main-table table-cases' data-ride='table' data-hot='true' method='post' name='casesform' id='casesForm'>
<?php
$vars = "taskID=$task->id&browseType=$browseType&param=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
$datatableId = $this->moduleName . ucfirst($this->methodName);
+70 -48
View File
@@ -14,52 +14,74 @@
<?php include '../../common/view/treetable.html.php';?>
<?php include './caseheader.html.php';?>
<?php js::set('browseType', $browseType);?>
<table class='table table-fixed' id='treetable'>
<thead>
<tr>
<th class='w-<?php echo $groupBy == 'story' ? '50' : '100';?>px'></th>
<th><?php echo $lang->testcase->title;?></th>
<th class='w-pri'> <?php echo $lang->priAB;?></th>
<th class='w-80px'> <?php echo $lang->typeAB;?></th>
<th class='w-user'> <?php echo $lang->testtask->assignedTo;?></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-80px'> <?php echo $lang->testtask->status;?></th>
<th class='w-30px' title='<?php echo $lang->testcase->bugs?>'><?php echo $lang->testcase->bugsAB;?></th>
<th class='w-30px' title='<?php echo $lang->testcase->results?>'><?php echo $lang->testcase->resultsAB;?></th>
<th class='w-30px' title='<?php echo $lang->testcase->stepNumber?>'><?php echo $lang->testcase->stepNumberAB;?></th>
<th class='w-80px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<?php $i = 0;?>
<?php foreach($cases as $groupKey => $groupCases):?>
<?php $groupClass = ($i % 2 == 0) ? 'even' : 'highlight-warning'; $i++;?>
<tr id='node-<?php echo $groupKey;?>' class='actie-disabled group-title'>
<td class='text-right <?php echo $groupClass;?> large strong group-name'><?php echo $groupKey;?></td>
<td colspan='12' class='text-left'><?php if($groupByList) echo $groupByList[$groupKey];?></td>
</tr>
<?php foreach($groupCases as $run):?>
<tr id='<?php echo $run->id;?>' class='text-center child-of-node-<?php echo $groupKey;?>'>
<td class='<?php echo $groupClass;?>'></td>
<td class='text-left'>&nbsp;<?php echo $run->case . $lang->colon; if(!common::printLink('testcase', 'view', "case=$run->case", $run->title)) echo $run->title;?></td>
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $run->pri, $run->pri)?>'><?php echo zget($lang->testcase->priList, $run->pri, $run->pri);?></span></td>
<td><?php echo $lang->testcase->typeList[$run->type];?></td>
<td><?php echo $users[$run->assignedTo];?></td>
<td><?php echo $users[$run->lastRunner];?></td>
<td><?php if(!helper::isZeroDate($run->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($run->lastRunDate));?></td>
<td class='<?php echo $run->lastRunResult;?>'><?php if($run->lastRunResult) echo $lang->testcase->resultList[$run->lastRunResult];?></td>
<td class='<?php echo $run->status;?>'><?php echo ($run->version < $run->caseVersion) ? "<span class='warning'>{$lang->testcase->changed}</span>" : $lang->testtask->statusList[$run->status];?></td>
<td><?php echo (common::hasPriv('testcase', 'bugs') and $run->bugs) ? html::a($this->createLink('testcase', 'bugs', "runID={$run->id}&caseID={$run->case}"), $run->bugs, '', "class='iframe'") : $run->bugs;?></td>
<td><?php echo (common::hasPriv('testtask', 'results') and $run->results) ? html::a($this->createLink('testtask', 'results', "runID={$run->id}&caseID={$run->case}"), $run->results, '', "class='iframe'") : $run->results;?></td>
<td><?php echo $run->stepNumber;?></td>
<td>
<?php common::printIcon('testtask', 'runCase', "runID=$run->id&caseID=$run->case&version=$run->caseVersion", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");?>
<?php common::printIcon('testcase', 'edit', "caseID=$run->case", '', 'list');?>
<?php common::printIcon('testcase', 'delete', "caseID=$run->case", '', 'list', '', 'hiddenwin');?>
</td>
</tr>
<?php endforeach;?>
<?php endforeach;?>
</table>
<div class="main-table" data-ride="table" data-checkable="false" data-group="true">
<table class='table table-grouped text-center' id='treetable'>
<thead>
<tr class="divider">
<th class="c-side text-left has-btn group-menu">
<div class="table-group-btns">
<button type="button" class="btn btn-block btn-link group-collapse-all"><?php echo $lang->project->treeLevel['root'];?> <i class="icon-caret-up"></i></button>
<button type="button" class="btn btn-block btn-link group-expand-all"><?php echo $lang->project->treeLevel['all'];?> <i class="icon-caret-down"></i></button>
</div>
</th>
<th class='c-id-sm'><?php echo $lang->idAB;?></th>
<th class='w-pri'> <?php echo $lang->priAB;?></th>
<th><?php echo $lang->testcase->title;?></th>
<th class='w-80px'> <?php echo $lang->typeAB;?></th>
<th class='w-user'> <?php echo $lang->testtask->assignedTo;?></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-80px'> <?php echo $lang->testtask->status;?></th>
<th class='w-30px' title='<?php echo $lang->testcase->bugs?>'><?php echo $lang->testcase->bugsAB;?></th>
<th class='w-30px' title='<?php echo $lang->testcase->results?>'><?php echo $lang->testcase->resultsAB;?></th>
<th class='w-30px' title='<?php echo $lang->testcase->stepNumber?>'><?php echo $lang->testcase->stepNumberAB;?></th>
<th class='w-130px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php $groupIndex = 0;?>
<?php foreach($cases as $groupKey => $groupCases):?>
<?php
$i = 0;
$groupName = $groupByList ? $groupByList[$groupKey] : '';
if(empty($groupName) and $groupBy == 'story') $groupName = $lang->task->noStory;
if(empty($groupName) and $groupBy == 'assignedTo') $groupName = $lang->task->noAssigned;
?>
<?php foreach($groupCases as $run):?>
<tr data-id='<?php echo $groupIndex;?>' <?php if($i == 0) echo "class='divider-top'";?>>
<?php if($i == 0):?>
<td rowspan='<?php echo count($groupCases);?>' class='c-side text-left group-toggle text-top'>
<?php echo html::a('###', "<i class='icon-caret-down'></i> $groupName", '', "class='text-primary'");?>
</td>
<?php endif;?>
<td class='c-id-sm'><?php echo $run->case;?></td>
<td><span class='label-pri <?php echo 'label-pri-' . $run->pri;?>'><?php echo zget($lang->testcase->priList, $run->pri, $run->pri);?></span></td>
<td class='text-left'><?php if(!common::printLink('testcase', 'view', "case=$run->case", $run->title)) echo $run->title;?></td>
<td><?php echo zget($lang->testcase->typeList, $run->type, '');?></td>
<td><?php echo zget($users, $run->assignedTo);?></td>
<td><?php echo zget($users, $run->lastRunner);?></td>
<td><?php if(!helper::isZeroDate($run->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($run->lastRunDate));?></td>
<td class='<?php echo $run->lastRunResult;?>'><?php if($run->lastRunResult) echo $lang->testcase->resultList[$run->lastRunResult];?></td>
<td class='<?php echo $run->status;?>'><?php echo ($run->version < $run->caseVersion) ? "<span class='warning'>{$lang->testcase->changed}</span>" : $lang->testtask->statusList[$run->status];?></td>
<td><?php echo (common::hasPriv('testcase', 'bugs') and $run->bugs) ? html::a($this->createLink('testcase', 'bugs', "runID={$run->id}&caseID={$run->case}"), $run->bugs, '', "class='iframe'") : $run->bugs;?></td>
<td><?php echo (common::hasPriv('testtask', 'results') and $run->results) ? html::a($this->createLink('testtask', 'results', "runID={$run->id}&caseID={$run->case}"), $run->results, '', "class='iframe'") : $run->results;?></td>
<td><?php echo $run->stepNumber;?></td>
<td class='c-actions'>
<?php common::printIcon('testtask', 'runCase', "runID=$run->id&caseID=$run->case&version=$run->caseVersion", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");?>
<?php common::printIcon('testcase', 'edit', "caseID=$run->case", '', 'list');?>
<?php common::printIcon('testcase', 'delete', "caseID=$run->case", '', 'list', '', 'hiddenwin');?>
</td>
</tr>
<?php $i++;?>
<?php endforeach;?>
<tr data-id='<?php echo $groupIndex;?>' class='group-toggle group-summary hidden divider-top'>
<td class='c-side text-left'><?php echo html::a('###', "<i class='icon-caret-right'></i> $groupName");?></td>
<td colspan='13'></td>
</tr>
<?php $groupIndex++;?>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php include '../../common/view/footer.html.php';?>
+9 -7
View File
@@ -15,11 +15,13 @@
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo $task->name;?>
<?php if($task->deleted):?>
<span class='label label-danger'><?php echo $lang->task->deleted;?></span>
<?php endif; ?>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo $task->name;?>
<?php if($task->deleted):?>
<span class='label label-danger'><?php echo $lang->task->deleted;?></span>
<?php endif; ?>
</h2>
</div>
<div class="main-row">
<div class="col-8 main-col">
@@ -87,9 +89,9 @@
</div>
</div>
<div class='mainActions'>
<div id='mainActions'>
<?php $browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browse', "productID=$task->product");?>
<?php common::printRPN($browseLink);?>
<?php common::printPreAndNext($browseLink);?>
<div class="btn-toolbar">
<?php common::printBack($browseLink);?>
<?php if(!$task->deleted):?>