* finish task #1432.
This commit is contained in:
@@ -27,7 +27,7 @@ function changeAction(url)
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(".runCase").colorbox({width:900, height:550, iframe:true, transition:'none', onCleanup:function(){parent.location.href=parent.location.href;}});
|
||||
loadColorbox('runCase', 'caseList');
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
$('#module' + moduleID).addClass('active');
|
||||
if(browseType == 'bysearch') ajaxGetSearchForm();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(".runCase").colorbox({width:900, height:550, iframe:true, transition:'none'});
|
||||
$(".runCase").colorbox({width:900, height:550, iframe:true, transition:'none', onCleanup:function(){parent.location.href=parent.location.href;}});
|
||||
$(".results").colorbox({width:900, height:550, iframe:true, transition:'none'});
|
||||
})
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php if(isonlybody()) die(include './caselist.html.php');?>
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/datepicker.html.php';
|
||||
@@ -35,94 +36,24 @@ js::set('moduleID' , $moduleID);
|
||||
</div>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType != 'bysearch') echo 'hidden';?>'></div>
|
||||
<table class='cont-lt1'>
|
||||
<tr valign='top'>
|
||||
<td class='side <?php echo $treeClass;?>'>
|
||||
<div class='box-title'><?php echo $productName;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class='a-right'>
|
||||
<?php common::printLink('tree', 'browse', "productID=$productID&view=case", $lang->tree->manage);?>
|
||||
<?php common::printLink('tree', 'fix', "root=$productID&type=case", $lang->tree->fix, 'hiddenwin');?>
|
||||
</div>
|
||||
<table class='cont-lt1'>
|
||||
<tr valign='top'>
|
||||
<td class='side <?php echo $treeClass;?>'>
|
||||
<div class='box-title'><?php echo $productName;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class='a-right'>
|
||||
<?php common::printLink('tree', 'browse', "productID=$productID&view=case", $lang->tree->manage);?>
|
||||
<?php common::printLink('tree', 'fix', "root=$productID&type=case", $lang->tree->fix, 'hiddenwin');?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='divider <?php echo $treeClass;?>'></td>
|
||||
<td>
|
||||
<?php $vars = "productID=$productID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<form id='batchForm' method='post' action='<?php echo inLink('batchEdit', "from=testcaseBrowse&productID=$productID&orderBy=$orderBy");?>'>
|
||||
<table class='table-1 colored tablesorter datatable fixed'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<th> <?php common::printOrderLink('story', $orderBy, $vars, $lang->testcase->story);?></th>
|
||||
<th class='w-50px'><?php echo $lang->actions;?></th>
|
||||
<?php else:?>
|
||||
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-80px'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
|
||||
<th class='w-120px'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
|
||||
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
|
||||
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr class='a-center'>
|
||||
<?php $viewLink = inlink('view', "caseID=$case->id");?>
|
||||
<td>
|
||||
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/>
|
||||
<?php echo html::a($viewLink, sprintf('%03d', $case->id));?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span></td>
|
||||
<td class='a-left' title="<?php echo $case->title?>"><?php echo html::a($viewLink, $case->title);?></td>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<td class='a-left'><?php echo html::a($this->createLink('story', 'view', "storyID=$case->story"), $case->storyTitle, '_blank');?></td>
|
||||
<td><?php $lang->testcase->confirmStoryChange = $lang->confirm; common::printIcon('testcase', 'confirmStoryChange', "caseID=$case->id", '', 'list', '', 'hiddenwin');?></td>
|
||||
<?php else:?>
|
||||
<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='<?php echo $run->status;?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
|
||||
<td class='a-right'>
|
||||
<?php
|
||||
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', '', '', 'runCase');
|
||||
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'results');
|
||||
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
|
||||
common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy');
|
||||
common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');
|
||||
common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug');
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php $mergeColums = $browseType == 'needconfirm' ? 5 : 10;?>
|
||||
<td colspan='<?php echo $mergeColums?>'>
|
||||
<?php if($cases):?>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
echo html::selectAll() . html::selectReverse();
|
||||
if(common::hasPriv('testcase', 'batchEdit'))echo html::submitButton($lang->edit, "onclick='changeAction(\"" . inLink('batchEdit', "from=testcaseBrowse&productID=$productID&orderBy=$orderBy") . "\")'");
|
||||
if(common::hasPriv('testtask', 'batchRun')) echo html::submitButton($lang->testtask->runCase, "onclick='changeAction(\"" . $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy") . "\")'");
|
||||
?>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<?php $pager->show();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
<td class='divider <?php echo $treeClass;?>'></td>
|
||||
<td>
|
||||
<form id='batchForm' method='post' action='<?php echo inLink('batchEdit', "from=testcaseBrowse&productID=$productID&orderBy=$orderBy");?>'>
|
||||
<?php include 'caselist.html.php';?>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
72
module/testcase/view/caselist.html.php
Normal file
72
module/testcase/view/caselist.html.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php $_GET['onlybody'] = 'no';?>
|
||||
<table class='table-1 colored tablesorter datatable fixed' id='caseList'>
|
||||
<?php $vars = "productID=$productID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<th> <?php common::printOrderLink('story', $orderBy, $vars, $lang->testcase->story);?></th>
|
||||
<th class='w-50px'><?php echo $lang->actions;?></th>
|
||||
<?php else:?>
|
||||
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-80px'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
|
||||
<th class='w-120px'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
|
||||
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
|
||||
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr class='a-center'>
|
||||
<?php $viewLink = inlink('view', "caseID=$case->id");?>
|
||||
<td>
|
||||
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/>
|
||||
<?php echo html::a($viewLink, sprintf('%03d', $case->id));?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span></td>
|
||||
<td class='a-left' title="<?php echo $case->title?>"><?php echo html::a($viewLink, $case->title);?></td>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<td class='a-left'><?php echo html::a($this->createLink('story', 'view', "storyID=$case->story"), $case->storyTitle, '_blank');?></td>
|
||||
<td><?php $lang->testcase->confirmStoryChange = $lang->confirm; common::printIcon('testcase', 'confirmStoryChange', "caseID=$case->id", '', 'list', '', 'hiddenwin');?></td>
|
||||
<?php else:?>
|
||||
<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='<?php echo $run->status;?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
|
||||
<td class='a-right'>
|
||||
<?php
|
||||
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', '', '', 'runCase');
|
||||
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'results');
|
||||
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
|
||||
common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy');
|
||||
common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');
|
||||
common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug');
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php $mergeColums = $browseType == 'needconfirm' ? 5 : 10;?>
|
||||
<td colspan='<?php echo $mergeColums?>'>
|
||||
<?php if($cases):?>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
echo html::selectAll() . html::selectReverse();
|
||||
if(common::hasPriv('testcase', 'batchEdit'))echo html::submitButton($lang->edit, "onclick='changeAction(\"" . inLink('batchEdit', "from=testcaseBrowse&productID=$productID&orderBy=$orderBy") . "\")'");
|
||||
if(common::hasPriv('testtask', 'batchRun')) echo html::submitButton($lang->testtask->runCase, "onclick='changeAction(\"" . $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy") . "\")'");
|
||||
?>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<?php $pager->show();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
Reference in New Issue
Block a user