Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -129,6 +129,7 @@ $lang->bug->resolvedByMeAB = '由我解决';
|
||||
$lang->bug->ditto = '同上';
|
||||
$lang->bug->dittoNotice = '该bug与上一bug不属于同一产品!';
|
||||
$lang->bug->noAssigned = '未指派';
|
||||
$lang->bug->noBug = '暂时没有BUG,您现在可以';
|
||||
|
||||
/* 页面标签。*/
|
||||
$lang->bug->lblAssignedTo = '当前指派';
|
||||
|
||||
@@ -10,8 +10,13 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if(empty($bugs)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->bug->noBug;?></span> <?php common::printLink('bug', 'create', "productID={$productID}", "<i class='icon icon-plus'> </i>" . $lang->bug->create, '', "class='btn btn-info'");?></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/datatable.fix.html.php';
|
||||
js::set('browseType', $browseType);
|
||||
js::set('moduleID', $moduleID);
|
||||
@@ -387,4 +392,5 @@ $(function(){$('#modulemenu .nav li:last').after("<li class='right'><a style='fo
|
||||
#querybox #searchform{border-bottom: 1px solid #ddd; margin-bottom: 20px;}
|
||||
</style>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
+26
-11
@@ -268,22 +268,39 @@ $lang->bug->menu->index = array('link' => "<i class='icon-home'></i>QA|qa|in
|
||||
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
|
||||
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testcase->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testcase->menu->report = array('link' => 'Report|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->testcase->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
|
||||
$lang->testcase->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
|
||||
$lang->testcase->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>QA|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = $lang->testcase->menu;
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->testtask->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testtask->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
|
||||
$lang->testtask->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
|
||||
$lang->testtask->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = $lang->testcase->menu;
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->testsuite->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->testsuite->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testsuite->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
|
||||
$lang->testsuite->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = $lang->testcase->menu;
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->testreport->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->testreport->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
|
||||
$lang->testreport->menu->report = array('link' => 'Report|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testreport->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
@@ -294,8 +311,6 @@ $lang->caselib->menu->testtask = array('link' => 'Build|testtask|browse|');
|
||||
$lang->caselib->menu->testsuite = array('link' => 'Suite|testsuite|browse|');
|
||||
$lang->caselib->menu->report = array('link' => 'Report|testreport|browse|');
|
||||
$lang->caselib->menu->caselib = array('link' => 'Library|testsuite|library', 'alias' => 'createlib,createcase,libview,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase');
|
||||
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i>Create a Library|testsuite|createLib|", 'float' => 'right');
|
||||
$lang->caselib->menu->index = array('link' => "<i class='icon-home'></i>Test Home|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
/* 文档视图菜单设置。*/
|
||||
$lang->doc = new stdclass();
|
||||
|
||||
@@ -279,20 +279,39 @@ $lang->bug->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testcase->menu->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testcase->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->testcase->menu->report = array('link' => '报告|testreport|browse|productID=%s');
|
||||
$lang->testcase->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = $lang->testcase->menu;
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->testtask->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testtask->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->testtask->menu->report = array('link' => '报告|testreport|browse|productID=%s');
|
||||
$lang->testtask->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = $lang->testcase->menu;
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->testsuite->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
$lang->testsuite->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testsuite->menu->report = array('link' => '报告|testreport|browse|productID=%s');
|
||||
$lang->testsuite->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = $lang->testcase->menu;
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->testreport->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
$lang->testreport->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->testreport->menu->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testreport->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
|
||||
@@ -11,11 +11,8 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
bootbox.alert("<?php echo $lang->product->errorNoProduct?>", function(){location.href='<?php echo $this->createLink('product', 'create')?>'});
|
||||
})
|
||||
</script>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->product->noProduct;?></span> <?php common::printLink('product', 'create', '', "<i class='icon icon-plus'> </i>" . $lang->product->create, '', "class='btn btn-info'");?></p>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
|
||||
@@ -104,10 +104,10 @@
|
||||
<th class="c-actions-2"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $groupIndex = 1;?>
|
||||
<?php foreach($tasks as $groupKey => $groupTasks):?>
|
||||
<?php
|
||||
<tbody>
|
||||
<?php $groupIndex = 1;?>
|
||||
<?php foreach($tasks as $groupKey => $groupTasks):?>
|
||||
<?php
|
||||
$groupWait = 0;
|
||||
$groupDone = 0;
|
||||
$groupDoing = 0;
|
||||
@@ -119,79 +119,80 @@
|
||||
$groupName = $groupKey;
|
||||
if($groupBy == 'story') $groupName = empty($groupName) ? $this->lang->task->noStory : zget($groupByList, $groupKey);
|
||||
if($groupBy == 'assignedTo' and $groupName == '') $groupName = $this->lang->task->noAssigned;
|
||||
?>
|
||||
<?php
|
||||
$groupSum = 0;
|
||||
foreach($groupTasks as $taskKey => $task)
|
||||
{
|
||||
$groupEstimate += $task->estimate;
|
||||
$groupConsumed += $task->consumed;
|
||||
$groupLeft += ($task->status == 'cancel' ? 0 : $task->left);
|
||||
?>
|
||||
<?php
|
||||
$groupSum = 0;
|
||||
foreach($groupTasks as $taskKey => $task)
|
||||
{
|
||||
$groupEstimate += $task->estimate;
|
||||
$groupConsumed += $task->consumed;
|
||||
$groupLeft += ($task->status == 'cancel' ? 0 : $task->left);
|
||||
|
||||
if($task->status == 'wait') $groupWait++;
|
||||
if($task->status == 'doing') $groupDoing++;
|
||||
if($task->status == 'done') $groupDone++;
|
||||
if($task->status == 'closed') $groupClosed++;
|
||||
}
|
||||
$groupSum = count($groupTasks);
|
||||
?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($groupTasks as $task):?>
|
||||
<?php $assignedToClass = $task->assignedTo == $app->user->account ? "style='color:red'" : '';?>
|
||||
<?php $taskLink = $this->createLink('task','view',"taskID=$task->id"); ?>
|
||||
<tr data-id='<?php echo $groupIndex?>' <?php if($groupIndex > 1 and $i == 0) echo "class='divider-top'";?>>
|
||||
<?php if($i == 0):?>
|
||||
<td rowspan='<?php echo $groupSum?>' class='c-side text-left group-toggle text-top'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $groupName, '', "class='text-primary' title='$groupName'");?>
|
||||
<div class='groupSummary small'>
|
||||
if($task->status == 'wait') $groupWait++;
|
||||
if($task->status == 'doing') $groupDoing++;
|
||||
if($task->status == 'done') $groupDone++;
|
||||
if($task->status == 'closed') $groupClosed++;
|
||||
}
|
||||
$groupSum = count($groupTasks);
|
||||
?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($groupTasks as $task):?>
|
||||
<?php $assignedToClass = $task->assignedTo == $app->user->account ? "style='color:red'" : '';?>
|
||||
<?php $taskLink = $this->createLink('task','view',"taskID=$task->id"); ?>
|
||||
<tr data-id='<?php echo $groupIndex?>' <?php if($groupIndex > 1 and $i == 0) echo "class='divider-top'";?>>
|
||||
<?php if($i == 0):?>
|
||||
<td rowspan='<?php echo $groupSum?>' class='c-side text-left group-toggle text-top'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $groupName, '', "class='text-primary' title='$groupName'");?>
|
||||
<div class='groupSummary small'>
|
||||
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHoursAB, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->groupSummaryAB, $groupSum, $groupWait, $groupDoing, $groupEstimate, $groupConsumed, $groupLeft);?>
|
||||
</div>
|
||||
</td>
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHoursAB, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->groupSummaryAB, $groupSum, $groupWait, $groupDoing, $groupEstimate, $groupConsumed, $groupLeft);?>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='c-id-sm'><?php echo $task->id;?></td>
|
||||
<td class="c-pri"><span class='label-pri <?php echo 'label-pri-' . $task->pri?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
|
||||
<td class="c-name">
|
||||
<?php
|
||||
if(!empty($task->team)) echo '<span class="label">' . $lang->task->multipleAB . '</span> ';
|
||||
if(!empty($task->parent)) echo '<span class="label">' . $lang->task->childrenAB . '</span> ';
|
||||
if(isset($task->children) && $task->children == true) echo '<span class="label">' . $lang->task->parentAB . '</span> ';
|
||||
if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;
|
||||
?>
|
||||
</td>
|
||||
<td class="c-status"><span class='status-<?php echo $task->status;?>'><span class="label label-dot"></span> <?php echo $lang->task->statusList[$task->status];?></span></td>
|
||||
<td class="c-assign text-left has-btn"><?php echo html::a($this->createLink('task', 'assignTo', "projectID=$task->project&taskID=$task->id", 'html', true), '<i class="icon icon-hand-right"></i> ' . $task->assignedToRealName, '', "class='iframe btn btn-icon-left' $assignedToClass");?></td>
|
||||
<td class='c-user'><?php echo zget($users, $task->finishedBy);?></td>
|
||||
<td class="c-hours em"><?php echo $task->estimate;?></td>
|
||||
<td class="c-hours em"><?php echo $task->consumed;?></td>
|
||||
<td class="c-hours em"><?php echo $task->left;?></td>
|
||||
<td class="c-num em"><?php echo $task->progress . '%';?></td>
|
||||
<td class="c-type"><?php echo zget($lang->task->typeList, $task->type);?></td>
|
||||
<td class='c-date <?php if(isset($task->delay)) echo 'delayed';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
|
||||
<td class="c-actions">
|
||||
<?php common::printIcon('task', 'edit', "taskid=$task->id", '', 'list');?>
|
||||
<?php common::printIcon('task', 'delete', "projectID=$task->project&taskid=$task->id", '', 'list', '', 'hiddenwin');?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<?php if($i != 0):?>
|
||||
<tr class='group-toggle group-summary hidden <?php if($groupIndex > 1) echo 'divider-top';?>' data-id='<?php echo $groupIndex?>'>
|
||||
<td class='c-side text-left'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-right text-muted'></i> " . $groupName, '', "title='$groupName'");?>
|
||||
</td>
|
||||
<td colspan='13'>
|
||||
<div class="table-row segments-list">
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->countSummary, $groupSum, $groupWait, $groupDoing);?>
|
||||
<?php printf($lang->project->timeSummary, $groupEstimate, $groupConsumed, $groupLeft);?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<td class='c-id-sm'><?php echo $task->id;?></td>
|
||||
<td class="c-pri"><span class='label-pri <?php echo 'label-pri-' . $task->pri?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
|
||||
<td class="c-name">
|
||||
<?php
|
||||
if(!empty($task->team)) echo '<span class="label">' . $lang->task->multipleAB . '</span> ';
|
||||
if(!empty($task->parent)) echo '<span class="label">' . $lang->task->childrenAB . '</span> ';
|
||||
if(isset($task->children) && $task->children == true) echo '<span class="label">' . $lang->task->parentAB . '</span> ';
|
||||
if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;
|
||||
?>
|
||||
</td>
|
||||
<td class="c-status"><span class='status-<?php echo $task->status;?>'><span class="label label-dot"></span> <?php echo $lang->task->statusList[$task->status];?></span></td>
|
||||
<td class="c-assign text-left has-btn"><?php echo html::a($this->createLink('task', 'assignTo', "projectID=$task->project&taskID=$task->id", 'html', true), '<i class="icon icon-hand-right"></i> ' . $task->assignedToRealName, '', "class='iframe btn btn-icon-left' $assignedToClass");?></td>
|
||||
<td class='c-user'><?php echo zget($users, $task->finishedBy);?></td>
|
||||
<td class="c-hours em"><?php echo $task->estimate;?></td>
|
||||
<td class="c-hours em"><?php echo $task->consumed;?></td>
|
||||
<td class="c-hours em"><?php echo $task->left;?></td>
|
||||
<td class="c-num em"><?php echo $task->progress . '%';?></td>
|
||||
<td class="c-type"><?php echo zget($lang->task->typeList, $task->type);?></td>
|
||||
<td class='c-date <?php if(isset($task->delay)) echo 'delayed';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
|
||||
<td class="c-actions">
|
||||
<?php common::printIcon('task', 'edit', "taskid=$task->id", '', 'list');?>
|
||||
<?php common::printIcon('task', 'delete', "projectID=$task->project&taskid=$task->id", '', 'list', '', 'hiddenwin');?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<?php if($i != 0):?>
|
||||
<tr class='group-toggle group-summary hidden <?php if($groupIndex > 1) echo 'divider-top';?>' data-id='<?php echo $groupIndex?>'>
|
||||
<td class='c-side text-left'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-right text-muted'></i> " . $groupName, '', "title='$groupName'");?>
|
||||
</td>
|
||||
<td colspan='13'>
|
||||
<div class="table-row segments-list">
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->countSummary, $groupSum, $groupWait, $groupDoing);?>
|
||||
<?php printf($lang->project->timeSummary, $groupEstimate, $groupConsumed, $groupLeft);?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php $groupIndex ++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php $groupIndex ++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1111,11 +1111,12 @@ class story extends control
|
||||
$this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID"), $products[$productID]);
|
||||
$this->view->position[] = $this->lang->story->zeroCase;
|
||||
|
||||
$this->view->stories = $this->story->getZeroCase($productID, $sort);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->productID = $productID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
|
||||
$this->view->stories = $this->story->getZeroCase($productID, $sort);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->productID = $productID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
|
||||
$this->view->browseType = '';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<th class='w-hour'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
<th> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th class='w-140px'><?php echo $lang->actions;?></th>
|
||||
<th class='w-180px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -47,8 +47,8 @@
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='storyIDList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' />
|
||||
<label></label>
|
||||
<?php printf('%03d', $story->id);?>
|
||||
</div>
|
||||
<?php printf('%03d', $story->id);?>
|
||||
</td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>'><?php echo zget($lang->story->priList, $story->pri)?></span></td>
|
||||
<td class='text-left' title="<?php echo $story->title?>"><nobr><?php echo html::a($viewLink, $story->title);?></nobr></td>
|
||||
|
||||
@@ -174,6 +174,9 @@ class testcase extends control
|
||||
}
|
||||
}
|
||||
|
||||
$this->app->loadLang('project');
|
||||
$this->app->loadLang('task');
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common;
|
||||
$this->view->position[] = html::a($this->createLink('testcase', 'groupTask', "productID=$productID&groupBy=$groupBy"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->testcase->common;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
});
|
||||
|
||||
@@ -198,13 +198,13 @@ js::set('branch', $branch);
|
||||
</div>
|
||||
<script>
|
||||
$('#module' + moduleID).addClass('active');
|
||||
$('#' + caseBrowseType + 'Tab').addClass('active');
|
||||
$('#' + caseBrowseType + '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');
|
||||
$shortcut.addClass('btn-active-text');
|
||||
$('#bysearchTab').removeClass('btn-active-text');
|
||||
$('#querybox').removeClass('show');
|
||||
}
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1,43 +1,35 @@
|
||||
<?php js::set('flow', $this->config->global->flow);?>
|
||||
<?php if(!isset($branch)) $branch = 0;?>
|
||||
<?php if($this->config->global->flow == 'onlyTest'):?>
|
||||
<style>
|
||||
.nav > li > .btn-group > a, .nav > li > .btn-group > a:hover, .nav > li > .btn-group > a:focus{background: #1a4f85; border-color: #164270;}
|
||||
.outer.with-side #featurebar {background: none; border: none; line-height: 0; margin: 0; min-height: 0; padding: 0; }
|
||||
#querybox #searchform{border-bottom: 1px solid #ddd; margin-bottom: 20px;}
|
||||
</style>
|
||||
<div id='featurebar'>
|
||||
<ul class='submenu hidden'>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left hidden'>
|
||||
<?php
|
||||
$hasBrowsePriv = common::hasPriv('testcase', 'browse');
|
||||
$hasGroupPriv = common::hasPriv('testcase', 'groupcase');
|
||||
$hasZeroPriv = common::hasPriv('story', 'zerocase');
|
||||
?>
|
||||
<?php
|
||||
if($this->methodName == 'browse') echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a></li> ";
|
||||
?>
|
||||
<li class='pull-right'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php
|
||||
$initModule = isset($moduleID) ? (int)$moduleID : 0;
|
||||
$misc = common::hasPriv('testcase', 'create') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
|
||||
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
echo html::a($link, "<i class='icon-plus'></i>" . $lang->testcase->create, '', $misc);
|
||||
<?php if($this->methodName == 'browse') echo "<a id='bysearchTab' class='btn btn-link'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a>";?>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php
|
||||
$initModule = isset($moduleID) ? (int)$moduleID : 0;
|
||||
$misc = common::hasPriv('testcase', 'create') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
|
||||
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
echo html::a($link, "<i class='icon-plus'></i>" . $lang->testcase->create, '', $misc);
|
||||
|
||||
$misc = common::hasPriv('testcase', 'batchCreate') ? '' : "disabled";
|
||||
$link = common::hasPriv('testcase', 'batchCreate') ? $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle <?php echo $misc?>' data-toggle='dropdown'>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', "class='$misc'") . "</li>";?>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
$misc = common::hasPriv('testcase', 'batchCreate') ? '' : "disabled";
|
||||
$link = common::hasPriv('testcase', 'batchCreate') ? $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle <?php echo $misc?>' data-toggle='dropdown'>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', "class='$misc'") . "</li>";?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<li class='pull-right'>
|
||||
<a href='###' class='dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon-upload-alt'></i> <?php echo $lang->import ?><span class='caret'></span></a>
|
||||
<a href='###' class='dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon-import'></i> <?php echo $lang->import ?><span class='caret'></span></a>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
@@ -72,20 +64,21 @@
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div id='featurebar'>
|
||||
<ul class='nav'>
|
||||
<li>
|
||||
<div class='label-angle<?php if(!empty($moduleID)) echo ' with-close';?>'>
|
||||
<?php
|
||||
echo !empty($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-remove'></i>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div id="sidebarHeader">
|
||||
<?php echo html::commonButton('<i class="icon icon-caret-left"></i>', '', 'btn btn-icon btn-sm btn-info sidebar-toggle');?>
|
||||
<div class="title">
|
||||
<?php
|
||||
echo !empty($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-remove'></i>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php
|
||||
$hasBrowsePriv = common::hasPriv('testcase', 'browse');
|
||||
$hasGroupPriv = common::hasPriv('testcase', 'groupcase');
|
||||
@@ -100,11 +93,11 @@
|
||||
if($hasBrowsePriv and strpos($menuType, 'QUERY') === 0)
|
||||
{
|
||||
$queryID = (int)substr($menuType, 5);
|
||||
echo "<li id='{$menuType}Tab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=bySearch¶m=$queryID"), $menuItem->text) . "</li>";
|
||||
echo html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=bySearch¶m=$queryID"), $menuItem->text, '', "class='btn btn-link' id='{$menuType}Tab'");
|
||||
}
|
||||
elseif($hasBrowsePriv and ($menuType == 'all' or $menuType == 'needconfirm' or $menuType == 'wait'))
|
||||
{
|
||||
echo "<li id='{$menuType}Tab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$menuType"), $menuItem->text) . "</li>";
|
||||
echo html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$menuType"), $menuItem->text, '', "class='btn btn-link' id='{$menuType}Tab'");
|
||||
}
|
||||
elseif($hasBrowsePriv and $menuType == 'suite')
|
||||
{
|
||||
@@ -112,8 +105,8 @@
|
||||
$currentSuite = zget($suiteList, $currentSuiteID, '');
|
||||
$currentLable = empty($currentSuite) ? $lang->testsuite->common : $currentSuite->name;
|
||||
|
||||
echo "<li id='bysuiteTab' class='dropdown'>";
|
||||
echo html::a('javascript:;', $currentLable . " <span class='caret'></span>", '', "data-toggle='dropdown'");
|
||||
echo "<div id='bysuiteTab' class='btn-group'>";
|
||||
echo html::a('javascript:;', $currentLable . " <span class='caret'></span>", '', "class='btn btn-link' data-toggle='dropdown'");
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px; overflow-y:auto'>";
|
||||
|
||||
if(empty($suiteList))
|
||||
@@ -123,7 +116,7 @@
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
foreach ($suiteList as $suiteID => $suite)
|
||||
foreach($suiteList as $suiteID => $suite)
|
||||
{
|
||||
$suiteName = $suite->name;
|
||||
if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
|
||||
@@ -134,7 +127,7 @@
|
||||
echo "</li>";
|
||||
}
|
||||
|
||||
echo '</ul></li>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
elseif($hasGroupPriv and $menuType == 'group')
|
||||
{
|
||||
@@ -142,11 +135,11 @@
|
||||
$current = zget($lang->testcase->groups, isset($groupBy) ? $groupBy : '', '');
|
||||
if(empty($current)) $current = $lang->testcase->groups[''];
|
||||
|
||||
echo "<li id='groupTab' class='dropdown'>";
|
||||
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "data-toggle='dropdown'");
|
||||
echo "<div id='groupTab' class='btn-group'>";
|
||||
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "class='btn btn-link' data-toggle='dropdown'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
|
||||
foreach ($lang->testcase->groups as $key => $value)
|
||||
foreach($lang->testcase->groups as $key => $value)
|
||||
{
|
||||
if($key == '') continue;
|
||||
echo '<li' . ($key == $groupBy ? " class='active'" : '') . '>';
|
||||
@@ -154,74 +147,68 @@
|
||||
echo "</li>";
|
||||
}
|
||||
|
||||
echo '</ul></li>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
elseif($hasZeroPriv and $menuType == 'zerocase')
|
||||
{
|
||||
echo "<li id='zerocaseTab'>" . html::a($this->createLink('story', 'zeroCase', "productID=$productID"), $lang->story->zeroCase) . '</li>';
|
||||
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID"), $lang->story->zeroCase, '', "class='btn btn-link' id='zerocaseTab'");
|
||||
}
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
<?php
|
||||
if($this->methodName == 'browse') echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a></li> ";
|
||||
if($this->methodName == 'browse') echo "<a id='bysearchTab' class='btn btn-link'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a>";
|
||||
?>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'>
|
||||
<i class='icon-export'></i> <?php echo $lang->export ?>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon-import'></i> <?php echo $lang->import ?><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFile, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
$initModule = isset($moduleID) ? (int)$moduleID : 0;
|
||||
|
||||
if(common::hasPriv('testcase', 'batchCreate'))
|
||||
{
|
||||
$link = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo html::a($link, "<i class='icon-plus'></i> " . $lang->testcase->batchCreate, '', "class='btn btn-secondary'");
|
||||
}
|
||||
|
||||
if(common::hasPriv('testcase', 'create'))
|
||||
{
|
||||
$link = $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo html::a($link, "<i class='icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class='actions'>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
|
||||
<i class='icon-download-alt'></i> <?php echo $lang->export ?>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon-upload-alt'></i> <?php echo $lang->import ?><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFile, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php
|
||||
$initModule = isset($moduleID) ? (int)$moduleID : 0;
|
||||
$misc = common::hasPriv('testcase', 'create') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
|
||||
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
echo html::a($link, "<i class='icon-plus'></i>" . $lang->testcase->create, '', $misc);
|
||||
|
||||
$misc = common::hasPriv('testcase', 'batchCreate') ? '' : "disabled";
|
||||
$link = common::hasPriv('testcase', 'batchCreate') ? $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle <?php echo $misc?>' data-toggle='dropdown'>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', "class='$misc'") . "</li>";?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php
|
||||
|
||||
@@ -14,62 +14,84 @@
|
||||
<?php include '../../common/view/treetable.html.php';?>
|
||||
<?php include './caseheader.html.php';?>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<table class='table table-fixed' id='treetable'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->typeAB;?></th>
|
||||
<th class='w-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->testcase->status;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->bugs?>'><?php echo $lang->testcase->bugsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->results?>'><?php echo $lang->testcase->resultsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->stepNumber?>'><?php echo $lang->testcase->stepNumberAB;?></th>
|
||||
<th class='w-60px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($cases as $groupKey => $groupTasks):?>
|
||||
<?php $groupClass = ($i % 2 == 0) ? 'even' : 'highlight-warning'; $i ++;?>
|
||||
<tr id='node-<?php echo $groupKey;?>' class='actie-disabled group-title'>
|
||||
<td class='text-right <?php echo $groupClass;?> text-left large strong group-name'><?php echo $groupKey;?></td>
|
||||
<td colspan='11' class='text-left'><?php if($groupByList) echo $groupByList[$groupKey];?></td>
|
||||
</tr>
|
||||
<?php foreach($groupTasks as $case):?>
|
||||
<tr id='<?php echo $case->id;?>' class='text-center child-of-node-<?php echo $groupKey;?>'>
|
||||
<td class='<?php echo $groupClass;?>'></td>
|
||||
<td class='text-left'> <?php echo $case->id . $lang->colon; if(!common::printLink('testcase', 'view', "case=$case->id", $case->title)) echo $case->title;?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
|
||||
<td><?php echo $lang->case->typeList[$case->type];?></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 if(isset($run)) echo $run->status;?>'>
|
||||
<div class="main-table" data-ride="table" data-checkable="false" data-group="true">
|
||||
<table class="table table-grouped text-center">
|
||||
<thead>
|
||||
<tr class="divider">
|
||||
<th class="c-side text-left has-btn group-menu">
|
||||
<div class="table-group-btns">
|
||||
<button type="button" class="btn btn-block btn-link group-collapse-all"><?php echo $lang->project->treeLevel['root'];?> <i class="icon-caret-up"></i></button>
|
||||
<button type="button" class="btn btn-block btn-link group-expand-all"><?php echo $lang->project->treeLevel['all'];?> <i class="icon-caret-down"></i></button>
|
||||
</div>
|
||||
</th>
|
||||
<th class='c-id-sm'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->typeAB;?></th>
|
||||
<th class='w-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->testcase->status;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->bugs?>'><?php echo $lang->testcase->bugsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->results?>'><?php echo $lang->testcase->resultsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->stepNumber?>'><?php echo $lang->testcase->stepNumberAB;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $groupIndex = 0;?>
|
||||
<?php foreach($cases as $groupKey => $groupTasks):?>
|
||||
<?php
|
||||
if($case->needconfirm)
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
echo html::a(helper::createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin');
|
||||
echo ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $lang->testcase->statusList[$case->status];
|
||||
}
|
||||
$i = 0;
|
||||
$groupName = $groupByList ? $groupByList[$groupKey] : '';
|
||||
if(empty($groupName) and $groupBy == 'story') $groupName = $lang->task->noStory;
|
||||
if(empty($groupName) and $groupBy == 'assignedTo') $groupName = $lang->task->noAssigned;
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a(inlink('bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs;?></td>
|
||||
<td><?php echo (common::hasPriv('testtask', 'results') and $case->results) ? html::a($this->createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->results, '', "class='iframe'") : $case->results;?></td>
|
||||
<td><?php echo $case->stepNumber;?></td>
|
||||
<td>
|
||||
<?php common::printIcon('testcase', 'edit', "caseID=$case->id", '', 'list');?>
|
||||
<?php common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php foreach($groupTasks as $case):?>
|
||||
<tr data-id='<?php echo $groupIndex;?>' <?php if($i == 0) echo "class='divider-top'";?>>
|
||||
<?php if($i == 0):?>
|
||||
<td rowspan='<?php echo count($groupTasks);?>' class='c-side text-left group-toggle text-top'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-down'></i> $groupName", '', "class='text-primary'");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='c-id-sm'><?php echo $case->id;?></td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $case->pri;?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
|
||||
<td class='text-left'><?php if(!common::printLink('testcase', 'view', "case=$case->id", $case->title)) echo $case->title;?></td>
|
||||
<td><?php echo zget($lang->case->typeList, $case->type, '');?></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='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
<td class='<?php if(isset($run)) echo $run->status;?>'>
|
||||
<?php
|
||||
if($case->needconfirm)
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
echo html::a(helper::createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin');
|
||||
echo ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $lang->testcase->statusList[$case->status];
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a(inlink('bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs;?></td>
|
||||
<td><?php echo (common::hasPriv('testtask', 'results') and $case->results) ? html::a($this->createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->results, '', "class='iframe'") : $case->results;?></td>
|
||||
<td><?php echo $case->stepNumber;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php common::printIcon('testcase', 'edit', "caseID=$case->id", '', 'list');?>
|
||||
<?php common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<tr data-id='<?php echo $groupIndex;?>' class='group-toggle group-summary hidden divider-top'>
|
||||
<td class='c-side text-left'><?php echo html::a('###', "<i class='icon-caret-right'></i> $groupName");?></td>
|
||||
<td colspan='12'></td>
|
||||
</tr>
|
||||
<?php $groupIndex++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user