* Code for task #71167.

This commit is contained in:
sunguangming
2022-09-29 11:36:18 +08:00
parent 1941a6936c
commit 595b5f8f83
5 changed files with 18 additions and 10 deletions

View File

@@ -1318,6 +1318,7 @@ class execution extends control
$this->view->position[] = html::a($this->createLink('execution', 'testtask', "executionID=$executionID"), $this->executions[$executionID]);
$this->view->position[] = $this->lang->testtask->common;
$this->view->execution = $execution;
$this->view->project = $this->loadModel('project')->getByID($execution->project);
$this->view->executionID = $executionID;
$this->view->executionName = $this->executions[$executionID];
$this->view->pager = $pager;

View File

@@ -1,7 +1,7 @@
.table-group-btns {width: 200px;}
.table-footer,
.table-grouped {box-shadow: none !important;}
.table-footer {margin-left: 205px; margin-top: 10px;}
.table-footer {margin-top: 10px;}
.table-grouped > thead>tr>th.c-id,
.table-grouped > tbody>tr>td.c-id {padding-left: 15px;}
.table-grouped > tbody>tr>td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}

View File

@@ -12,9 +12,13 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmDelete', $lang->testtask->confirmDelete)?>
<?php $hideProduct = (isset($project->hasProduct) and $project->hasProduct == '0');?>
<?php if(!$hideProduct):?>
<style>.table-footer {margin-left: 205px}</style>
<?php endif;?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php if(!empty($tasks)):?>
<?php if(!empty($tasks) and !$hideProduct):?>
<div class="pull-left table-group-btns">
<button type="button" class="btn btn-link group-collapse-all"><?php echo $lang->testtask->collapseAll;?> <i class="icon-fold-all muted"></i></button>
<button type="button" class="btn btn-link group-expand-all"><?php echo $lang->testtask->expandAll;?> <i class="icon-unfold-all muted"></i></button>
@@ -49,8 +53,8 @@
<thead>
<?php $vars = "executionID=$executionID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<?php $canTestReport = ($canBeChanged and common::hasPriv('testreport', 'browse'));?>
<tr class='<?php if($total) echo 'divider'; ?>'>
<th class='c-side text-center'><?php common::printOrderLink('product', $orderBy, $vars, $lang->testtask->product);?></th>
<tr class='<?php if($total and !$hideProduct) echo 'divider'; ?>'>
<th class='c-side text-center <?php if($hideProduct) echo 'hide';?>'><?php common::printOrderLink('product', $orderBy, $vars, $lang->testtask->product);?></th>
<th class="c-id">
<?php if($canTestReport):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
@@ -74,7 +78,7 @@
<?php foreach($productTasks as $task):?>
<tr data-id='<?php echo $product;?>' <?php if($task == reset($productTasks)) echo "class='divider-top'";?>>
<?php if($task == reset($productTasks)):?>
<td rowspan='<?php echo count($productTasks);?>' class='c-side text-left group-toggle'>
<td rowspan='<?php echo count($productTasks);?>' class='c-side text-left group-toggle <?php if($hideProduct) echo 'hide';?>'>
<a class='text-primary' title='<?php echo $productName;?>'><i class='icon icon-caret-down'></i> <?php echo $productName;?></a>
<div class='small'><span class='text-muted'><?php echo $lang->testtask->allTasks;?></span> <?php echo count($productTasks);?></div>
</td>

View File

@@ -1,7 +1,7 @@
.table-group-btns {width: 200px;}
.table-footer,
.table-grouped {box-shadow: none !important;}
.table-footer {margin-left: 205px; margin-top: 10px;}
.table-footer {margin-top: 10px;}
.table-grouped > thead>tr>th.c-id,
.table-grouped > tbody>tr>td.c-id {padding-left: 15px;}
.table-grouped > tbody>tr>td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}

View File

@@ -12,9 +12,12 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmDelete', $lang->testtask->confirmDelete)?>
<?php if($project->hasProduct):?>
<style>.tfoot {margin-left: 205px}</style>
<?php endif;?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php if(!empty($tasks)):?>
<?php if(!empty($tasks) and $project->hasProduct):?>
<div class="pull-left table-group-btns">
<button type="button" class="btn btn-link group-collapse-all"><?php echo $lang->testtask->collapseAll;?> <i class="icon-fold-all muted"></i></button>
<button type="button" class="btn btn-link group-expand-all"><?php echo $lang->testtask->expandAll;?> <i class="icon-unfold-all muted"></i></button>
@@ -49,8 +52,8 @@
<thead>
<?php $vars = "projectID=$projectID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<?php $canTestReport = ($canBeChanged and common::hasPriv('testreport', 'browse'));?>
<tr class='<?php if($total) echo 'divider'; ?>'>
<th class='c-side text-center'><?php common::printOrderLink('product', $orderBy, $vars, $lang->testtask->product);?></th>
<tr class='<?php if($total and $project->hasProduct) echo 'divider'; ?>'>
<th class='c-side text-center <?php if(!$project->hasProduct) echo 'hide';?>'><?php common::printOrderLink('product', $orderBy, $vars, $lang->testtask->product);?></th>
<th class="c-id">
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
@@ -69,7 +72,7 @@
<?php foreach($productTasks as $task):?>
<tr data-id='<?php echo $product;?>' <?php if($task == reset($productTasks)) echo "class='divider-top'";?>>
<?php if($task == reset($productTasks)):?>
<td rowspan='<?php echo count($productTasks);?>' class='c-side text-left group-toggle'>
<td rowspan='<?php echo count($productTasks);?>' class='c-side text-left group-toggle <?php if(!$project->hasProduct) echo 'hide';?>'>
<a class='text-primary' title='<?php echo $productName;?>'><i class='icon icon-caret-down'></i> <?php echo $productName;?></a>
<div class='small'><span class='text-muted'><?php echo $lang->testtask->allTasks;?></span> <?php echo count($productTasks);?></div>
</td>