- [misc] Remove unused view files.

This commit is contained in:
liugang
2025-09-11 16:30:53 +08:00
parent 6861dd7679
commit 53be2c64c6
663 changed files with 0 additions and 73131 deletions
-44
View File
@@ -1,44 +0,0 @@
<?php
/**
* The start file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang<wwccss@gmail.com>
* @package testtask
* @version $Id: start.html.php 935 2013-01-16 07:49:24Z wwccss@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $testtask->id;?></span>
<?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
<small><?php echo $lang->arrow . $lang->testtask->activate;?></small>
</div>
</div>
<form class='load-indicator main-form' method='post' id='activateForm'>
<table class='table table-form'>
<tr class='hide'>
<th class='w-45px'><?php echo $lang->testtask->status;?></th>
<td><?php echo html::hidden('status', 'doing');?></td>
</tr>
<?php $this->printExtendFields($testtask, 'table');?>
<tr>
<th class='w-45px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center form-actions'><?php echo html::submitButton() . ' ' . html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide');?></td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-126
View File
@@ -1,126 +0,0 @@
<?php
/**
* The batch edit view of testcase module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Congzhi Chen <congzhi@cnezsoft.com>
* @package testcase
* @version $Id$
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('from', $from);?>
<?php $this->app->loadLang('testcase'); unset($this->lang->testcase->resultList['n/a']); ?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2><?php echo ($from == 'testtask' ? ($lang->testtask->common . $lang->hyphen) : ''). $lang->testtask->batchRun;?></h2>
</div>
<form class='main-form no-stash' method='post' target='hiddenwin'>
<table class='table table-fixed table-form table-bordered'>
<thead>
<tr>
<th class='w-id'> <?php echo $lang->idAB;?></th>
<th class='w-100px'><?php echo $lang->testcase->module;?></th>
<th class='w-200px'><?php echo $lang->testcase->title;?></th>
<th class='precondition w-90px'><?php echo $lang->testcase->precondition;?></th>
<th class='w-80px'><?php echo $lang->testcase->result?></th>
<th><?php echo $lang->testcase->stepDesc . '/' . $lang->testcase->stepExpect?></th>
</tr>
</thead>
<?php foreach($cases as $caseID => $case):?>
<?php if($case->auto == 'auto' and $confirm == 'yes') continue;?>
<?php if($case->status == 'wait') continue;?>
<?php if(!$productID) echo html::hidden("caseIDList[$case->id]", $caseID); ?>
<tr class='text-center'>
<td><?php echo $caseID . html::hidden("version[$caseID]", $case->version)?></td>
<td class='text-left'><?php echo "<span title='" . $moduleOptionMenu[$case->module] . "'>" . $moduleOptionMenu[$case->module] . "</span>"?></td>
<td class='text-left wordwrap'><?php echo "<span title='{$case->title}'>{$case->title}</span>"?></td>
<td class='text-left precondition wordwrap'><?php echo "<span title='{$case->precondition}'>{$case->precondition}</span>"?></td>
<td class='text-left'>
<?php echo html::radio("results[$caseID]", $this->lang->testcase->resultList, 'pass', "onclick='showAction(this.value,\".action$caseID\")'", 'block')?>
</td>
<td>
<?php if(!empty($steps[$caseID])):?>
<table class='table table-fixed'>
<?php $stepId = $childId = 0;?>
<?php foreach($steps[$caseID] as $stepID => $step):?>
<?php
if($step->type == 'group' or $step->type == 'step')
{
$stepId ++;
$childId = 0;
}
$ID = $step->type == 'item' ? "{$stepId}.{$childId}" : $stepId;
$stepClass = $step->type == 'item' ? 'step-item' : 'step-group';
?>
<tr>
<td class='text-left w-p30 wordwrap' <?php if($step->type == 'group') echo "colspan='2'"?>><?php echo "<span title='$step->desc' class='$stepClass'>" . $ID . "、" . $step->desc . '</span>'?></td>
<?php if($step->type != 'group'):?>
<td class='text-left w-p30 wordwrap'><?php echo "<span title='$step->expect'>" . $lang->testcase->stepExpect . ":" . $step->expect . '</span>'?></td>
<td class='w-90px hidden action<?php echo $caseID?>'><?php echo html::select("steps[$caseID][$stepID]", $lang->testcase->resultList, 'pass', "class='form-control'")?></td>
<td class='hidden action<?php echo $caseID?>'><?php echo html::input("reals[$caseID][$stepID]", '', "class='form-control'");?></td>
<?php endif;?>
</tr>
<?php $childId ++;?>
<?php endforeach?>
</table>
<?php else:?>
<span class='hidden action<?php echo $caseID?>'><?php echo html::input("reals[$caseID][]", '', "class='form-control'");?></span>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
<tr><td colspan='6' class='text-center'><?php echo html::submitButton();?></td></tr>
</table>
</form>
</div>
<script>
function showAction(value, obj)
{
if(value == 'pass')
{
$(obj).addClass('hidden');
$(obj).find('select[id^=steps]').val(value);
if($(obj).parent().prop('tagName') == 'TR')
{
$(obj).closest('tbody').children('tr').each(function(){
var $td = $(this).children('td:first');
if($td.attr('colspan') != undefined) $td.attr('colspan', 2);
});
}
}
else
{
$(obj).removeClass('hidden');
$(obj).find('select[id^=steps]').eq(-1).val(value);
if($(obj).parent().prop('tagName') == 'TR')
{
$(obj).closest('tbody').children('tr').each(function(){
var $td = $(this).children('td:first');
if($td.attr('colspan') != undefined) $td.attr('colspan', 4);
});
}
}
}
$(function()
{
/* Readjust precondition width by cases precondition. */
preconditionWidth = $('th.precondition').width();
$precondition = $('tbody td.precondition');
length = $precondition.length;
for(i = 0; i < length; i++)
{
width = $precondition.eq(i).find('span:first').width();
if(width > preconditionWidth)
{
preconditionWidth = width;
if(preconditionWidth > 200) preconditionWidth = 200;
$('th.precondition').width(preconditionWidth);
}
}
$('tbody td.precondition').addClass('wordwrap');
})
</script>
<?php include '../../common/view/footer.html.php';?>
-46
View File
@@ -1,46 +0,0 @@
<?php
/**
* The start file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang<wwccss@gmail.com>
* @package testtask
* @version $Id: start.html.php 935 2013-01-16 07:49:24Z wwccss@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $testtask->id;?></span>
<?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
<small> <?php echo $lang->arrow . $lang->testtask->block;?></small>
</h2>
</div>
<form class='load-indicator main-form' method='post' id='blockForm'>
<table class='table table-form'>
<tr class='hide'>
<th class='w-45px'><?php echo $lang->testtask->status;?></th>
<td><?php echo html::hidden('status', 'blocked');?></td>
</tr>
<?php $this->printExtendFields($testtask, 'table');?>
<tr>
<th class='w-45px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center form-actions'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide'); ?></td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-134
View File
@@ -1,134 +0,0 @@
<?php
/**
* The browse view file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: browse.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('confirmDelete', $lang->testtask->confirmDelete)?>
<?php js::set('flow', $config->global->flow);?>
<?php
$scope = $this->session->testTaskVersionScope;
$status = $this->session->testTaskVersionStatus;
$status = strtolower($status);
?>
<?php js::set('status', $status);?>
<style>
#action-divider{display: inline-block; line-height: 0px;}
</style>
<div id="mainMenu" class='clearfix'>
<div class="btn-toolbar pull-left">
<div class='btn-group'>
<?php $viewName = $scope == 'local'? $productName : $lang->testtask->all;?>
<a href='javascript:;' class='btn btn-link btn-limit' data-toggle='dropdown'><span class='text' title='<?php echo $viewName;?>'><?php echo $viewName;?></span> <span class='caret'></span></a>
<ul class='dropdown-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
<?php
echo "<li>" . html::a(inlink('browse', "productID=$productID&branch=0&type=all,$status"), $lang->testtask->all) . "</li>";
echo "<li>" . html::a(inlink('browse', "productID=$productID&branch=$branch&type=local,$status"), $productName, '', "title='{$productName}' class='text-ellipsis'") . "</li>";
?>
</ul>
</div>
<?php common::sortFeatureMenu();?>
<?php foreach($lang->testtask->featureBar['browse'] as $key => $label):?>
<?php $key = strtolower($key);?>
<?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,$key"), "<span class='text'>$label</span>", '', "id='{$key}Tab' class='btn btn-link'");?>
<?php endforeach;?>
<?php $condition = "productID=$productID&branch=$branch&type=$scope,$status&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}&pageID=1"?>
<div class='input-group w-300px input-group-sm'>
<span class='input-group-addon'><?php echo $lang->testtask->beginAndEnd;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $beginTime, "class='form-control form-date' onchange='changeDate(this.value, \"$endTime\", \"$condition\")' placeholder='" . $lang->testtask->begin . "'");?></div>
<span class='input-group-addon'><?php echo $lang->testtask->to;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $endTime, "class='form-control form-date' onchange='changeDate(\"$beginTime\", this.value, \"$condition\")' placeholder='" . $lang->testtask->end . "'");?></div>
</div>
</div>
<?php if(common::canModify('product', $product)):?>
<div class="btn-toolbar pull-right">
<?php common::printLink('testtask', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
</div>
<?php endif;?>
</div>
<div id='mainContent' class='main-table'>
<?php if(empty($tasks)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
<?php if(common::canModify('product', $product) and common::hasPriv('testtask', 'create')):?>
<?php echo html::a($this->createLink('testtask', 'create', "product=$productID"), "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
<?php else:?>
<table class='table has-sort-head' id='taskList'>
<thead>
<?php $vars = "productID=$productID&branch=$branch&type=$scope,$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<tr>
<th class='c-id text-left'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='c-name text-left'> <?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
<th class='text-left'> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
<?php if(!$product->shadow):?>
<th class='text-left'> <?php common::printOrderLink('product', $orderBy, $vars, $lang->testtask->product);?></th>
<?php endif;?>
<th class='text-left'> <?php common::printOrderLink('execution', $orderBy, $vars, $lang->testtask->execution);?></th>
<th class='c-status text-left'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-user text-left'> <?php common::printOrderLink('owner', $orderBy, $vars, $lang->testtask->owner);?></th>
<th class='c-date text-left'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->begin);?></th>
<th class='c-date text-left'> <?php common::printOrderLink('end', $orderBy, $vars, $lang->testtask->end);?></th>
<?php
$extendFields = $this->testtask->getFlowExtendFields();
foreach($extendFields as $extendField) echo "<th>{$extendField->name}</th>";
?>
<th class='c-actions-6 text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php
$waitCount = 0;
$testingCount = 0;
$blockedCount = 0;
$doneCount = 0;
?>
<?php foreach($tasks as $task):?>
<?php if($task->status == 'wait') $waitCount ++;?>
<?php if($task->status == 'doing') $testingCount ++;?>
<?php if($task->status == 'blocked') $blockedCount ++;?>
<?php if($task->status == 'done') $doneCount ++;?>
<tr class='text-left'>
<td><?php echo html::a(inlink('cases', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a(inlink('cases', "taskID=$task->id"), $task->name);?></td>
<td class='c-name' title="<?php echo $task->buildName?>"><?php echo ($task->build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName, '', "data-group=execution");?></td>
<?php if(!$product->shadow):?>
<td class='c-name' title="<?php echo $task->productName?>"><?php echo $task->productName?></td>
<?php endif;?>
<td class='c-name' title="<?php echo $task->executionName?>"><?php echo $task->executionName?></td>
<?php $statusName = $this->processStatus('testtask', $task);?>
<td title='<?php echo $statusName;?>'>
<span class='status-testtask status-<?php echo $task->status?>'>
<?php echo $statusName;?>
</span>
</td>
<td title="<?php echo zget($users, $task->owner);?>"><?php echo zget($users, $task->owner);?></td>
<td><?php echo $task->begin?></td>
<td><?php echo $task->end?></td>
<?php foreach($extendFields as $extendField) echo "<td>" . $this->loadModel('flow')->getFieldValue($extendField, $task) . "</td>";?>
<td class='c-actions'>
<?php echo $this->testtask->buildOperateMenu($task, 'browse');?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<div class="table-statistic"><?php echo $status == 'totalstatus' ? sprintf($lang->testtask->allSummary, count($tasks), $waitCount, $testingCount, $blockedCount, $doneCount) : sprintf($lang->testtask->pageSummary, count($tasks));?></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</div>
<script>$(function(){$("#" + status + "Tab").addClass('btn-active-text').append(" <span class='label label-light label-badge'><?php echo $pager->recTotal;?></span>")})</script>
<?php include '../../common/view/footer.html.php';?>
-85
View File
@@ -1,85 +0,0 @@
<?php
/**
* The browse view file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: browse.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../testcase/view/caseheader.html.php';?>
<?php js::set('confirmDelete', $lang->testtask->confirmDelete)?>
<?php js::set('flow', $config->global->flow);?>
<style>
#action-divider{display: inline-block; line-height: 0px; border-right: 2px solid #ddd}
</style>
<div id='mainContent' class='main-row'>
<div class="main-col main-table">
<?php if(empty($tasks)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
</p>
</div>
<?php else:?>
<table class='table' data-ride='table' id='taskList'>
<thead>
<?php $vars = "productID=$productID&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<tr>
<th class='c-id text-left'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-300px text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
<th class='text-left'> <?php common::printOrderLink('execution', $orderBy, $vars, $lang->testtask->execution);?></th>
<th class='text-left'> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
<th class='c-user text-left'> <?php common::printOrderLink('owner', $orderBy, $vars, $lang->testtask->owner);?></th>
<th class='w-90px text-left'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->execTime);?></th>
<th class='w-60px text-center'><?php echo $lang->testtask->caseCount;?></th>
<th class='w-60px text-center'><?php echo $lang->testtask->passCount;?></th>
<th class='w-60px text-center'><?php echo $lang->testtask->failCount;?></th>
<th class='c-actions-3 text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($tasks as $task):?>
<tr class='text-left'>
<td><?php printf('%03d', $task->id);?></td>
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a(inlink('unitCases', "taskID=$task->id"), $task->name, '', "data-app={$this->app->tab}");?></td>
<td class='c-name' title="<?php echo $task->executionName?>"><?php echo $task->executionName?></td>
<td class='c-name' title="<?php echo $task->buildName;?>"><?php echo ($task->build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName, '', 'data-app="execution"');?></td>
<td><?php echo zget($users, $task->owner);?></td>
<td><?php echo $task->begin?></td>
<td class='text-center'><?php echo $task->caseCount?></td>
<td class='text-center pass'><?php echo $task->passCount?></td>
<td class='text-center fail'><?php echo $task->failCount?></td>
<td class='c-actions'>
<?php
common::printIcon('testtask', 'unitCases', "taskID=$task->id", '', 'list', 'list-alt');
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list');
if(common::hasPriv('testtask', 'delete', $task))
{
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '<i class="icon-common-delete icon-trash"></i>', '', "title='{$lang->testcase->delete}' class='btn'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($browseType != 'newest'):?>
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
<?php endif;?>
<?php endif;?>
</div>
</div>
<script>
$(function()
{
$('#<?php echo $browseType?>UnitTab').addClass('btn-active-text');
})
</script>
<?php include '../../common/view/footer.html.php';?>
-220
View File
@@ -1,220 +0,0 @@
<?php
/**
* The view file of case module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package case
* @version $Id: view.html.php 594 2010-03-27 13:44:07Z wwccss $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datatable.fix.html.php';?>
<?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);?>
<?php js::set('browseType', $browseType);?>
<?php js::set('moduleID', $moduleID);?>
<?php js::set('automation', !empty($automation) ? $automation->id : 0);?>
<?php $this->app->loadLang('zanode');?>
<?php js::set('runCaseConfirm', $lang->zanode->runCaseConfirm);?>
<?php js::set('confirmURL', $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=id_desc&from=testtask&taskID=$taskID&confirm=yes"));?>
<?php js::set('cancelURL', $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=id_desc&from=testtask&taskID=$taskID&confirm=no"));?>
<div id='mainContent' class='main-row fade'>
<div class='side-col' id='sidebar'>
<div class="sidebar-toggle"><i class="icon icon-angle-left"></i></div>
<div class='cell'><?php echo $moduleTree;?></div>
</div>
<div class='main-col'>
<div class="cell" id="queryBox" data-module='testtask'></div>
<?php
$datatableId = $this->moduleName . ucfirst($this->methodName);
$useDatatable = (isset($config->datatable->$datatableId->mode) and $config->datatable->$datatableId->mode == 'datatable');
?>
<form class='main-table table-cases' data-hot='true' method='post' name='casesform' id='casesForm' <?php if(!$useDatatable) echo "data-ride='table'";?>>
<div class="table-header fixed-right">
<nav class="btn-toolbar pull-right"></nav>
</div>
<?php
$vars = "taskID=$task->id&browseType=$browseType&param=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
$canBatchUnlink = common::hasPriv('testtask', 'batchUnlinkCases');
$canBatchAssign = common::hasPriv('testtask', 'batchAssign');
$canBatchRun = common::hasPriv('testtask', 'batchRun');
$canBatchAction = ($canBeChanged and ($canBatchEdit or $canBatchUnlink or $canBatchAssign or $canBatchRun));
if($useDatatable) include '../../common/view/datatable.html.php';
if(!$useDatatable) include '../../common/view/tablesorter.html.php';
$config->testcase->datatable->defaultField = $config->testtask->datatable->defaultField;
$config->testcase->datatable->fieldList['actions']['width'] = '120';
$setting = $this->datatable->getSetting('testtask');
$widths = $this->datatable->setFixedFieldWidth($setting);
$columns = 0;
?>
<?php if(!$useDatatable) echo '<div class="table-responsive">';?>
<table class='table has-sort-head<?php if($useDatatable) echo ' datatable';?>' id='caseList' data-fixed-left-width='<?php echo $widths['leftWidth']?>' data-fixed-right-width='<?php echo $widths['rightWidth']?>' data-checkbox-name='caseIDList[]'>
<thead>
<tr>
<?php
foreach($setting as $key => $value)
{
if($value->show)
{
$this->datatable->printHead($value, $orderBy, $vars, $canBatchAction);
$columns ++;
}
}
?>
</tr>
</thead>
<tbody>
<?php foreach($runs as $run):?>
<tr data-id='<?php echo $run->id?>' data-auto='<?php echo $run->auto;?>'>
<?php foreach($setting as $key => $value) $this->testtask->printCell($value, $run, $users, $task, $branches, $useDatatable ? 'datatable' : 'table');?>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if(!$useDatatable) echo '</div>';?>
<?php if($runs):?>
<div class='table-footer'>
<?php if($canBatchAction):?>
<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&branch=all");
$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
$actionLink = $this->createLink('testtask', 'batchUnlinkCases', "taskID=$task->id");
$misc = "onclick=\"setFormAction('$actionLink')\"";
echo "<li>" . html::a('javascript:;', $lang->testtask->unlinkCase, '', $misc) . "</li>";
?>
</ul>
<?php endif;?>
</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>
<?php
$withSearch = count($assignedToList) > 10;
$actionLink = inLink('batchAssign', "taskID=$task->id");
echo html::select('assignedTo', $assignedToList, '', 'class="hidden"');
?>
<div class="dropdown-menu search-list<?php if($withSearch) echo ' search-box-sink';?>" data-ride="searchList">
<?php if($withSearch):?>
<?php $membersPinYin = common::convert2Pinyin($assignedToList);?>
<div class="input-control search-box 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 ($assignedToList as $key => $value):?>
<?php
if(empty($key) or $key == 'closed') continue;
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
echo html::a("javascript:$(\"#assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\")", $value, '', $searchKey);
?>
<?php endforeach;?>
</div>
</div>
</div>
<?php endif;?>
<?php
if($canBatchRun)
{
echo html::commonButton($lang->testtask->runCase, "onclick=\"confirmAction()\"");
}
?>
</div>
<?php endif;?>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php else:?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->testcase->noCase;?></span> <?php if($canBeChanged) common::printLink('testtask', 'linkCase', "taskID={$taskID}", "<i class='icon icon-link'></i> " . $lang->testtask->linkCase, '', "class='btn btn-info'");?></p>
</div>
<?php endif;?>
</form>
</div>
</div>
<script>
$('#module' + moduleID).addClass('active');
$('#' + taskCaseBrowseType + 'Tab').addClass('btn-active-text');
<?php if($browseType == 'bysearch'):?>
$shortcut = $('#QUERY<?php echo (int)$param;?>Tab');
if($shortcut.size() > 0)
{
$shortcut.addClass('active');
$('#bysearchTab').removeClass('active');
$('#querybox').removeClass('show');
}
<?php endif;?>
<?php if($useDatatable):?>
$(function(){$('#casesForm').table();})
<?php endif;?>
$("thead").find('.c-assignedTo').attr('class', '');
function runAutocase()
{
var caseIDList = [];
$.each($('input[name^=caseIDList]:checked'),function(){
caseIDList.push($(this).val());
});
var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=' + automation)
var postData = {'caseIDList' : caseIDList.join(',')};
var response = true;
$.post(url, postData, function(result)
{
if(result.result == 'fail')
{
alert(result.message);
response = false;
}
}, 'json');
return response;
}
function confirmAction(obj)
{
var autoRun = 'no';
$.each($('input[name^=caseIDList]:checked'),function(){
var dataAuto = $(this).parents('tr').attr('data-auto');
if(dataAuto == 'auto') autoRun = dataAuto;
});
if(autoRun == 'no' || !automation)
{
setFormAction(cancelURL, '', '#caseList');
return false;
}
if(confirm(runCaseConfirm))
{
var result = runAutocase();
if(result) setFormAction(confirmURL, '', '#caseList');
}
else
{
setFormAction(cancelURL, '', '#caseList');
}
return false;
}
</script>
<?php include '../../common/view/footer.html.php';?>
-57
View File
@@ -1,57 +0,0 @@
<?php
/**
* The close file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang<wwccss@gmail.com>
* @package testtask
* @version $Id: close.html.php 935 2013-01-16 07:49:24Z wwccss@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div id='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $testtask->id;?></span>
<?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
<small> <?php echo $lang->arrow . $lang->testtask->close;?></small>
</h2>
</div>
<form class='load-indicator main-form' method='post' id='closeForm'>
<table class='table table-form'>
<tr class='hide'>
<th class='w-60px'><?php echo $lang->testtask->status;?></th>
<td><?php echo html::hidden('status', 'done');?></td>
</tr>
<?php $this->printExtendFields($testtask, 'table');?>
<tr>
<th class='w-100px'><?php echo $lang->testtask->realFinishedDate;?></th>
<td><?php echo html::input('realFinishedDate', helper::isZeroDate($testtask->realFinishedDate) ? helper::now() : $testtask->realFinishedDate, "class='form-control form-datetime w-180px'");?></td>
</tr>
<tr>
<th class='w-60px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->mailto;?></th>
<td>
<div class='input-group'>
<?php echo html::select('mailto[]', $users, str_replace(' ' , '', $testtask->mailto), "multiple class='form-control chosen'");?>
<?php if($contactLists) echo html::select('', $contactLists, '', "class='form-control chosen' onchange=\"setMailto('mailto', this.value)\"");?>
</div>
</td>
</tr>
<tr>
<td colspan='2' class='text-center form-actions'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide');?></td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-129
View File
@@ -1,129 +0,0 @@
<?php
/**
* The create view of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('projectID', $projectID);?>
<?php js::set('multiple', isset($noMultipleExecutionID) ? false : true);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->testtask->create;?></h2>
</div>
<form method='post' class="main-form form-ajax" enctype="multipart/form-data" id='dataform'>
<table class='table table-form'>
<?php if(isset($executionID)):?>
<tr <?php if(!empty($product->shadow)) echo "class='hide'";?>>
<th class='w-100px'><?php echo $lang->testtask->product;?></th>
<td class='w-p35-f'><?php echo html::select('product', $products, $product->id, "class='form-control chosen' onchange='loadProductRelated()'");?></td><td></td>
</tr>
<?php else:?>
<tr class='hide'>
<th class='w-100px'><?php echo $lang->testtask->product;?></th>
<td class='w-p35-f'><?php echo html::input('product', $product->id, "class='form-control' onchange='loadTestReports(this.value)'");?></td><td></td>
</tr>
<?php endif;?>
<?php if(isset($noMultipleExecutionID)):?>
<?php echo html::hidden('execution', $noMultipleExecutionID);?>
<?php else:?>
<tr class='<?php echo ($app->tab == 'execution' and $executionID) ? 'hide' : '';?>'>
<th class='w-100px'><?php echo $lang->testtask->execution;?></th>
<td class='w-p35-f'><?php echo html::select('execution', $executions, $executionID, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?></td><td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->testtask->build;?></th>
<td>
<div class='input-group' id='buildBox'>
<?php echo html::select('build', empty($builds) ? '' : $builds, $build, "class='form-control chosen'");?>
<?php if(isset($executionID) and $executionID and empty($builds)):?>
<span class='input-group-addon'><?php echo html::a(helper::createLink('build', 'create', "executionID=$executionID&productID={$product->id}&projectID={$projectID}", '', true), $lang->build->create, '', "data-toggle='modal' data-type='iframe' data-width='95%'")?> </span>
<div class='hidden'><?php echo '&nbsp; ' . html::a("javascript:void(0)", $lang->refresh, '', "class='refresh' onclick='loadExecutionBuilds($executionID)'");?></div>
<?php endif;?>
</div>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->testtask->type;?></th>
<td><?php echo html::select('type[]', $lang->testtask->typeList, '', "class='form-control picker-select' multiple");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->owner;?></th>
<td>
<div id='ownerAndPriBox' class='input-group'>
<?php echo html::select('owner', $users, '', "class='form-control chosen'");?>
<span class='input-group-addon fix-border'><?php echo $lang->testtask->pri;?></span>
<?php echo html::select('pri', $lang->testtask->priList, 3, "class='form-control chosen'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->testtask->begin;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', '', "class='form-control form-date' onchange='suitEndDate()'");?>
<span class='input-group-addon fix-border'><?php echo $lang->testtask->end;?></span>
<?php echo html::input('end', '', "class='form-control form-date'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->testtask->status;?></th>
<td><?php echo html::select('status', $lang->testtask->statusList, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->testreport;?></th>
<td><?php echo html::select('testreport', $testreports, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->name;?></th>
<td colspan='2'><?php echo html::input('name', '', "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->desc;?></th>
<td colspan='2'>
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=testtask&link=desc');?>
<?php echo html::textarea('desc', '', "rows=10 class='form-control'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->mailto;?></th>
<td colspan='2'>
<div id='mailtoGroup' class='input-group'>
<?php
echo html::select('mailto[]', $users, '', "multiple class='form-control picker-select'");
echo $this->fetch('my', 'buildContactLists');
?>
</div>
</td>
</tr>
<?php $this->printExtendFields('', 'table');?>
<tr>
<td class='text-center form-actions' colspan='3'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-119
View File
@@ -1,119 +0,0 @@
<?php
/**
* The edit view of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: edit.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('projectID', $task->project);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $task->id), $task->name, '_blank');?>
<small class='text-muted'><?php echo $lang->arrow . $lang->testtask->edit;?></small>
</h2>
</div>
<form method='post' class="main-form form-ajax" enctype="multipart/form-data" id='dataform'>
<table class='table table-form'>
<?php echo html::hidden('product', $task->product);?>
<?php if(!empty($project) and !$project->multiple):?>
<?php echo html::hidden('execution', $task->execution);?>
<?php else:?>
<tr class='<?php echo ($app->tab == 'execution' and $task->execution) ? 'hide' : '';?>'>
<th class='w-100px'><?php echo $lang->testtask->execution;?></th>
<td class='w-p35-f'>
<?php echo html::select('execution', $executions, $task->execution, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?>
</td>
<td></td>
</tr>
<?php endif;?>
<tr>
<th class='w-100px'><?php echo $lang->testtask->build;?></th>
<td class='w-p35-f'><span id='buildBox'><?php echo html::select('build', $builds, $task->build, "class='form-control chosen'");?></span></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->testtask->type;?></th>
<td><?php echo html::select('type[]', $lang->testtask->typeList, $task->type, "class='form-control picker-select' multiple");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->owner;?></th>
<td>
<div id='ownerAndPriBox' class='input-group'>
<?php echo html::select('owner', $users, $task->owner, "class='form-control chosen'");?>
<span class='input-group-addon fix-border'><?php echo $lang->testtask->pri;?></span>
<?php echo html::select('pri', $lang->testtask->priList, $task->pri, "class='form-control chosen'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->testtask->begin;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', $task->begin, "class='form-control form-date'");?>
<span class='input-group-addon fix-border'><?php echo $lang->testtask->end;?></span>
<?php echo html::input('end', $task->end, "class='form-control form-date'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->testtask->status;?></th>
<td><?php echo html::select('status', $lang->testtask->statusList, $task->status, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->testreport;?></th>
<td><?php echo html::select('testreport', array('') + $testreports, $task->testreport, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->name;?></th>
<td colspan='2'><?php echo html::input('name', $task->name, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->desc;?></th>
<td colspan='2'>
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=testtask&link=desc');?>
<?php echo html::textarea('desc', htmlSpecialString($task->desc), "rows=10 class='form-control'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='5' class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='3'>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'false', 'object' => $task, 'method' => 'edit'));?>
<?php echo $this->fetch('file', 'buildform');?>
</td>
</tr>
<tr>
<th><?php echo $lang->testtask->mailto;?></th>
<td colspan='2'>
<div class='input-group'>
<?php echo html::select('mailto[]', $users, str_replace(' ' , '', $task->mailto), "multiple class='form-control picker-select'");?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</div>
</td>
</tr>
<?php $this->printExtendFields($task, 'table');?>
<tr>
<td class='text-center form-actions' colspan='3'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-103
View File
@@ -1,103 +0,0 @@
<?php
/**
* The case group view file of testcase module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package testcase
* @version $Id$
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/treetable.html.php';?>
<?php include './caseheader.html.php';?>
<?php js::set('browseType', $browseType);?>
<?php js::set('confirmUnlink', $lang->testtask->confirmUnlinkCase)?>
<div id='casesForm' class="main-table" data-ride="table" data-checkable="false" data-group="true" data-replace-id="treetable">
<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->execution->treeLevel['root'];?> <i class="icon-caret-down"></i></button>
<button type="button" class="btn btn-block btn-link group-expand-all"><?php echo $lang->execution->treeLevel['all'];?> <i class="icon-caret-up"></i></button>
</div>
</th>
<th class='c-id-sm'><?php echo $lang->idAB;?></th>
<th class='w-80px' title='<?php echo $lang->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='c-actions-3'> <?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 = $groupKey ? zget($users, $groupKey, $lang->task->noAssigned) : $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'>
<div class='group-header'><?php echo html::a('###', "<i class='icon-caret-down'></i> $groupName", '', "class='text-primary'");?></div>
</td>
<?php endif;?>
<?php
if(!isset($run->case))
{
echo "<td colspan='13'></td></tr>";
break;
}
?>
<td class='c-id-sm'><?php echo sprintf('%03d', $run->case);?></td>
<td><span class='label-pri <?php echo 'label-pri-' . $run->pri;?>' title='<?php echo zget($lang->testcase->priList, $run->pri, $run->pri);?>'><?php echo zget($lang->testcase->priList, $run->pri, $run->pri);?></span></td>
<td class='text-left case-title' title='<?php echo $run->title?>'><?php if(!common::printLink('testcase', 'view', "caseID=$run->case&version=$run->version&from=testtask&taskID=$run->task", $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>" : $this->processStatus('testcase', $run);?></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 if($canBeChanged):?>
<?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
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'");
}
?>
<?php endif;?>
</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';?>
@@ -1,111 +0,0 @@
<?php
/**
* The create view of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<style>
.input-group>.chosen-container.required:after {top: 6px;}
</style>
<?php js::import($jsRoot . 'misc/date.js');?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->testtask->importUnitResult;?></h2>
</div>
<form method='post' target='hiddenwin' id='dataform' enctype='multipart/form-data'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->testtask->execution;?></th>
<td class='w-p35-f'><?php echo html::select('execution', $executions, '', "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?></td><td></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->testtask->build;?></th>
<td class='w-p35-f'>
<div class='input-group' id='buildBox'>
<?php echo html::select('build', empty($builds) ? '' : $builds, '', "class='form-control chosen'");?>
<?php if(isset($executionID) and $executionID and empty($builds)):?>
<span class='input-group-addon'><?php echo html::a(helper::createLink('build', 'create', "executionID=$executionID", '', true), $lang->build->create, '', "data-toggle='modal' data-type='iframe' data-width='95%'")?> </span>
</div>
<div class='hidden'><?php echo '&nbsp; ' . html::a("javascript:void(0)", $lang->refresh, '', "class='refresh' onclick='loadExecutionBuilds($executionID)'");?></div>
<?php endif;?>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->job->frame;?></th>
<td><?php echo html::select('frame', $lang->job->frameList, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->owner;?></th>
<td>
<div id='ownerAndPriBox' class='input-group'>
<?php echo html::select('owner', $users, $this->app->user->account, "class='form-control chosen'");?>
<span class='input-group-addon fix-border'><?php echo $lang->testtask->pri;?></span>
<?php echo html::select('pri', $lang->testtask->priList, 0, "class='form-control chosen'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->testtask->begin;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', date('Y-m-d'), "class='form-control form-date' onchange='suitEndDate()'");?>
<span class='input-group-addon fix-border'><?php echo $lang->testtask->end;?></span>
<?php echo html::input('end', date('Y-m-d', time() + 24 * 3600), "class='form-control form-date'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->testtask->resultFile;?></th>
<td class='required'><?php echo html::file('resultFile', "class='form-control'");?></td>
<td><?php echo $lang->testtask->unitXMLFormat;?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->name;?></th>
<td colspan='2'><?php echo html::input('name', sprintf($lang->testtask->titleOfAuto, date('Y-m-d H:i:s')), "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', '', "rows=10 class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->mailto;?></th>
<td colspan='2'>
<div id='mailtoGroup' class='input-group'>
<?php
echo html::select('mailto[]', $users, '', "multiple class='form-control chosen'");
echo $this->fetch('my', 'buildContactLists');
?>
</div>
</td>
</tr>
<?php $this->printExtendFields('', 'table');?>
<tr>
<td class='text-center form-actions' colspan='3'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
<?php echo html::hidden('product', $productID);?>
</td>
</tr>
</table>
</form>
</div>
</div>
<script>
$(function()
{
$('#subNavbar li[data-id="case"]').addClass('active');
})
</script>
<?php js::set('projectID', $projectID);?>
<?php include '../../common/view/footer.html.php';?>
-137
View File
@@ -1,137 +0,0 @@
<?php
/**
* The linkcase view file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: linkcase.html.php 4411 2013-02-22 00:56:04Z chencongzhi520@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php echo html::backButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, "data-app='{$app->tab}'", 'btn btn-secondary');?>
<div class='divider'></div>
<?php
$lang->testtask->linkCase = $lang->testtask->linkByStory;
$allActive = $type == 'all' ? 'btn-active-text' : '';
$bystoryActive = $type == 'bystory' ? 'btn-active-text' : '';
common::printLink('testtask', 'linkCase', "taskID=$taskID&type=all", "<span class='text'>" . $lang->testtask->allCases . '</span>', '', "class='btn btn-link {$allActive}'");
common::printLink('testtask', 'linkCase', "taskID=$taskID&type=bystory", "<span class='text'>" . $lang->testtask->linkByStory . '</span>', '', "class='btn btn-link {$bystoryActive}'");
echo "<div class='btn-group'>";
$suitViewName = $type == 'bysuite'? $suiteList[$param]->name : $lang->testtask->linkBySuite;
$suitActive = $type == 'bysuite' ? 'btn-active-text' : '';
$bugActive = $type == 'bybug' ? 'btn-active-text' : '';
echo "<a href='javascript:;' class='btn btn-link {$suitActive}' data-toggle='dropdown'><span class='text'>{$suitViewName}</span> <span class='caret'></span></a>";
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
if($suiteList)
{
foreach($suiteList as $suiteID => $suite)
{
$suiteName = $suite->name;
if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
echo "<li>" . html::a(inlink('linkCase', "taskID=$taskID&type=bysuite&param=$suiteID"), $suiteName, '', "data-app='$app->tab'") . "</li>";
}
}
else
{
echo "<li>" . html::a('###', $lang->testsuite->noticeNone) . "</li>";
}
echo "</ul></div>";
echo "<div class='btn-group'>";
$buildViewName = $type == 'bybuild'? zget($testTask, $param) : $lang->testtask->linkByBuild;
$buildActive = $type == 'bybuild' ? 'btn-active-text' : '';
echo "<a href='javascript:;' class='btn btn-link {$buildActive}' data-toggle='dropdown'><span class='text'>{$buildViewName}</span> <span class='caret'></span></a>";
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
if($testTask)
{
foreach($testTask as $tmpID => $tmpTitle)
{
echo "<li>" . html::a(inlink('linkCase', "taskID=$taskID&type=bybuild&param=$tmpID"), $tmpTitle, '', "data-app='{$app->tab}'") . "</li>";
}
}
else
{
echo "<li>" . html::a('###', $lang->testtask->noticeNoOther) . "</li>";
}
echo "</ul></div>";
?>
<?php common::printLink('testtask', 'linkCase', "taskID=$taskID&type=bybug", "<span class='text'>" . $lang->testtask->linkByBug . '</span>', '', "class='btn btn-link {$bugActive}'");?>
<?php if($type == 'all') echo "<a class='btn btn-link querybox-toggle' id='bysearchTab'><i class='icon icon-search muted'></i> {$lang->testcase->bySearch}</a>";?>
</div>
</div>
<div class="cell show" id="queryBox" data-module='testcase'></div>
<div id='mainContent'>
<form class='main-table table-case' data-ride='table' method='post' id='linkCaseForm'>
<table class='table tablesorter'>
<div class="table-header">
<i class="icon-unlink"></i> &nbsp;<strong><?php echo $lang->testtask->unlinkedCases;?></strong> (<?php echo $pager->recTotal;?>)
</div>
<thead>
<tr>
<th class='c-id'>
<?php if($cases):?>
<div class="checkbox-primary check-all tablesorter-noSort" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-version text-center'><nobr><?php echo $lang->testtask->linkVersion;?></nobr></th>
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php echo $lang->priAB;?></th>
<th><?php echo $lang->testcase->title;?></th>
<th class="<?php echo $type == 'bystory' ? '' : 'hidden';?>"><?php echo $lang->testcase->linkStory;?></th>
<th class='c-type'><?php echo $lang->testcase->type;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->testtask->lastRunAccount;?></th>
<th class='c-date'><?php echo $lang->testtask->lastRunTime;?></th>
<th class='c-result'><?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;?>' title='<?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
<td class='text-left title' title='<?php echo $case->title?>'>
<?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 class="text-left title <?php echo $type == 'bystory' ? '' : 'hidden';?>" title='<?php echo $case->storyTitle?>'><?php if($case->story and $case->storyTitle) echo html::a(helper ::createLink('story', 'view', "storyID=$case->story"), $case->storyTitle);?></td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo zget($users, $case->openedBy);?></td>
<td><?php echo zget($users, $case->lastRunner);?></td>
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
<td class='result-testcase <?php echo $case->lastRunResult;?>'><?php echo $case->lastRunResult ? $lang->testcase->resultList[$case->lastRunResult] : $lang->testcase->unexecuted;?></td>
<td class='status-testcase status-<?php echo $case->status?>'><?php echo $this->processStatus('testcase', $case);?></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 show-always"><?php echo html::submitButton('', '', 'btn');?></div>
<div class="table-statistic"></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
-102
View File
@@ -1,102 +0,0 @@
<?php
/**
* The report view file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: report.html.php 4657 2013-04-17 02:01:26Z chencongzhi520@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::backButton('<i class="icon-goback icon-back"></i> ' . $lang->goback, "data-app='{$app->tab}'", 'btn btn-link');?>
<div class='divider'></div>
<div class='page-title'>
<span class='text'><?php echo $lang->testtask->report->common;?></span>
</div>
</div>
</div>
<div id="mainContent" class='main-row'>
<div class='side-col col-lg'>
<div class='panel'>
<div class='panel-heading'>
<div class='panel-title'><?php echo $lang->testtask->report->select;?></div>
</div>
<div class='panel-body'>
<form method='post' id='chartTypesForm' class='no-stash'>
<div class='checkboxes'>
<?php echo html::checkBox('charts', $lang->testtask->report->charts, $checkedCharts, '', 'block');?>
</div>
<div class='btn-toolbar'>
<?php echo html::selectAll()?>
<?php echo html::submitButton($lang->testtask->report->create, '', "btn btn-primary");?>
</div>
</form>
</div>
</div>
</div>
<div class='main-col'>
<div class='cell'>
<div class='btn-toolbar'>
<?php foreach($lang->report->typeList as $type => $typeName):?>
<?php echo html::a("javascript:changeChartType(\"$type\")", ($type == 'default' ? "<i class='icon icon-list-alt muted'></i> " : "<i class='icon icon-chart-{$type}'></i>") . $typeName, '', "class='btn btn-link " . ($type == $chartType ? 'btn-active-line' : '') . "'")?>
<?php endforeach;?>
</div>
<?php $this->app->loadLang('testcase');?>
<div class='text-muted' style='padding-top:5px'><?php echo str_replace('%tab%', $lang->testtask->wait . $lang->testcase->common, $lang->report->notice->help);?></div>
<?php foreach($charts as $chartType => $chartOption):?>
<div class='table-row chart-row'>
<div class='main-col'>
<div class='chart-wrapper text-center'>
<h4>
<?php echo $lang->testtask->report->charts[$chartType];?>
<?php if($chartType == 'testTaskPerRunResult'):?>
<?php
$total = 0;
foreach($datas['testTaskPerRunResult'] as $key => $data) $total += $data->value;
$pass = isset($datas['testTaskPerRunResult']['pass']) ? $datas['testTaskPerRunResult']['pass']->value : 0;
$noExec = isset($datas['testTaskPerRunResult']['']) ? $datas['testTaskPerRunResult']['']->value : 0;
$fail = isset($datas['testTaskPerRunResult']['fail']) ? $datas['testTaskPerRunResult']['fail']->value : 0;
?>
<a data-toggle='tooltip' title='<?php echo sprintf($lang->testtask->report->testTaskPerRunResultTip, $total, $pass, $noExec, $fail);?>'><i class='icon-help'></i></a>
<?php endif;?>
</h4>
<div class='chart-canvas'><canvas id='chart-<?php echo $chartType ?>' width='<?php echo $chartOption->width;?>' height='<?php echo $chartOption->height;?>' data-responsive='true'></canvas></div>
</div>
</div>
<div class='side-col col-xl'>
<div style="overflow:auto;" class='table-wrapper'>
<table class='table table-condensed table-hover table-striped table-bordered table-chart' data-chart='<?php echo $chartOption->type; ?>' data-target='#chart-<?php echo $chartType ?>' data-animation='false'>
<thead>
<tr>
<th class='chart-label' colspan='2'><?php echo $lang->report->item;?></th>
<th class='w-50px text-right'><?php echo $lang->report->value;?></th>
<th class='w-60px'><?php echo $lang->report->percent;?></th>
</tr>
</thead>
<?php foreach($datas[$chartType] as $key => $data):?>
<tr>
<td class='chart-color'><i class='chart-color-dot'></i></td>
<td class='chart-label text-left'><?php echo $data->name;?></td>
<td class='chart-value text-right'><?php echo $data->value;?></td>
<td class='text-right'><?php echo ($data->percent * 100) . '%';?></td>
</tr>
<?php endforeach;?>
</table>
</div>
</div>
</div>
<?php endforeach;?>
</div>
</div>
</div>
<?php js::set('productID', $productID);?>
<?php js::set('browseType', $browseType);?>
<?php js::set('branchID', $branchID);?>
<?php js::set('moduleID', $moduleID);?>
<?php js::set('taskID', $taskID);?>
<?php include '../../common/view/footer.html.php';?>
-199
View File
@@ -1,199 +0,0 @@
<?php
/**
* The resutls view file of testtask of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: results.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php js::set('tab', $app->tab);?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $case->id;?></span>
<span title='<?php echo $case->title;?>'><?php echo $case->title;?></span>
</h2>
</div>
<div class='main' style='word-break:break-all'>
<?php if($case->auto != 'unit'):?>
<div class='detail'>
<div class='detail-title'><?php echo $lang->testcase->precondition;?></div>
<div class='detail-content'><?php echo $case->precondition;?></div>
</div>
<?php endif;?>
<div class='detail' id='casesResults'>
<table class='table table-condensed table-hover' style='border: 1px solid #ddd; word-break:break-all'>
<?php if($case->auto != 'unit'):?>
<?php $count = count($results);?>
<caption class='text-left'>
<strong><?php echo $lang->testcase->result?> &nbsp;<span> <?php printf($lang->testtask->showResult, $count)?></span> <span class='result-tip'></span></strong>
</caption>
<?php endif;?>
<?php $failCount = 0; $trCount=1?>
<?php foreach($results as $i => $result):?>
<?php
$class = ($result->caseResult == 'pass' ? 'success' : ($result->caseResult == 'fail' ? 'danger' : ($result->caseResult == 'blocked' ? 'warning' : '')));
if($class != 'success') $failCount++;
$fileCount = '(' . count($result->files) . ')';
?>
<tr class='result-item' data-id='<?php echo $result->id?>' data-status='<?php echo $result->node > 0 && empty($result->ZTFResult) ? 'running': 'ready';?>' id='result-<?php echo $class?>' style='cursor: pointer'>
<td class='w-120px'> &nbsp; #<?php echo $result->id?></td>
<td class='w-180px'><?php echo $result->date;?></td>
<?php if($result->node > 0):?>
<td><?php echo sprintf($lang->testtask->runNode, zget($users, $result->lastRunner), $result->nodeName, $lang->testtask->runCase) . "&nbsp;&nbsp;<span class=\"label label-badge\">{$lang->testtask->auto}</span>";?></td>
<?php else:?>
<td><?php echo zget($users, $result->lastRunner) . ' ' . $lang->testtask->runCase;?></td>
<?php endif;?>
<td class='w-150px'><?php echo zget($builds, $result->build, '');?></td>
<td class='w-50px text-right'>
<?php if($result->node == 0 || !empty($result->ZTFResult)):?>
<strong class='result-testcase <?php echo $result->caseResult;?>'><?php echo $lang->testcase->resultList[$result->caseResult];?></strong>
<?php endif;?>
<?php if($result->node > 0 and empty($result->ZTFResult)):?>
<strong class='span-warning'><?php echo $lang->testtask->running;?></strong>
<?php endif;?>
</td>
<td class='w-60px'><?php if(!empty($result->files)) echo html::a("#caseResult{$result->id}", $lang->files . $fileCount, '', "data-toggle='modal' data-type='iframe'")?></td>
<td class='w-50px text-center'><i class='collapse-handle icon-angle-down text-muted'></i></td>
</tr>
<?php $executionParam = $this->app->tab == 'execution' ? "executionID={$this->session->execution}" : "";?>
<?php $executionParam = isset($testtask) ? "executionID=$testtask->execution" : $executionParam;?>
<?php $params = isset($testtask) ? ",testtask=$testtask->id" : "";?>
<?php $params = $params . ",buildID=" . (isset($testtask->build) ? $testtask->build : $result->build);?>
<?php if($executionParam) $params .= ',' . $executionParam;?>
<tr class='result-detail hide' id='tr-detail_<?php echo $trCount++; ?>'>
<td colspan='7' class='pd-0'>
<?php $projectParam = $this->app->tab == 'project' ? "projectID={$this->session->project}," : ''?>
<form data-params='<?php echo "product=$case->product&branch=$case->branch&extras={$projectParam}caseID=$case->id,version=$case->version,resultID=$result->id,runID=$result->run" . $params?>' method='post'>
<table class='table table-condensed resultSteps'>
<thead>
<tr>
<th class='w-60px'><?php echo $lang->testcase->stepID;?></th>
<th class='text-left'><?php echo $lang->testcase->stepDesc;?></th>
<th class='w-p25 text-left'><?php echo $lang->testcase->stepExpect;?></th>
<th class='w-p5 text-left'><?php echo $lang->testcase->stepVersion;?></th>
<th class='w-80px text-center'><?php echo $lang->testcase->result;?></th>
<th class='w-p20 text-left'><?php echo $lang->testcase->real;?></th>
<th class='w-80px'></th>
</tr>
</thead>
<tbody>
<?php
$stepId = $childId = 0;
foreach($result->stepResults as $key => $stepResult):
?>
<?php
if(empty($stepResult['type'])) $stepResult['type'] = 'step';
if(empty($stepResult['parent'])) $stepResult['parent'] = 0;
if($stepResult['type'] == 'group' or $stepResult['type'] == 'step')
{
$stepId++;
$childId = 0;
}
$stepClass = $stepResult['type'] == 'item' ? 'step-item' : 'step-group';
$modalID = $result->id . '-' . $key;
$fileCount = '(' . count($stepResult['files']) . ')';
?>
<tr class='step <?php echo $stepClass?>'>
<td class='step-id'>
<?php if($result->caseResult == 'fail'):?>
<?php $inputName = $stepResult['type'] != 'group' ? 'stepIdList[]' : '';?>
<div class='checkbox-primary'>
<input type='checkbox' id='<?php echo $inputName;?>' name='<?php echo $inputName;?>' value='<?php echo $key;?>'/>
<label><?php if($stepClass == 'step-group') echo $stepId;?></label>
</div>
<?php else:?>
<?php echo $stepId;?>
<?php endif;?>
</td>
<td class='text-left' <?php if($stepResult['type'] == 'group') echo "colspan='6'"?>>
<div class='input-group'>
<?php if($stepResult['type'] == 'item') echo "<span class='step-item-id'>{$stepId}.{$childId}</span>";?>
<?php if(isset($stepResult['desc'])) echo nl2br($stepResult['desc']);?>
</div>
</td>
<?php if($stepResult['type'] != 'group'):?>
<td class='text-left'><?php if(isset($stepResult['expect'])) echo nl2br($stepResult['expect']);?></td>
<td><?php if(isset($result->version)) echo nl2br($result->version);?></td>
<?php if(!empty($stepResult['result'])):?>
<td class='<?php echo $stepResult['result'];?> text-center'><?php echo $lang->testcase->resultList[$stepResult['result']];?></td>
<td><?php echo nl2br($stepResult['real']);?></td>
<td class='text-center'><?php if(!empty($stepResult['files'])) echo html::a("#stepResult{$modalID}", $lang->files . $fileCount, '', "data-toggle='modal' data-type='iframe'")?></td>
<?php else:?>
<td></td>
<td></td>
<?php endif; endif; $childId++;?>
</tr>
<?php endforeach;?>
<?php if($result->caseResult == 'fail' and common::hasPriv('testcase', 'createBug')):?>
<tr>
<td>
<div class="checkbox-primary">
<input type='checkbox' id='<?php echo "checkAll[$i]";?>' name='checkAll' />
<label><?php echo $lang->selectAll?></label>
</div>
</td>
<td></td><td></td><td></td><td></td><td></td>
<td><?php echo html::commonButton($lang->testcase->createBug, "onclick='createBug(this)'", "btn btn-primary createBtn");?></td>
</tr>
<?php endif;?>
<?php if(!empty($result->ZTFResult) && $result->node>0):?>
<tr>
<td colspan="6">
<p></p>
<p><?php echo $lang->testtask->runningLog;?></p>
<p><?php echo $result->ZTFResult;?></p>
</td>
</tr>
<?php endif;?>
</tbody>
</table>
</form>
</td>
</tr>
<?php endforeach;?>
</table>
<?php foreach($results as $result):?>
<div class="modal fade" id="caseResult<?php echo $result->id;?>">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php echo $lang->files;?></h4>
</div>
<div class="modal-body"><?php echo $this->fetch('file', 'printFiles', array('files' => $result->files, 'fieldset' => 'false'));?></div>
</div>
</div>
</div>
<?php if(!empty($result->stepResults)):?>
<?php foreach($result->stepResults as $stepID => $stepResult):?>
<div class="modal fade" id="stepResult<?php echo $result->id . '-' .$stepID;?>">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php echo $lang->files;?></h4>
</div>
<div class="modal-body"><?php echo $this->fetch('file', 'printFiles', array('files' => $stepResult['files'], 'fieldset' => 'false'));?></div>
</div>
</div>
</div>
<?php endforeach;?>
<?php endif;?>
<?php endforeach;?>
<div id='resultTip' class='hide'><?php if($count > 0) echo $failCount > 0 ? "<span>" . sprintf($lang->testtask->showFail, $failCount) . "</span>":"<span class='text-success'>{$lang->testtask->passAll}</span>";?></div>
<style>
.table-hover tr.result-detail:hover td {background: #fff}
#casesResults > table > caption {border: 1px solid #ddd; margin-bottom: -1px}
#casesResults .table{margin-bottom:0px !important;}
</style>
</div>
</div>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
-174
View File
@@ -1,174 +0,0 @@
<?php
/**
* The runrun view file of testtask of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: runcase.html.php 4723 2013-05-03 05:19:29Z chencongzhi520@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php include '../../common/view/form.html.php';?>
<?php js::set('caseResultSave', $lang->save);?>
<?php js::set('tab', $app->tab);?>
<?php js::set('confirm', $confirm);?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $run->case->id;?></span>
<span title='<?php echo $run->case->title?>'><?php echo $run->case->title;?></span>
</h2>
</div>
<form method='post' enctype='multipart/form-data' id='dataform' data-type='ajax'>
<table class='table table-bordered' style='word-break:break-all' id='steps'>
<thead>
<tr>
<td colspan='5' style='word-break: break-all;'><strong><?php echo $lang->testcase->precondition;?></strong><br/><?php echo nl2br($run->case->precondition);?></td>
</tr>
<?php if($confirm != 'yes'):?>
<tr>
<th class='w-50px'><?php echo $lang->testcase->stepID;?></th>
<th class='w-p30'><?php echo $lang->testcase->stepDesc;?></th>
<th class='w-p30'><?php echo $lang->testcase->stepExpect;?></th>
<th class='w-100px'><?php echo $lang->testcase->result;?></th>
<th><?php echo $lang->testcase->real;?></th>
</tr>
<?php endif;?>
</thead>
<?php if($confirm != 'yes'):?>
<?php
if(empty($run->case->steps))
{
$step = new stdclass();
$step->id = 0;
$step->parent = 0;
$step->case = $run->case->id;
$step->type = 'step';
$step->desc = '';
$step->expect = '';
$run->case->steps[] = $step;
}
$stepId = $childId = 0;
?>
<?php foreach($run->case->steps as $key => $step):?>
<?php
$stepClass = "step-{$step->type}";
if($step->type == 'group' or $step->type == 'step')
{
$stepId++;
$childId = 0;
}
?>
<tr class='step <?php echo $stepClass?>'>
<th class='step-id'><?php echo $stepId;?></th>
<td class='text-left' <?php if($step->type == 'group') echo "colspan='4'"?>>
<div class='input-group'>
<?php if($step->type == 'item') echo "<span class='step-item-id'>{$stepId}.{$childId}</span>";?>
<?php echo nl2br($step->desc);?>
</div>
</td>
<?php if($step->type != 'group'):?>
<td class='text-left'><?php echo nl2br($step->expect);?></td>
<td class='text-center'><?php echo html::select("steps[$step->id]", $lang->testcase->resultList, 'pass', "class='form-control' onchange='checkStepValue(this.value)'");?></td>
<td>
<table class='w-p100'>
<tr>
<td class='no-padding bd-0'><?php echo html::textarea("reals[$step->id]", '', "rows=1 class='form-control autosize'");?></td>
<td class='no-padding bd-0 w-50px text-right'><button type='button' title='<?php echo $lang->testtask->files?>' class='btn' data-toggle='modal' data-target='#fileModal<?php echo $step->id?>'><i class='icon icon-paper-clip'></i></button></td>
</tr>
</table>
</td>
<?php endif;?>
</tr>
<?php $childId ++;?>
<?php endforeach;?>
<?php endif;?>
<tr class='text-center'>
<td colspan='5' class='form-actions'>
<?php
if($preCase) echo html::a(inlink('runCase', "runID={$preCase['runID']}&caseID={$preCase['caseID']}&version={$preCase['version']}"), $lang->testtask->pre, '', "id='pre' class='btn btn-wide'");
if($run->case->status != 'wait' and $confirm != 'yes') echo html::submitButton();
if($nextCase) echo '&nbsp;' . html::a(inlink('runCase', "runID={$nextCase['runID']}&caseID={$nextCase['caseID']}&version={$nextCase['version']}"), $lang->testtask->next, '', "id='next' class='btn btn-wide'");
echo html::hidden('case', $run->case->id);
echo html::hidden('version', $run->case->currentVersion);
?>
<ul id='filesName' class='nav'></ul>
</td>
</tr>
</table>
<?php foreach($run->case->steps as $key => $step):?>
<div class="modal fade" id="fileModal<?php echo $step->id;?>">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php echo $lang->testtask->files;?></h4>
</div>
<div class="modal-body">
<?php echo $this->fetch('file', 'buildform', array('fileCount' => 1, 'percent' => 0.9, 'filesName' => "files{$step->id}", 'labelsName' => "labels{$step->id}"));?>
<div class="text-center"><button type="button" class="btn btn-wide btn-primary" onclick='loadFilesName()' data-dismiss="modal"><?php echo $lang->save;?></button></div>
</div>
</div>
</div>
</div>
<?php endforeach;?>
</form>
<div class='main' id='resultsContainer'></div>
</div>
<script>
$(function()
{
loadResult();
});
function loadResult()
{
$('#resultsContainer').load("<?php echo $this->createLink('testtask', 'results', "runID={$runID}&caseID=$caseID&version=$version&status=all");?> #casesResults", function()
{
$('.result-item').click(function()
{
var $this = $(this);
if($this.data('status') == 'running')
{
return;
}
$this.toggleClass('show-detail');
var show = $this.hasClass('show-detail');
$this.next('.result-detail').toggleClass('hide', !show);
$this.find('.collapse-handle').toggleClass('icon-chevron-down', !show).toggleClass('icon-chevron-up', show);;
});
$('#casesResults table caption .result-tip').html($('#resultTip').html());
if($('.result-item:first').data('status') == 'running')
{
var times = 0;
var id = $('.result-item:first').data('id')
var link = createLink('testtask', 'ajaxGetResult', 'resultID=' + id);
var resultInterval = setInterval(() => {
times++;
if(times > 600)
{
clearInterval(resultInterval);
}
$.get(link, function(task)
{
task = JSON.parse(task);
task = task.data;
if(task.ZTFResult != '')
{
clearInterval(resultInterval);
loadResult();
}
});
}, 1000);
}
});
}
var sessionString = '<?php echo session_name() . '=' . session_id();?>';
</script>
<?php include '../../common/view/footer.lite.html.php';?>
-49
View File
@@ -1,49 +0,0 @@
<?php
/**
* The start file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang<wwccss@gmail.com>
* @package testtask
* @version $Id: start.html.php 935 2013-01-16 07:49:24Z wwccss@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $testtask->id;?></span>
<?php echo isonlybody() ? ("<span title='$testtask->name'>" . $testtask->name . '</span>') : html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->testtask->start;?></small>
<?php endif;?>
</div>
</div>
<form class='load-indicator main-form' method='post' id='startForm'>
<table class='table table-form'>
<tr class='hide'>
<th class='w-45px'><?php echo $lang->testtask->status;?></th>
<td><?php echo html::hidden('status', 'doing');?></td>
</tr>
<?php $this->printExtendFields($testtask, 'table');?>
<tr>
<th class='w-45px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan="2" class="text-center form-actions">
<?php echo html::submitButton();?>
<?php echo html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide');?>
</td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-58
View File
@@ -1,58 +0,0 @@
<?php
/**
* The unit view file of testcase module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package testcase
* @version $Id$
* @link https://www.zentao.net
*/
?>
<?php
include '../../common/view/header.html.php';
include '../../common/view/treetable.html.php';
js::set('flow', $config->global->flow);
?>
<style>
<?php if(isonlybody()):?>
#mainMenu {border-bottom:1px solid #ddd;}
.main-table {padding-top:60px;}
<?php endif;?>
</style>
<?php if($config->global->flow == 'full'):?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php $browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browseUnits');?>
<?php echo html::a($browseLink, '<i class="icon-goback icon-back"></i> ' . $lang->goback, '', "class='btn btn-secondary' data-app={$this->app->tab}");?>
<?php if(isonlybody()) echo "<div class='page-title'>{$task->name}</div>";?>
</div>
<div class='btn-toolbar pull-right <?php if(isonlybody()) echo 'hidden';?>'>
<div class='btn-group'>
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-export muted'></i> <?php echo $lang->export ?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu' id='exportActionMenu'>
<?php
$class = common::hasPriv('testcase', 'export') ? '' : "class=disabled";
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=t1.id&taskID=0&browseType=") : '#';
echo "<li $class>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
?>
</ul>
</div>
</div>
</div>
<?php endif;?>
<div class="main-table" data-ride="table" data-checkable="false" data-group="true">
<?php include 'unitgroup.html.php';?>
</div>
<script>
$(function()
{
$('#subNavbar li[data-id="case"]').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php';?>
-135
View File
@@ -1,135 +0,0 @@
<?php
/**
* The view file of case module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package case
* @version $Id: view.html.php 4141 2013-01-18 06:15:13Z zhujinyonging@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php $browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browse', "productID=$task->product");?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php echo html::backButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', 'btn btn-secondary');?>
<div class='divider'></div>
<div class='page-title'>
<span class='label label-id'><?php echo $task->id;?></span>
<span class='text' title='<?php echo $task->name;?>'><?php echo $task->name;?></span>
<?php if($task->deleted):?>
<span class='label label-danger'><?php echo $lang->testtask->deleted;?></span>
<?php endif; ?>
</div>
</div>
</div>
<div id='mainContent' class='main-row'>
<div class="col-8 main-col">
<div class="cell">
<div class="detail">
<div class="detail-title"><?php echo $lang->testtask->desc;?></div>
<div class="detail-content article-content"><?php echo !empty($task->desc) ? $task->desc : $lang->noData;?></div>
</div>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true', 'object' => $task, 'method' => 'view', 'showDelete' => false));?>
<?php if($task->report):?>
<div class="detail">
<div class="detail-title"><?php echo $lang->testtask->report;?></div>
<div class="detail-content article-content"><?php echo $task->report;?></div>
</div>
<?php endif;?>
<?php
$canBeChanged = common::canBeChanged('testtask', $task);
if($canBeChanged) $actionFormLink = $this->createLink('action', 'comment', "objectType=testtask&objectID=$task->id");
?>
</div>
<?php $this->printExtendFields($task, 'div', "position=left&inForm=0&inCell=1");?>
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
<div class='main-actions'>
<div class="btn-toolbar">
<?php echo html::backButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', 'btn btn-secondary');?>
<div class='divider'></div>
<?php echo $this->testtask->buildOperateMenu($task, 'view');?>
</div>
</div>
</div>
<div class="col-4 side-col">
<div class="cell">
<div class="detail">
<div class="detail-title"><?php echo $lang->testtask->legendBasicInfo;?></div>
<div class="detail-content">
<table class="table table-data table-fixed">
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
<?php if(!empty($execution->multiple)):?>
<tr>
<th class='w-90px'><?php echo $lang->testtask->execution;?></th>
<td><?php echo $isOnlybody ? $task->executionName : html::a($this->createLink('execution', 'story', "executionID=$task->execution"), $task->executionName, '', "title='{$task->executionName}'");?></td>
</tr>
<?php endif;?>
<tr>
<th class='w-90px'><?php echo $lang->testtask->build;?></th>
<td>
<?php
if($task->build == 'trunk')
{
print($lang->trunk);
}
else
{
$isOnlybody ? print($task->buildName) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName, '', "title='{$task->buildName}'"));
}
?>
</td>
</tr>
<tr>
<th><?php echo $lang->testtask->type;?></th>
<?php $testType = '';?>
<?php foreach(explode(',', $task->type) as $type) $testType .= zget($lang->testtask->typeList, $type) . ' ';?>
<td class="c-name" title="<?php echo $testType;?>"><?php echo $testType;?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->owner;?></th>
<td><?php echo zget($users, $task->owner);?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->mailto;?></th>
<td><?php $mailto = explode(',', str_replace(' ', '', $task->mailto)); foreach($mailto as $account) echo ' ' . zget($users, $account, $account);?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->pri;?></th>
<td><?php echo zget($lang->testtask->priList, $task->pri);?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->begin;?></th>
<td><?php echo $task->begin;?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->end;?></th>
<td><?php echo $task->end;?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->realFinishedDate;?></th>
<td><?php if(!helper::isZeroDate($task->realFinishedDate)) echo $task->realFinishedDate;?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->status;?></th>
<td class='status-testtask status-<?php echo $task->status?>'><?php echo $this->processStatus('testtask', $task);?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->testreport;?></th>
<td class="c-name" title="<?php echo $testreportTitle;?>"><?php echo empty($task->testreport) ? '' : html::a($this->createLink('testreport', 'view', "reportID=$task->testreport"), $testreportTitle);?></td>
</tr>
</table>
</div>
</div>
</div>
<?php $this->printExtendFields($task, 'div', "position=right&inForm=0&inCell=1");?>
</div>
</div>
<div id='mainActions' class='main-actions'>
<?php common::printPreAndNext($browseLink);?>
</div>
<?php include '../../common/view/footer.html.php';?>