Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -136,7 +136,6 @@ class testcase extends control
|
||||
$this->view->suiteID = $suiteID;
|
||||
$this->view->setShowModule = true;
|
||||
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -770,6 +769,21 @@ class testcase extends control
|
||||
die(js::locate($this->session->caseList));
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch ctory change cases.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchStoryChange($productID = 0)
|
||||
{
|
||||
$caseIDList = $this->post->caseIDList ? $this->post->caseIDList : die(js::locate($this->session->caseList));
|
||||
|
||||
foreach($caseIDList as $caseID) $this->confirmStoryChange($caseID,false);
|
||||
die(js::locate($this->session->caseList));
|
||||
}
|
||||
|
||||
/**
|
||||
* Link related cases.
|
||||
*
|
||||
@@ -877,12 +891,12 @@ class testcase extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function confirmStoryChange($caseID)
|
||||
public function confirmStoryChange($caseID,$reload=true)
|
||||
{
|
||||
$case = $this->testcase->getById($caseID);
|
||||
$this->dao->update(TABLE_CASE)->set('storyVersion')->eq($case->latestStoryVersion)->where('id')->eq($caseID)->exec();
|
||||
$this->loadModel('action')->create('case', $caseID, 'confirmed', '', $case->latestStoryVersion);
|
||||
die(js::reload('parent'));
|
||||
if($reload) die(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,6 +69,7 @@ $lang->testcase->batchEdit = "批量编辑 ";
|
||||
$lang->testcase->batchChangeModule = "批量修改模块";
|
||||
$lang->testcase->delete = "删除";
|
||||
$lang->testcase->batchDelete = "批量删除 ";
|
||||
$lang->testcase->batchStoryChange = "确认变更";
|
||||
$lang->testcase->browse = "用例列表";
|
||||
$lang->testcase->groupCase = "分组浏览用例";
|
||||
$lang->testcase->import = "导入";
|
||||
|
||||
@@ -67,6 +67,10 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
$misc = common::hasPriv('testcase', 'batchDelete') ? "onclick=\"confirmBatchDelete('$actionLink')\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
|
||||
|
||||
$actionLink = $this->createLink('testcase', 'batchStoryChange', "productID=$productID");
|
||||
$misc = common::hasPriv('testcase', 'batchStoryChange') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->testcase->batchStoryChange, '', $misc) . "</li>";
|
||||
|
||||
$actionLink = $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy");
|
||||
$misc = common::hasPriv('testtask', 'batchRun') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->testtask->runCase, '', $misc) . "</li>";
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* The report view file of testcase module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package testcase
|
||||
* @version $Id: report.html.php 4657 2013-04-17 02:01:26Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/chart.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['testcase']);?></span>
|
||||
<strong><small class='text-muted'><?php echo html::icon($lang->icons['report']);?></small> <?php echo $lang->testcase->report->common;?></strong>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
<?php echo html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=0&browseType=$browseType&moduleID=$moduleID"), $lang->goback, '', "class='btn'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row-table row-table-side-left'>
|
||||
<div class='col-side'>
|
||||
<div class='panel panel-sm'>
|
||||
<div class='panel-heading'>
|
||||
<strong><?php echo $lang->testcase->report->select;?></strong>
|
||||
</div>
|
||||
<div class='panel-body' style='padding-top:0'>
|
||||
<form method='post'>
|
||||
<?php echo html::checkBox('charts', $lang->testcase->report->charts, $checkedCharts, '', 'block');?>
|
||||
<?php echo html::selectAll('', "button", false, 'btn-sm')?>
|
||||
<?php echo html::submitButton($lang->testcase->report->create, '', "btn btn-primary btn-sm");?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-main'>
|
||||
<div class='panel panel-sm'>
|
||||
<div class='panel-heading'>
|
||||
<strong>
|
||||
<?php echo $lang->testcase->report->common;?>
|
||||
<span><?php echo $lang->report->notice->help?></span>
|
||||
</strong>
|
||||
</div>
|
||||
<table class='table active-disabled'>
|
||||
<?php foreach($charts as $chartType => $chartOption):?>
|
||||
<tr class='text-top'>
|
||||
<td>
|
||||
<div class='chart-wrapper text-center'>
|
||||
<h5><?php echo $lang->testcase->report->charts[$chartType];?></h5>
|
||||
<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>
|
||||
</td>
|
||||
<td style='width: 320px'>
|
||||
<?php $height = zget($lang->testcase->report->$chartType, 'height', $lang->testcase->report->options->height) . 'px'; ?>
|
||||
<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><?php echo $lang->report->value;?></th>
|
||||
<th><?php echo $lang->report->percent;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($datas[$chartType] as $key => $data):?>
|
||||
<tr class='text-center'>
|
||||
<td class='chart-color w-20px'><i class='chart-color-dot icon-circle'></i></td>
|
||||
<td class='chart-label'><?php echo $data->name;?></td>
|
||||
<td class='chart-value'><?php echo $data->value;?></td>
|
||||
<td><?php echo ($data->percent * 100) . '%';?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user