This commit is contained in:
Catouse
2018-05-14 11:14:35 +08:00
50 changed files with 1377 additions and 1096 deletions
+3 -3
View File
@@ -14,7 +14,7 @@
<div class='detail'>
<div class='detail-title'><?php echo $lang->api->debug;?></div>
<div class='detail-content'>
<form method='post' id='apiForm' class='form-condensed'>
<form method='post' id='apiForm'>
<?php if($method->parameters):?>
<table class='table table-form'>
<?php foreach($method->parameters as $param):?>
@@ -25,12 +25,12 @@
<?php endforeach;?>
<tr>
<td align='center' colspan="2">
<?php echo html::submitButton($lang->api->submit)?>
<?php echo html::submitButton($lang->api->submit, '', 'btn btn-primary btn-wide')?>
</td>
</tr>
</table>
<?php else:?>
<?php echo html::hidden('noparam', '0') . $lang->api->noParam . html::submitButton($lang->api->submit);?>
<?php echo html::hidden('noparam', '0') . $lang->api->noParam . html::submitButton($lang->api->submit, '', 'btn btn-primary btn-wide');?>
<?php endif;?>
<?php if($method->post) echo "<p>{$lang->api->post}</p>"?>
</form>
+65 -2
View File
@@ -720,7 +720,6 @@ class block extends control
$status = isset($this->params->type) ? $this->params->type : '';
$orderBy = isset($this->params->orderBy) ? $this->params->orderBy : 'id_asc';
$num = isset($this->params->num) ? (int)$this->params->num : 0;
/* Get products. */
$products = $this->loadModel('product')->getList($status);
@@ -737,7 +736,6 @@ class block extends control
$products = $this->dao->select('*')->from(TABLE_PRODUCT)
->where('id')->in($productIDList)
->orderBy($orderBy)
->beginIF($this->viewType != 'json')->limit($num)->fi()
->fetchAll('id');
/* Get stories. */
@@ -966,6 +964,39 @@ class block extends control
$this->view->projects = $projects;
}
/**
* Print qa statistic block.
*
* @access public
* @return void
*/
public function printQaStatisticBlock()
{
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
$status = isset($this->params->type) ? $this->params->type : '';
$orderBy = isset($this->params->orderBy) ? $this->params->orderBy : 'id_asc';
/* Get products. */
$products = $this->loadModel('product')->getList($status);
foreach($products as $productID => $product)
{
if(!$this->product->checkPriv($product)) unset($products[$productID]);
}
$productIDList = array_keys($products);
if(!$productIDList)
{
$this->view->products = $products;
return false;
}
$products = $this->dao->select('*')->from(TABLE_PRODUCT)
->where('id')->in($productIDList)
->orderBy($orderBy)
->fetchAll('id');
$this->view->products = $products;
}
/**
* Print overview block.
*
@@ -1024,6 +1055,38 @@ class block extends control
$total++;
}
$overviewPercent = array();
foreach($this->lang->project->statusList as $statusKey => $statusName)
{
if(!isset($overview[$statusKey])) $overview[$statusKey] = 0;
$overviewPercent[$statusKey] = $total ? round($overview[$statusKey] / $total, 2) * 100 . '%' : '0%';
}
$this->view->total = $total;
$this->view->overview = $overview;
$this->view->overviewPercent = $overviewPercent;
}
/**
* Print qa overview block.
*
* @access public
* @return void
*/
public function printQaOverviewBlock()
{
$projects = $this->loadModel('project')->getList();
$total = 0;
foreach($projects as $project)
{
if(!$this->project->checkPriv($project)) continue;
if(!isset($overview[$project->status])) $overview[$project->status] = 0;
$overview[$project->status]++;
$total++;
}
$overviewPercent = array();
foreach($this->lang->project->statusList as $statusKey => $statusName)
+24 -11
View File
@@ -111,29 +111,40 @@ $lang->block->default['project']['4']['params']['num'] = 15;
$lang->block->default['project']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['4']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['1']['title'] = 'My Bugs';
$lang->block->default['qa']['1']['block'] = 'bug';
$lang->block->default['qa']['1']['grid'] = 4;
$lang->block->default['qa']['1']['title'] = 'Test Statistic';
$lang->block->default['qa']['1']['block'] = 'statistic';
$lang->block->default['qa']['1']['grid'] = 8;
$lang->block->default['qa']['1']['params']['num'] = 15;
$lang->block->default['qa']['1']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['1']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['1']['params']['type'] = 'noclosed';
$lang->block->default['qa']['2']['title'] = 'My Cases';
$lang->block->default['qa']['2']['block'] = 'case';
//$lang->block->default['qa']['2']['title'] = 'Testcase Overview';
//$lang->block->default['qa']['2']['block'] = 'overview';
//$lang->block->default['qa']['2']['grid'] = 4;
$lang->block->default['qa']['2']['title'] = 'My Bugs';
$lang->block->default['qa']['2']['block'] = 'bug';
$lang->block->default['qa']['2']['grid'] = 4;
$lang->block->default['qa']['2']['params']['num'] = 15;
$lang->block->default['qa']['2']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['2']['params']['type'] = 'assigntome';
$lang->block->default['qa']['2']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['3']['title'] = 'Pending Builds';
$lang->block->default['qa']['3']['block'] = 'testtask';
$lang->block->default['qa']['3']['title'] = 'My Cases';
$lang->block->default['qa']['3']['block'] = 'case';
$lang->block->default['qa']['3']['grid'] = 4;
$lang->block->default['qa']['3']['params']['num'] = 15;
$lang->block->default['qa']['3']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['3']['params']['type'] = 'wait';
$lang->block->default['qa']['3']['params']['type'] = 'assigntome';
$lang->block->default['qa']['4']['title'] = 'Pending Builds';
$lang->block->default['qa']['4']['block'] = 'testtask';
$lang->block->default['qa']['4']['grid'] = 4;
$lang->block->default['qa']['4']['params']['num'] = 15;
$lang->block->default['qa']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['4']['params']['type'] = 'wait';
$lang->block->default['full']['my']['1']['title'] = 'Welcome';
$lang->block->default['full']['my']['1']['block'] = 'welcome';
@@ -251,6 +262,8 @@ $lang->block->modules['project']->availableBlocks->task = 'Tasks';
$lang->block->modules['project']->availableBlocks->build = 'Builds';
$lang->block->modules['qa'] = new stdclass();
$lang->block->modules['qa']->availableBlocks = new stdclass();
$lang->block->modules['qa']->availableBlocks->statistic = 'Test Statistic';
//$lang->block->modules['qa']->availableBlocks->overview = 'Testcase Overview';
$lang->block->modules['qa']->availableBlocks->bug = 'Bugs';
$lang->block->modules['qa']->availableBlocks->case = 'Cases';
$lang->block->modules['qa']->availableBlocks->testtask = 'Test Builds';
+27 -14
View File
@@ -111,29 +111,40 @@ $lang->block->default['project']['4']['params']['num'] = 15;
$lang->block->default['project']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['4']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['1']['title'] = '指派给我的Bug';
$lang->block->default['qa']['1']['block'] = 'bug';
$lang->block->default['qa']['1']['grid'] = 4;
$lang->block->default['qa']['1']['title'] = '测试统计';
$lang->block->default['qa']['1']['block'] = 'statistic';
$lang->block->default['qa']['1']['grid'] = 8;
$lang->block->default['qa']['1']['params']['num'] = 15;
$lang->block->default['qa']['1']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['1']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['1']['params']['type'] = 'noclosed';
$lang->block->default['qa']['2']['title'] = '指派给我的用例';
$lang->block->default['qa']['2']['block'] = 'case';
//$lang->block->default['qa']['2']['title'] = '测试用例总览';
//$lang->block->default['qa']['2']['block'] = 'overview';
//$lang->block->default['qa']['2']['grid'] = 4;
$lang->block->default['qa']['2']['title'] = '指派给我的Bug';
$lang->block->default['qa']['2']['block'] = 'bug';
$lang->block->default['qa']['2']['grid'] = 4;
$lang->block->default['qa']['2']['params']['num'] = 15;
$lang->block->default['qa']['2']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['2']['params']['type'] = 'assigntome';
$lang->block->default['qa']['2']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['3']['title'] = '待测版本列表';
$lang->block->default['qa']['3']['block'] = 'testtask';
$lang->block->default['qa']['3']['title'] = '指派给我的用例';
$lang->block->default['qa']['3']['block'] = 'case';
$lang->block->default['qa']['3']['grid'] = 4;
$lang->block->default['qa']['3']['params']['num'] = 15;
$lang->block->default['qa']['3']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['3']['params']['type'] = 'wait';
$lang->block->default['qa']['3']['params']['type'] = 'assigntome';
$lang->block->default['qa']['4']['title'] = '待测版本列表';
$lang->block->default['qa']['4']['block'] = 'testtask';
$lang->block->default['qa']['4']['grid'] = 8;
$lang->block->default['qa']['4']['params']['num'] = 15;
$lang->block->default['qa']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['4']['params']['type'] = 'wait';
$lang->block->default['full']['my']['1']['title'] = '欢迎';
$lang->block->default['full']['my']['1']['block'] = 'welcome';
@@ -251,9 +262,11 @@ $lang->block->modules['project']->availableBlocks->task = '任务列表';
$lang->block->modules['project']->availableBlocks->build = '版本列表';
$lang->block->modules['qa'] = new stdclass();
$lang->block->modules['qa']->availableBlocks = new stdclass();
$lang->block->modules['qa']->availableBlocks->bug = 'Bug列表';
$lang->block->modules['qa']->availableBlocks->case = '用例列表';
$lang->block->modules['qa']->availableBlocks->testtask = '版本列表';
$lang->block->modules['qa']->availableBlocks->statistic = '测试统计';
//$lang->block->modules['qa']->availableBlocks->overview = '测试用例总览';
$lang->block->modules['qa']->availableBlocks->bug = 'Bug列表';
$lang->block->modules['qa']->availableBlocks->case = '用例列表';
$lang->block->modules['qa']->availableBlocks->testtask = '版本列表';
$lang->block->modules['todo'] = new stdclass();
$lang->block->modules['todo']->availableBlocks = new stdclass();
$lang->block->modules['todo']->availableBlocks->list = '待办列表';
+28 -15
View File
@@ -111,29 +111,40 @@ $lang->block->default['project']['4']['params']['num'] = 15;
$lang->block->default['project']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['4']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['1']['title'] = '指派給我的Bug';
$lang->block->default['qa']['1']['block'] = 'bug';
$lang->block->default['qa']['1']['grid'] = 4;
$lang->block->default['qa']['1']['title'] = '測試統計';
$lang->block->default['qa']['1']['block'] = 'statistic';
$lang->block->default['qa']['1']['grid'] = 8;
$lang->block->default['qa']['1']['params']['num'] = 15;
$lang->block->default['qa']['1']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['1']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['1']['params']['type'] = 'noclosed';
$lang->block->default['qa']['2']['title'] = '指派給我的用例';
$lang->block->default['qa']['2']['block'] = 'case';
//$lang->block->default['qa']['2']['title'] = '測試用例總覽';
//$lang->block->default['qa']['2']['block'] = 'overview';
//$lang->block->default['qa']['2']['grid'] = 4;
$lang->block->default['qa']['2']['title'] = '指派給我的Bug';
$lang->block->default['qa']['2']['block'] = 'bug';
$lang->block->default['qa']['2']['grid'] = 4;
$lang->block->default['qa']['2']['params']['num'] = 15;
$lang->block->default['qa']['2']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['2']['params']['type'] = 'assigntome';
$lang->block->default['qa']['2']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['3']['title'] = '待測版本列表';
$lang->block->default['qa']['3']['block'] = 'testtask';
$lang->block->default['qa']['3']['title'] = '指派給我的用例';
$lang->block->default['qa']['3']['block'] = 'case';
$lang->block->default['qa']['3']['grid'] = 4;
$lang->block->default['qa']['3']['params']['num'] = 15;
$lang->block->default['qa']['3']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['3']['params']['type'] = 'wait';
$lang->block->default['qa']['3']['params']['type'] = 'assigntome';
$lang->block->default['qa']['4']['title'] = '待測版本列表';
$lang->block->default['qa']['4']['block'] = 'testtask';
$lang->block->default['qa']['4']['grid'] = 8;
$lang->block->default['qa']['4']['params']['num'] = 15;
$lang->block->default['qa']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['4']['params']['type'] = 'wait';
$lang->block->default['full']['my']['1']['title'] = '歡迎';
$lang->block->default['full']['my']['1']['block'] = 'welcome';
@@ -251,9 +262,11 @@ $lang->block->modules['project']->availableBlocks->task = '任務列表';
$lang->block->modules['project']->availableBlocks->build = '版本列表';
$lang->block->modules['qa'] = new stdclass();
$lang->block->modules['qa']->availableBlocks = new stdclass();
$lang->block->modules['qa']->availableBlocks->bug = 'Bug列表';
$lang->block->modules['qa']->availableBlocks->case = '用例列表';
$lang->block->modules['qa']->availableBlocks->testtask = '版本列表';
$lang->block->modules['qa']->availableBlocks->statistic = '測試統計';
//$lang->block->modules['qa']->availableBlocks->overview = '測試用例總覽';
$lang->block->modules['qa']->availableBlocks->bug = 'Bug列表';
$lang->block->modules['qa']->availableBlocks->case = '用例列表';
$lang->block->modules['qa']->availableBlocks->testtask = '版本列表';
$lang->block->modules['todo'] = new stdclass();
$lang->block->modules['todo']->availableBlocks = new stdclass();
$lang->block->modules['todo']->availableBlocks->list = '待辦列表';
@@ -350,7 +363,7 @@ $lang->block->typeList->testtask['done'] = '已測版本';
$lang->block->typeList->testtask['all'] = '全部';
$lang->block->modules['product']->moreLinkList = new stdclass();
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&status=%s';
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&line=0&status=%s';
$lang->block->modules['product']->moreLinkList->story = 'my|story|type=%s';
$lang->block->modules['project']->moreLinkList = new stdclass();
$lang->block->modules['project']->moreLinkList->list = 'project|all|status=%s&project=';
@@ -0,0 +1,35 @@
<?php
/**
* The project overview block view file of block module of RanZhi.
*
* @copyright Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Tingting Dai <daitingting@xirangit.com>
* @package block
* @version $Id$
* @link http://www.zentao.net
*/
?>
<style>
.block-overview .tile-amount {font-size: 48px; margin-bottom: 10px;}
</style>
<div class="panel-body table-row">
<div class="col-4 text-middle text-center">
<div class="tile">
<div class="tile-title"><?php echo $lang->project->allProject;?></div>
<div class="tile-amount"><?php echo $total;?></div>
<a class="btn btn-primary btn-circle btn-icon-right btn-sm" href="<?php echo $this->createLink('project', 'all');?>"><?php echo $lang->project->viewAll;?> <span class="label label-badge label-icon"><i class="icon icon-arrow-right"></i></span></a>
</div>
</div>
<div class="col-8 text-middle">
<ul class="status-bars">
<?php foreach($lang->project->statusList as $statusKey => $statusName):?>
<li>
<span class="value"><?php echo $overview[$statusKey];?></span>
<span class="bar" style="height: <?php echo $overviewPercent[$statusKey];?>"></span>
<span class="title"><?php echo $statusName;?></span>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
+119
View File
@@ -0,0 +1,119 @@
<style>
.types-line {display: table; padding: 0; margin: 0 auto;}
.types-line > li {display: table-cell;}
.types-line > li > div {position: relative; padding: 18px 5px 5px; text-align: center;}
.types-line > li > div:before {content: ''; display: block; background: #eee; width: 100%; height: 2px; position: absolute; left: 50%; top: 4px;}
.types-line > li:last-child > div:before {display: none;}
.types-line > li > div:after {content: ''; display: block; background: #FFFFFF; box-shadow: 0 2px 4px 0 rgba(170,170,170,0.50), 0 0 5px 0 rgba(0,0,0,0.1); width: 10px; height: 10px; position: absolute; border-radius: 50%; top: 0; left: 50%; margin-left: -2px;}
.types-line > li > div > small {display: block; color: #A6AAB8;}
.types-line > li > div > span {display: block; color: #CBD0DB; font-size: 16px;}
.product-info {position: relative; padding: 10px 10px 10px 200px;}
.product-info + .product-info {margin-top: 10px;}
.product-info .progress {position: absolute; left: 10px; top: 33px; width: 180px;}
.product-info .progress-info {position: absolute; left: 8px; top: 8px; width: 180px; font-size: 12px;}
.product-info .type-info {color: #A6AAB8; text-align: center;}
.product-info .type-label {font-size: 12px;}
.product-info .type-value {font-size: 14px;}
.product-info .type-value > strong {font-size: 20px; color: #3C4353;}
.product-info .actions {position: absolute; left: 10px; top: 14px;}
.block-statistic .tile {margin-bottom: 30px;}
.block-statistic .tile-title {font-size: 18px; color: #A6AAB8;}
.block-statistic .tile-amount {font-size: 48px; margin-bottom: 10px;}
.block-statistic .col-nav {border-left: 1px solid #EBF2FB; width: 260px; padding-left: 0;}
.block-statistic .nav-secondary > li > a {font-size: 16px; color: #838A9D; position: relative; box-shadow: none; padding-left: 20px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; transition: all .2s;}
.block-statistic .nav-secondary > li.active > a {font-size: 20px; color: #3C4353; background: transparent; box-shadow: none;}
.block-statistic .nav-secondary > li.active > a:hover,
.block-statistic .nav-secondary > li.active > a:focus,
.block-statistic .nav-secondary > li > a:hover {box-shadow: none;}
.block-statistic .nav-secondary > li.active > a:before {content: ' '; display: block; left: -1px; top: 10px; bottom: 10px; width: 4px; background: #006af1; position: absolute;}
</style>
<div class="panel-body">
<div class="table-row">
<div class="col tab-content">
<?php foreach($projects as $project):?>
<div class="tab-pane fade<?php if($project == reset($projects)) echo ' active in';?>" id="tab3Content<?php echo $project->id;?>">
<div class="table-row">
<div class="col-5 text-middle text-center">
<div class="progress-pie inline-block space" data-value="<?php echo $project->progress;?>" data-doughnut-size="84">
<canvas width="120" height="120"></canvas>
<div class="progress-info">
<small><?php echo $lang->task->statusList['done'];?></small>
<strong><?php echo $project->progress;?><small><?php echo $lang->percent;?></small></strong>
</div>
</div>
<div class="table-row text-center small text-muted with-padding">
<div class="col-4 text-bottom">
<div><?php echo $lang->project->totalEstimate;?></div>
<div><?php echo $project->totalEstimate;?> <span class="muted"><?php echo $lang->task->hour;?></span></div>
</div>
<div class="col-4">
<span class="label label-dot label-primary"></span>
<div><?php echo $lang->project->totalConsumed;?></div>
<div><?php echo $project->totalConsumed;?> <span class="muted"><?php echo $lang->task->hour;?></span></div>
</div>
<div class="col-4">
<span class="label label-dot label-pale"></span>
<div><?php echo $lang->project->totalLeft;?></div>
<div><?php echo $project->totalLeft;?> <span class="muted"><?php echo $lang->task->hour;?></span></div>
</div>
</div>
</div>
<div class="col-7">
<div class="product-info">
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->task->yesterdayFinished;?></span> <strong><?php echo $project->yesterdayFinished;?></strong></div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $project->taskProgress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->taskProgress;?>%">
</div>
</div>
<div class="type-info">
<div class="type-label">
<span><?php echo $lang->task->allTasks;?></span> <?php echo DS;?> <span><?php echo $lang->task->noFinished;?></span>
</div>
<div class="type-value">
<small><?php echo $project->totalTasks;?></small> <?php echo DS;?> <strong><?php echo $project->undoneTasks;?></strong>
</div>
</div>
</div>
<div class="product-info">
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->story->stageList['released'];?></span> <strong><?php echo $project->releasedStories;?></strong></div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $project->storyProgress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->storyProgress;?>%"></div>
</div>
<div class="type-info">
<div class="type-label">
<span><?php echo $lang->story->total;?></span> <?php echo DS;?> <span><?php echo $lang->story->unclosed;?></span>
</div>
<div class="type-value">
<small><?php echo $project->totalStories;?></small> <?php echo DS;?> <strong><?php echo $project->unclosedStories;?></strong>
</div>
</div>
</div>
<div class="product-info">
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->bug->yesterdayResolved;?></span> <strong><?php echo $project->yesterdayResolved;?></strong></div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $project->bugProgress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->bugProgress;?>%">
</div>
</div>
<div class="type-info">
<div class="type-label">
<span><?php echo $lang->bug->allBugs;?></span> <?php echo DS;?> <span><?php echo $lang->bug->unResolved;?></span>
</div>
<div class="type-value">
<small><?php echo $project->totalBugs;?></small> <?php echo DS;?> <strong><?php echo $project->activeBugs;?></strong>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endforeach;?>
</div>
<div class="col col-nav">
<ul class="nav nav-stacked nav-secondary">
<?php foreach($projects as $project):?>
<li <?php if($project == reset($projects)) echo "class='active'";?>><a href="###" data-target="#tab3Content<?php echo $project->id;?>" data-toggle="tab"><?php echo $project->name;?></a></li>
<?php endforeach;?>
</ul>
</div>
</div>
</div>
+4
View File
@@ -1,3 +1,7 @@
.ke-toolbar .ke-outline[data-name='savetemplate'] {display: none}
#modulemenu .nav #dropMenu #searchResult .closed{text-decoration:none;}
.nav #moreMenus{cursor: pointer;}
.input-group .control-product + .chosen-container-single .chosen-single {border-radius: 2px 0 0 2px; border-right-width: 0; padding-right: 1px;}
.input-group .control-product + .chosen-container-active .chosen-single {border-right-width: 1px; padding-right: 0;}
.input-group .control-branch + .chosen-container-single .chosen-single {border-radius: 0 2px 2px 0;}
+261 -267
View File
@@ -22,286 +22,282 @@ js::set('createBuild', $lang->build->create);
js::set('refresh', $lang->refresh);
js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
?>
<div class='container mw-1400px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['bug']);?></span>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['create']);?></small> <?php echo $lang->bug->create;?></strong>
<div id="mainContent" class="main-content">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->bug->create;?></h2>
<div class="pull-right btn-toolbar">
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=bug&section=custom&key=createFields')?>
<?php include '../../common/view/customfield.html.php';?>
</div>
</div>
<div class='actions'>
<button type='button' class='btn btn-default' data-toggle='customModal'><i class='icon icon-cog'></i></button>
</div>
</div>
<form class='form-condensed' method='post' enctype='multipart/form-data' id='dataform' data-type='ajax'>
<table class='table table-form'>
<tr>
<th class='w-110px'><?php echo $lang->bug->product;?></th>
<td class='w-p45-f'>
<div class='input-group'>
<?php echo html::select('product', $products, $productID, "onchange='loadAll(this.value);' class='form-control chosen' autocomplete='off'");?>
<?php if($this->session->currentProductType != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch()' class='form-control' style='width:120px'");?>
</div>
</td>
<td>
<div class='input-group' id='moduleIdBox'>
<span class="input-group-addon w-90px"><?php echo $lang->bug->module?></span>
<?php
echo html::select('module', $moduleOptionMenu, $moduleID, "onchange='loadModuleRelated()' class='form-control chosen'");
if(count($moduleOptionMenu) == 1)
{
echo "<span class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=bug&currentModuleID=0&branch=$branch"), $lang->tree->manage, '_blank');
echo '&nbsp; ';
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
echo '</span>';
}
?>
</div>
</td>
<td></td>
</tr>
<?php $showProject = (strpos(",$showFields,", ',project,') !== false && $this->config->global->flow != 'onlyTest');?>
<tr>
<th><?php echo ($showProject) ? $lang->bug->project : $lang->bug->type;?></th>
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform' data-type='ajax'>
<table class="table table-form">
<tbody>
<tr>
<th class='w-110px'><?php echo $lang->bug->product;?></th>
<td class='w-p45-f'>
<div class='input-group'>
<?php echo html::select('product', $products, $productID, "onchange='loadAll(this.value);' class='form-control chosen control-product' autocomplete='off'");?>
<?php if($this->session->currentProductType != 'normal'):?>
<span class='input-group-addon fix-border fix-padding'></span>
<?php echo html::select('branch', $branches, $branch, "onchange='loadBranch()' class='form-control chosen control-branch' style='width:120px'");?>
<?php endif;?>
</div>
</td>
<td>
<div class='input-group' id='moduleIdBox'>
<span class="input-group-addon w-90px"><?php echo $lang->bug->module?></span>
<?php
echo html::select('module', $moduleOptionMenu, $moduleID, "onchange='loadModuleRelated()' class='form-control chosen'");
if(count($moduleOptionMenu) == 1)
{
echo "<span class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=bug&currentModuleID=0&branch=$branch"), $lang->tree->manage, '_blank');
echo '&nbsp; ';
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
echo '</span>';
}
?>
</div>
</td>
</tr>
<?php $showProject = (strpos(",$showFields,", ',project,') !== false && $this->config->global->flow != 'onlyTest');?>
<tr>
<th><?php echo ($showProject) ? $lang->bug->project : $lang->bug->type;?></th>
<?php if(!$showProject):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
<td>
<div class='input-group' id='bugTypeInputGroup'>
<?php
/* Remove the unused types. */
unset($lang->bug->typeList['designchange']);
unset($lang->bug->typeList['newfeature']);
unset($lang->bug->typeList['trackthings']);
echo html::select('type', $lang->bug->typeList, $type, "class='form-control chosen'");
?>
<?php if($showOS):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->os?></span>
<?php echo html::select('os', $lang->bug->osList, $os, "class='form-control chosen'");?>
<?php if(!$showProject):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
<td>
<div class='input-group' id='bugTypeInputGroup'>
<?php
/* Remove the unused types. */
unset($lang->bug->typeList['designchange']);
unset($lang->bug->typeList['newfeature']);
unset($lang->bug->typeList['trackthings']);
echo html::select('type', $lang->bug->typeList, $type, "class='form-control chosen'");
?>
<?php if($showOS):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->os?></span>
<?php echo html::select('os', $lang->bug->osList, $os, "class='form-control chosen'");?>
<?php endif;?>
<?php if($showBrowser):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->browser?></span>
<?php echo html::select('browser', $lang->bug->browserList, $browser, "class='form-control chosen'");?>
<?php endif;?>
</div>
</td>
<?php endif;?>
<?php if($showBrowser):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->browser?></span>
<?php echo html::select('browser', $lang->bug->browserList, $browser, "class='form-control chosen'");?>
<?php if($showProject):?>
<td><span id='projectIdBox'><?php echo html::select('project', $projects, $projectID, "class='form-control chosen' onchange='loadProjectRelated(this.value)' autocomplete='off'");?></span></td>
<?php endif;?>
</div>
</td>
<?php endif;?>
<?php if($showProject):?>
<td><span id='projectIdBox'><?php echo html::select('project', $projects, $projectID, "class='form-control chosen' onchange='loadProjectRelated(this.value)' autocomplete='off'");?></span></td>
<?php endif;?>
<td>
<div class='input-group'>
<span class='input-group-addon w-90px'><?php echo $lang->bug->openedBuild?></span>
<span id='buildBox'><?php echo html::select('openedBuild[]', $builds, $buildID, "size=4 multiple=multiple class='chosen form-control'");?></span>
<span class='input-group-addon fix-border' id='buildBoxActions'></span>
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allBuilds, "class='btn btn-default' data-toggle='tooltip' onclick='loadAllBuilds()'")?></span>
</div>
</td>
</tr>
<tr>
<th><nobr><?php echo $lang->bug->lblAssignedTo;?></nobr></th>
<td>
<div class='input-group'>
<span id='assignedToBox'><?php echo html::select('assignedTo', $projectMembers, $assignedTo, "class='form-control chosen'");?></span>
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
</div>
</td>
<?php $showDeadline = strpos(",$showFields,", ',deadline,') !== false;?>
<?php if($showDeadline):?>
<td>
<div class='input-group'>
<span class='input-group-addon w-90px'><?php echo $lang->bug->deadline?></span>
<span><?php echo html::input('deadline', $deadline, "class='form-control form-date'");?></span>
</div>
</td>
<?php endif;?>
</tr>
<?php if($this->config->global->flow != 'onlyTest' && $showProject):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
<tr>
<th><?php echo $lang->bug->type;?></th>
<td>
<div class='input-group' id='bugTypeInputGroup'>
<?php
/* Remove the unused types. */
unset($lang->bug->typeList['designchange']);
unset($lang->bug->typeList['newfeature']);
unset($lang->bug->typeList['trackthings']);
echo html::select('type', $lang->bug->typeList, $type, "class='form-control chosen'");
?>
<?php if($showOS):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->os?></span>
<?php echo html::select('os', $lang->bug->osList, $os, "class='form-control chosen'");?>
<td>
<div class='input-group'>
<span class='input-group-addon w-90px'><?php echo $lang->bug->openedBuild?></span>
<span id='buildBox'><?php echo html::select('openedBuild[]', $builds, $buildID, "size=4 multiple=multiple class='chosen form-control'");?></span>
<span class='input-group-addon fix-border' id='buildBoxActions'></span>
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allBuilds, "class='btn btn-default' data-toggle='tooltip' onclick='loadAllBuilds()'")?></span>
</div>
</td>
</tr>
<tr>
<th><nobr><?php echo $lang->bug->lblAssignedTo;?></nobr></th>
<td>
<div class='input-group'>
<span id='assignedToBox'><?php echo html::select('assignedTo', $projectMembers, $assignedTo, "class='form-control chosen'");?></span>
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
</div>
</td>
<?php $showDeadline = strpos(",$showFields,", ',deadline,') !== false;?>
<?php if($showDeadline):?>
<td>
<div class='input-group'>
<span class='input-group-addon w-90px'><?php echo $lang->bug->deadline?></span>
<span><?php echo html::input('deadline', $deadline, "class='form-control form-date'");?></span>
</div>
</td>
<?php endif;?>
<?php if($showBrowser):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->browser?></span>
<?php echo html::select('browser', $lang->bug->browserList, $browser, "class='form-control chosen'");?>
<?php endif;?>
</div>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->bug->title;?></th>
<td colspan='2'>
<div class='row-table'>
<div class='col-table w-p100'>
<div class='input-group w-p100'>
</tr>
<?php if($this->config->global->flow != 'onlyTest' && $showProject):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
<tr>
<th><?php echo $lang->bug->type;?></th>
<td colspan='2'>
<div class='input-group' id='bugTypeInputGroup'>
<?php
/* Remove the unused types. */
unset($lang->bug->typeList['designchange']);
unset($lang->bug->typeList['newfeature']);
unset($lang->bug->typeList['trackthings']);
echo html::select('type', $lang->bug->typeList, $type, "class='form-control chosen'");
?>
<?php if($showOS):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->os?></span>
<?php echo html::select('os', $lang->bug->osList, $os, "class='form-control chosen'");?>
<?php endif;?>
<?php if($showBrowser):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->browser?></span>
<?php echo html::select('browser', $lang->bug->browserList, $browser, "class='form-control chosen'");?>
<?php endif;?>
</div>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->bug->title;?></th>
<td colspan='2'>
<div class='input-group'>
<input type='hidden' id='color' name='color' data-provide='colorpicker' data-wrapper='input-group-btn' data-pull-menu-right='false' data-btn-tip='<?php echo $lang->bug->colorTag ?>' data-update-text='#title' value='<?php echo $color;?>'>
<?php echo html::input('title', $bugTitle, "class='form-control'");?>
</div>
</div>
<?php $showSeverity = strpos(",$showFields,", ',severity,') !== false;?>
<?php $showPri = strpos(",$showFields,", ',pri,') !== false;?>
<?php if($showSeverity or $showPri):?>
<?php $widthClass = (!$showSeverity or !$showPri) ? 'w-100px' : 'w-230px';?>
<div class='col-table <?php echo $widthClass?>'>
<div class='input-group'>
<?php if($showSeverity):?>
<span class='input-group-addon fix-border br-0'><?php echo $lang->bug->severity;?></span>
<?php
$hasCustomSeverity = false;
foreach($lang->bug->severityList as $severityKey => $severityValue)
{
if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
<?php $showSeverity = strpos(",$showFields,", ',severity,') !== false;?>
<?php $showPri = strpos(",$showFields,", ',pri,') !== false;?>
<?php if($showSeverity or $showPri):?>
<?php $widthClass = (!$showSeverity or !$showPri) ? 'w-100px' : 'w-230px';?>
<?php if($showSeverity):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->severity;?></span>
<?php
$hasCustomSeverity = false;
foreach($lang->bug->severityList as $severityKey => $severityValue)
{
$hasCustomSeverity = true;
break;
if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
{
$hasCustomSeverity = true;
break;
}
}
}
?>
<?php if($hasCustomSeverity):?>
<?php echo html::select('severity', (array)$lang->bug->severityList, $severity, "class='form-control minw-80px chosen'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris' data-prefix='severity'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
</button>
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('severity', (array)$lang->bug->severityList, $severity, "class='hide'");?>
</div>
<?php endif; ?>
<?php endif;?>
<?php if($showPri):?>
<span class='input-group-addon fix-border br-0'><?php echo $lang->bug->pri;?></span>
<?php
$hasCustomPri = false;
foreach($lang->bug->priList as $priKey => $priValue)
{
if(!empty($priKey) and (string)$priKey != (string)$priValue)
?>
<?php if($hasCustomSeverity):?>
<?php echo html::select('severity', (array)$lang->bug->severityList, $severity, "class='form-control minw-80px chosen'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris' data-prefix='severity'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
</button>
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('severity', (array)$lang->bug->severityList, $severity, "class='hide'");?>
</div>
<?php endif; ?>
<?php endif;?>
<?php if($showPri):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->pri;?></span>
<?php
$hasCustomPri = false;
foreach($lang->bug->priList as $priKey => $priValue)
{
$hasCustomPri = true;
break;
if(!empty($priKey) and (string)$priKey != (string)$priValue)
{
$hasCustomPri = true;
break;
}
}
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$lang->bug->priList, $pri, "class='form-control minw-80px chosen'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
</button>
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('pri', $lang->bug->priList, $pri, "class='hide'");?>
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$lang->bug->priList, $pri, "class='form-control minw-80px chosen'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
</button>
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('pri', $lang->bug->priList, $pri, "class='hide'");?>
</div>
<?php endif;?>
<?php endif;?>
<?php endif;?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->bug->steps;?></th>
<td colspan='2'>
<div id='tplBoxWrapper'>
<div class='btn-toolbar'>
<div class='btn-group'>
<button id='saveTplBtn' type='button' class='btn btn-mini' data-toggle='saveTplModal'><?php echo $lang->bug->saveTemplate?></button>
<button type='button' class='btn btn-mini dropdown-toggle' data-toggle='dropdown'><?php echo $lang->bug->applyTemplate?> <span class='caret'></span></button>
<ul id='tplBox' class='dropdown-menu pull-right'>
<?php echo $this->fetch('bug', 'buildTemplates');?>
</ul>
</div>
</div>
<?php endif;?>
<?php endif;?>
</div>
</div>
<?php endif;?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->bug->steps;?></th>
<td colspan='2'>
<div id='tplBoxWrapper'>
<div class='btn-toolbar'>
<div class='btn-group'>
<button id='saveTplBtn' type='button' class='btn btn-mini' data-toggle='saveTplModal'><?php echo $lang->bug->saveTemplate?></button>
<button type='button' class='btn btn-mini dropdown-toggle' data-toggle='dropdown'><?php echo $lang->bug->applyTemplate?> <span class='caret'></span></button>
<ul id='tplBox' class='dropdown-menu pull-right'>
<?php echo $this->fetch('bug', 'buildTemplates');?>
</ul>
</div>
</div>
</div>
<?php echo html::textarea('steps', $steps, "rows='10' class='form-control'");?>
</td>
</tr>
<?php
$showStory = strpos(",$showFields,", ',story,') !== false;
$showTask = strpos(",$showFields,", ',task,') !== false;
?>
<?php if(($showStory or $showTask) and $this->config->global->flow != 'onlyTest'):?>
<tr>
<th><?php echo ($showStory) ? $lang->bug->story : $lang->bug->task;?></th>
<?php if($showStory):?>
<td>
<span id='storyIdBox'><?php echo html::select('story', empty($stories) ? '' : $stories, $storyID, "class='form-control chosen'");?></span>
</td>
<?php endif;?>
<?php if($showTask):?>
<td>
<div class='input-group'>
<?php if($showStory):?>
<span class='input-group-addon w-90px'><?php echo $lang->bug->task?></span>
<?php endif;?>
<span id='taskIdBox'> <?php echo html::select('task', '', $taskID, "class='form-control chosen'") . html::hidden('oldTaskID', $taskID);?></span>
</div>
</td>
<?php endif;?>
</tr>
<?php endif;?>
<?php
$showMailto = strpos(",$showFields,", ',mailto,') !== false;
$showKeywords = strpos(",$showFields,", ',keywords,') !== false;
?>
<?php if($showMailto or $showKeywords):?>
<?php $colspan = ($showMailto and $showKeywords) ? '' : "colspan='2'";?>
<tr>
<th><?php echo ($showMailto) ? $lang->bug->lblMailto : $lang->bug->keywords;?></th>
<?php if($showMailto):?>
<td>
<div class='input-group' id='contactListGroup'>
<?php
echo html::select('mailto[]', $users, str_replace(' ', '', $mailto), "class='form-control chosen' multiple");
echo $this->fetch('my', 'buildContactLists');
?>
</div>
</td>
<?php endif;?>
<?php if($showKeywords):?>
<td <?php echo $colspan?>>
<div class='input-group'>
<?php if($showMailto):?>
<span class='input-group-addon w-90px' id='keywordsAddonLabel'><?php echo $lang->bug->keywords;?></span>
<?php endif;?>
<?php echo html::input('keywords', $keywords, "class='form-control'");?>
</div>
</td>
<?php endif;?>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->bug->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.85');?></td>
</tr>
<tr>
<td></td>
<td colspan='2'>
<?php echo html::textarea('steps', $steps, "rows='10' class='form-control'");?>
</td>
</tr>
<?php
echo html::submitButton() . html::backButton();
echo html::hidden('case', (int)$caseID) . html::hidden('caseVersion', (int)$version);
echo html::hidden('result', (int)$runID) . html::hidden('testtask', (int)$testtask);
$showStory = strpos(",$showFields,", ',story,') !== false;
$showTask = strpos(",$showFields,", ',task,') !== false;
?>
</td>
</tr>
</table>
</form>
<?php if(($showStory or $showTask) and $this->config->global->flow != 'onlyTest'):?>
<tr>
<th><?php echo ($showStory) ? $lang->bug->story : $lang->bug->task;?></th>
<?php if($showStory):?>
<td>
<span id='storyIdBox'><?php echo html::select('story', empty($stories) ? '' : $stories, $storyID, "class='form-control chosen'");?></span>
</td>
<?php endif;?>
<?php if($showTask):?>
<td>
<div class='input-group'>
<?php if($showStory):?>
<span class='input-group-addon w-90px'><?php echo $lang->bug->task?></span>
<?php endif;?>
<span id='taskIdBox'> <?php echo html::select('task', '', $taskID, "class='form-control chosen'") . html::hidden('oldTaskID', $taskID);?></span>
</div>
</td>
<?php endif;?>
</tr>
<?php endif;?>
<?php
$showMailto = strpos(",$showFields,", ',mailto,') !== false;
$showKeywords = strpos(",$showFields,", ',keywords,') !== false;
?>
<?php if($showMailto or $showKeywords):?>
<?php $colspan = ($showMailto and $showKeywords) ? '' : "colspan='2'";?>
<tr>
<th><?php echo ($showMailto) ? $lang->bug->lblMailto : $lang->bug->keywords;?></th>
<?php if($showMailto):?>
<td>
<div class='input-group' id='contactListGroup'>
<?php
echo html::select('mailto[]', $users, str_replace(' ', '', $mailto), "class='form-control chosen' multiple");
echo $this->fetch('my', 'buildContactLists');
?>
</div>
</td>
<?php endif;?>
<?php if($showKeywords):?>
<td <?php echo $colspan?>>
<div class='input-group'>
<?php if($showMailto):?>
<span class='input-group-addon w-90px' id='keywordsAddonLabel'><?php echo $lang->bug->keywords;?></span>
<?php endif;?>
<?php echo html::input('keywords', $keywords, "class='form-control'");?>
</div>
</td>
<?php endif;?>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->bug->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.85');?></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3" class="text-center">
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
<?php echo html::hidden('case', (int)$caseID) . html::hidden('caseVersion', (int)$version);?>
<?php echo html::hidden('result', (int)$runID) . html::hidden('testtask', (int)$testtask);?>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
</div>
<div class="modal fade" id="saveTplModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog w-600px">
@@ -323,6 +319,4 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
</div>
</div>
<?php js::set('bugModule', $lang->bug->module);?>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=bug&section=custom&key=createFields');?>
<?php include '../../common/view/customfield.html.php';?>
<?php include '../../common/view/footer.html.php';?>
+4 -5
View File
@@ -762,11 +762,10 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyTest')
/* Adjust sub menu of caselib module. */
$lang->caselib->menu = new stdclass();
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
$lang->caselib->menu->all = 'All|testsuite|library|libID=%s&browseType=all';
$lang->caselib->menu->wait = 'Wait|testsuite|library|libID=%s&browseType=wait';
$lang->caselib->menu->view = 'View|testsuite|libview|libID=%s';
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i> Create Library|testsuite|createLib", 'float' => 'right');
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
$lang->caselib->menu->all = 'All|testsuite|library|libID=%s&browseType=all';
$lang->caselib->menu->wait = 'Wait|testsuite|library|libID=%s&browseType=wait';
$lang->caselib->menu->view = 'View|testsuite|libview|libID=%s';
$lang->caselib->menuOrder[5] = 'lib';
$lang->caselib->menuOrder[10] = 'all';
+4 -5
View File
@@ -765,11 +765,10 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyTest')
/* Adjust sub menu of caselib module. */
$lang->caselib->menu = new stdclass();
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
$lang->caselib->menu->all = '所有|testsuite|library|libID=%s&browseType=all';
$lang->caselib->menu->wait = '待评审|testsuite|library|libID=%s&browseType=wait';
$lang->caselib->menu->view = '概况|testsuite|libview|libID=%s';
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i> 创建库|testsuite|createLib", 'float' => 'right');
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
$lang->caselib->menu->all = '所有|testsuite|library|libID=%s&browseType=all';
$lang->caselib->menu->wait = '待评审|testsuite|library|libID=%s&browseType=wait';
$lang->caselib->menu->view = '概况|testsuite|libview|libID=%s';
$lang->caselib->menuOrder[5] = 'lib';
$lang->caselib->menuOrder[10] = 'all';
+5 -4
View File
@@ -2,6 +2,11 @@
<script>
$(function()
{
<?php if(!empty($setShowModule)):?>
$('#sidebar .cell .text-center:last').append("<a href='javascript:;' data-toggle='showModuleModal' class='text-secondary small'><?php echo $lang->datatable->showModule?></a><hr class='space-sm' />");
$("a[data-toggle='showModuleModal']").click(function(){$('#showModuleModal').modal('show')});
<?php endif;?>
var $btnToolbar = $('#main #mainContent form.main-table .table-header .btn-toolbar:first');
if($btnToolbar.length > 0)
{
@@ -9,11 +14,7 @@ $(function()
// $btnToolbar.append("<a href=\"javascript:saveDatatableConfig('mode', 'table', true);\" class='btn btn-link <?php echo $mode == 'table' ? 'btn-active-line' : '';?>'><?php echo $lang->datatable->table?></a>");
// $btnToolbar.append("<a href=\"javascript:saveDatatableConfig('mode', 'datatable', true);\" class='btn btn-link <?php echo $mode == 'datatable' ? 'btn-active-line' : '';?>'><?php echo $lang->datatable->datatable?></a>");
$btnToolbar.append("<a id='tableCustomBtn' class='btn btn-link' href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'><i class='icon icon-cog'></i></a>");
<?php if(!empty($setShowModule)):?>
$('#sidebar .cell .text-center:last').append("<a href='javascript:;' data-toggle='showModuleModal' class='text-secondary small'><?php echo $lang->datatable->showModule?></a><hr class='space-sm' />");
<?php endif;?>
$('#tableCustomBtn').modalTrigger();
$("a[data-toggle='showModuleModal']").click(function(){$('#showModuleModal').modal('show')});
}
$('#setShowModule').click(function()
+5 -4
View File
@@ -125,13 +125,14 @@ class datatableModel extends model
$id = $col->id;
if($col->show)
{
$fixed = $col->fixed == 'no' ? 'true': 'false';
$width = is_numeric($col->width) ? "{$col->width}px" : $col->width;
$title = isset($col->name) ? "title='$col->name'" : '';
$fixed = $col->fixed == 'no' ? 'true': 'false';
$width = is_numeric($col->width) ? "{$col->width}px" : $col->width;
$title = isset($col->name) ? "title='$col->name'" : '';
if($id == 'id' and (int)$width < 90) $width = '90px';
$width = "data-width='$width' style='width:$width'";
$align = $id == 'actions' ? 'text-center' : '';
echo "<th data-flex='$fixed' $width class='c-$id' $title>";
echo "<th data-flex='$fixed' $width class='c-$id $align' $title>";
if($id == 'actions')
{
echo $this->lang->actions;
+2
View File
@@ -95,6 +95,8 @@ $lang->dev->tableList['entry'] = 'Entry';
$lang->dev->tableList['webhook'] = 'WebHook';
$lang->dev->tableList['webhookdatas'] = 'WebHookDatas';
$lang->dev->tableList['log'] = 'Log';
$lang->dev->tableList['message'] = 'Message';
$lang->dev->tableList['notify'] = 'Notify';
$lang->dev->groupList['my'] = 'Dashboard';
$lang->dev->groupList['product'] = $lang->productCommon;
+2
View File
@@ -95,6 +95,8 @@ $lang->dev->tableList['entry'] = '应用';
$lang->dev->tableList['webhook'] = 'WebHook';
$lang->dev->tableList['webhookdatas'] = 'WebHook数据';
$lang->dev->tableList['log'] = '接口日志';
$lang->dev->tableList['message'] = '消息';
$lang->dev->tableList['notify'] = '通知';
$lang->dev->groupList['my'] = '我的地盘';
$lang->dev->groupList['product'] = $lang->productCommon;
+2
View File
@@ -95,6 +95,8 @@ $lang->dev->tableList['entry'] = '應用';
$lang->dev->tableList['webhook'] = 'WebHook';
$lang->dev->tableList['webhookdatas'] = 'WebHook數據';
$lang->dev->tableList['log'] = '介面日誌';
$lang->dev->tableList['message'] = '消息';
$lang->dev->tableList['notify'] = '通知';
$lang->dev->groupList['my'] = '我的地盤';
$lang->dev->groupList['product'] = $lang->productCommon;
+2 -2
View File
@@ -25,7 +25,7 @@
$params = array();
if(isset($api['param']))
{
foreach($api['param'] as $param) $params[] = "{$param['var']}=[{$param['var']}]";
foreach($api['param'] as $param) $params[] = "{$param['var']}=[{$param['var']}]";
}
$params = implode('&', $params);
?>
@@ -37,7 +37,7 @@
</div>
<div class='detail-content'>
<?php echo $api['desc'];?>
<table class='table table-fixed table-bordered params'>
<table class='table table-bordered'>
<tr>
<td><?php echo $lang->dev->params?></td>
<td><?php echo $lang->dev->type?></td>
+1 -1
View File
@@ -22,7 +22,7 @@
<div class='detail'>
<div class='detail-title'><?php echo $selectedTable?></div>
<div class='detail-content'>
<table class="table table-condensed table-bordered table-fixed">
<table class="table table-bordered">
<thead>
<tr>
<th class='w-id'><?php echo $lang->dev->fields['id']?></th>
+5 -5
View File
@@ -13,11 +13,11 @@
<?php include '../../common/view/header.lite.html.php';?>
<div class='main-header'>
<div class='heading'>
<i class='icon-edit'></i>
<?php if($filePath):?>
<strong><?php echo $lang->editor->filePath;?></strong>
<i class='icon-edit'></i>
<?php if($filePath):?>
<strong><?php echo $lang->editor->filePath;?></strong>
<code><?php echo $filePath?></code>
<?php endif?>
<?php endif?>
</div>
</div>
<form method='post' target='hiddenwin' action='<?php echo inlink('save', "filePath=$safeFilePath&action=$action")?>'>
@@ -72,7 +72,7 @@
<?php endif;?>
</td>
</tr>
<tr><td align='center'><?php echo html::submitButton()?></td></tr>
<tr><td align='center'><?php echo html::submitButton('', '', 'btn btn-primary btn-wide')?></td></tr>
</table>
</div>
</form>
+1 -1
View File
@@ -30,7 +30,7 @@
?>
</td>
</tr>
<tr><td colspan='2' align='center'><?php echo html::submitButton()?></td></tr>
<tr><td colspan='2' align='center'><?php echo html::submitButton('', '', 'btn btn-primary btn-wide')?></td></tr>
</table>
</div>
</form>
+11 -12
View File
@@ -13,7 +13,7 @@
<?php include $this->app->getModuleRoot() . 'message/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block mw-800px'>
<?php if($step == 'license'):?>
<?php if($step == 'license'):?>
<div class='main-header'>
<h2><?php echo $lang->mail->license;?></h2>
</div>
@@ -24,7 +24,7 @@
<?php echo html::a(inlink('index'), $lang->mail->disagree, '', "class='btn'");?>
</p>
</div>
<?php else:?>
<?php else:?>
<div class='main-header'>
<h2>
<?php echo $lang->mail->common;?>
@@ -34,7 +34,7 @@
<form method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='rowhead w-120px'><?php echo $lang->mail->turnon; ?></th>
<th class='w-80px'><?php echo $lang->mail->turnon; ?></th>
<td class='w-250px'><?php echo html::radio('turnon', $lang->mail->turnonList, isset($mailConfig->turnon) ? $mailConfig->turnon : 1);?></td>
</tr>
<?php if(!empty($config->global->cron)):?>
@@ -50,29 +50,28 @@
<tr>
<th><?php echo $lang->mail->fromAddress; ?></th>
<td><?php echo html::input('fromAddress', $mailConfig->fromAddress, "class='form-control' autocomplete='off'");?></td>
<td colspan='2'><?php echo $lang->mail->addressWhiteList?></td>
<td><?php echo $lang->mail->addressWhiteList?></td>
</tr>
<tr>
<th><?php echo $lang->mail->fromName; ?></th>
<td colspan='3'>
<div class='required required-wrapper'></div>
<td>
<div class='required'></div>
<?php echo html::input('fromName', $mailConfig->fromName, "class='form-control' autocomplete='off'");?>
</td>
</tr>
<tr>
<td></td>
<td colspan='4' class='text-left'>
<td colspan='3' class='text-center'>
<?php
echo html::submitButton('', '', 'btn btn-primary btn-wide');
if($this->config->mail->turnon and $mailExist) echo html::linkButton($lang->mail->test, inlink('test'), '', '', 'btn btn-wide');
echo html::linkButton($lang->mail->reset, inlink('reset'), '', '', 'btn btn-wide');
if(common::hasPriv('mail', 'browse') and !empty($config->mail->async) and !empty($config->global->cron)) echo html::linkButton($lang->mail->browse, inlink('browse'), '', '', 'btn btn-wide');
if($this->config->mail->turnon and $mailExist) echo html::a(inlink('test'), $lang->mail->test, '', "class='btn btn-wide'");
echo html::a(inlink('reset'), $lang->mail->reset, '', "class='btn btn-wide'");
if(common::hasPriv('mail', 'browse') and !empty($config->mail->async) and !empty($config->global->cron)) echo html::a(inlink('browse'), $lang->mail->browse, '', "class='btn btn-wide'");
?>
</td>
</tr>
</table>
</form>
<?php endif;?>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -34,7 +34,7 @@ $lang->product->otherInfo = '其他信息';
$lang->product->plans = '計劃數';
$lang->product->releases = '發佈數';
$lang->product->docs = '文檔數';
$lang->product->bugs = '相關BUG';
$lang->product->bugs = '相關Bug';
$lang->product->projects = "關聯{$lang->projectCommon}數";
$lang->product->cases = '用例數';
$lang->product->builds = 'BUILD數';
-2
View File
@@ -90,13 +90,11 @@
</div>
<hr class="space">
<?php endif;?>
<?php echo $moduleTree;?>
<div class="text-center">
<?php common::printLink('tree', 'browse', "rootID=$productID&view=story", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
<hr class="space-sm" />
</div>
</div>
</div>
+1 -1
View File
@@ -27,7 +27,7 @@
<tbody>
<tr>
<th class='w-120px'><?php echo $lang->product->name;?></th>
<td class='w-p25-f'><?php echo html::input('name', $product->name, "class='form-control' autocomplete='off' required");?></td><td></td>
<td class='w-p40-f'><?php echo html::input('name', $product->name, "class='form-control' autocomplete='off' required");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->code;?></th>
+3 -6
View File
@@ -17,7 +17,7 @@
<div class="col-sm-6">
<div class="panel block-release">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->product->iteration;?> <span class="label label-badge label-light"><?php echo sprintf($lang->product->iterationInfo, count($releases));?></span></div>
<div class="panel-title"><?php echo $lang->product->iteration;?> <span class="label label-badge label-light"><?php printf($lang->product->iterationInfo, count($releases));?></span></div>
</div>
<div class="panel-body">
<div class="release-path">
@@ -216,17 +216,14 @@
echo "<div class='divider'></div>";
if($product->status != 'closed')
{
common::printIcon('product', 'close', "productID=$product->id", $product, 'button', '', '', 'iframe', true);
common::printIcon('product', 'close', $params, $product, 'button', '', '', 'iframe', true);
echo "<div class='divider'></div>";
}
common::printIcon('product', 'edit', $params, $product);
common::printIcon('product', 'delete', $params, $product, 'button', '', 'hiddenwin');
}
else
{
common::printBack($browseLink);
}
?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-1
View File
@@ -67,6 +67,5 @@
$(function()
{
ajaxGetSearchForm('#bugs .linkBox #queryBox');
setModal();
})
</script>
@@ -75,6 +75,5 @@
$(function()
{
ajaxGetSearchForm('#stories .linkBox #queryBox');
setModal();
})
</script>
+4 -7
View File
@@ -820,13 +820,10 @@ class project extends control
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$tasks = $this->testtask->getProjectTasks($projectID, $orderBy, $pager);
foreach($tasks as $key => $task)
{
$tasks[$task->product][] = $task;
$productTasks = array();
unset($tasks[$key]);
}
$tasks = $this->testtask->getProjectTasks($projectID, $orderBy, $pager);
foreach($tasks as $key => $task) $productTasks[$task->product][] = $task;
$this->view->title = $this->projects[$projectID] . $this->lang->colon . $this->lang->testtask->common;
$this->view->position[] = html::a($this->createLink('project', 'testtask', "projectID=$projectID"), $this->projects[$projectID]);
@@ -835,7 +832,7 @@ class project extends control
$this->view->projectName = $this->projects[$projectID];
$this->view->pager = $pager;
$this->view->orderBy = $orderBy;
$this->view->tasks = $tasks;
$this->view->tasks = $productTasks;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->products = $this->loadModel('product')->getPairs();
+2 -2
View File
@@ -58,7 +58,7 @@
<?php
$taskCols = array('wait', 'doing', 'pause', 'done');
if($allCols) $taskCols = array('wait', 'doing', 'pause', 'done', 'cancel', 'closed');
$account = $this->app->user->account
$account = $this->app->user->account;
?>
<div id="kanban" class="main-table" data-ride="table" data-checkable="false" data-group="true">
<table class="table table-grouped text-center">
@@ -139,7 +139,7 @@ $account = $this->app->user->account
<?php endif?>
<?php if(!empty($group->bugs[$col])):?>
<?php foreach($group->bugs[$col] as $bug):?>
<div class='board-item' data-id='<?php echo $bug->id?>' id='bug-<?php echo $task->id?>' data-type='bug'>
<div class='board-item' data-id='<?php echo $bug->id?>' id='bug-<?php echo $bug->id?>' data-type='bug'>
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), "<i class='icon-bug'></i> #{$bug->id}{$bug->title}", '', 'class="title kanbaniframe" title="' . $bug->title . '"');?>
<div class='info'>
<?php
+3 -1
View File
@@ -15,8 +15,10 @@
<div class="title" title='<?php echo $project->name?>'><?php echo $project->name;?></div>
</div>
<div class="btn-toolbar pull-left">
<?php $total = 0;?>
<?php foreach($stories as $colStories) $total += count($colStories);?>
<?php if(common::hasPriv('project', 'story')) echo html::a($this->createLink('project', 'story', "projectID=$project->id"), "<span class='text'>{$lang->story->allStories}</span>", '', "class='btn btn-link'");?>
<?php if(common::hasPriv('project', 'storykanban')) echo html::a($this->createLink('project', 'storykanban', "projectID=$project->id"), "<span class='text'>{$lang->project->kanban}</span>", '', "class='btn btn-link btn-active-text'");?>
<?php if(common::hasPriv('project', 'storykanban')) echo html::a($this->createLink('project', 'storykanban', "projectID=$project->id"), "<span class='text'>{$lang->project->kanban}</span><span class='label label-light label-badge'>{$total}</span>", '', "class='btn btn-link btn-active-text'");?>
</div>
<div class="btn-toolbar pull-right">
<div class='btn-group'>
+2 -6
View File
@@ -16,6 +16,8 @@
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php $browseLink = $this->session->releaseList ? $this->session->releaseList : inlink('browse', "productID=$release->product");?>
<?php common::printBack($browseLink, 'btn btn-link');?>
<div class='divider'></div>
<div class='page-title'>
<span class='label label-id'><?php echo $release->id;?></span>
<?php echo $release->name;?>
@@ -38,12 +40,6 @@
common::printIcon('release', 'edit', "releaseID=$release->id", $release);
common::printIcon('release', 'delete', "releaseID=$release->id", $release, 'button', '', 'hiddenwin');
common::printBack($browseLink, 'btn btn-link');
}
else
{
common::printBack($browseLink, 'btn btn-link');
}
?>
</div>
+165 -164
View File
@@ -25,174 +25,175 @@
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform' data-type='ajax'>
<table class="table table-form">
<tbody>
<tr>
<th><?php echo $lang->story->product;?></th>
<td colspan="2">
<?php if($product->type != 'normal'):?>
<div class='input-group'>
<?php endif;?>
<?php echo html::select('product', $products, $productID, "onchange='loadProduct(this.value);' class='form-control chosen control-product'");?>
<?php if($product->type != 'normal'):?>
<span class='input-group-addon fix-border fix-padding'></span>
<?php echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control chosen control-branch'");?>
</div>
<?php endif;?>
</td>
<td colspan="2">
<div class='input-group' id='moduleIdBox'>
<div class="input-group-addon"><?php echo $lang->story->module;?></div>
<?php
echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen' required");
if(count($moduleOptionMenu) == 1)
{
echo "<div class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story&currentModuleID=0&branch=$branch"), $lang->tree->manage, '_blank');
echo '&nbsp; ';
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
echo '</div>';
}
?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->story->plan;?></th>
<td colspan="2">
<div class='input-group' id='planIdBox'>
<?php
echo html::select('plan', $plans, $planID, "class='form-control chosen'");
if(count($plans) != 1)
{
echo "<div class='input-group-btn'>";
echo html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch"), "<i class='icon icon-plus'></i>", '_blank', "class='btn' data-toggle='tooltip' title='{$lang->productplan->create}'");
echo '&nbsp; ';
echo html::a("javascript:loadProductPlans($productID)", "<i class='icon icon-refresh'></i>", '', "class='btn' data-toggle='tooltip' title='{$lang->refresh}'");
echo '</div>';
}
?>
</div>
</td>
<?php if(strpos(",$showFields,", ',source,') !== false):?>
<td colspan="2">
<div class="input-group">
<div class="input-group">
<div class="input-group-addon"><?php echo $lang->story->source;?></div>
<?php echo html::select('source', $lang->story->sourceList, $source, "class='form-control chosen'");?>
<span class='input-group-addon'><?php echo $lang->story->sourceNote;?></span>
<?php echo html::input('sourceNote', $sourceNote, "class='form-control' autocomplete='off' style='width:140px;'");?>
<tr>
<th><?php echo $lang->story->product;?></th>
<td colspan="2">
<?php if($product->type != 'normal'):?>
<div class='input-group'>
<?php endif;?>
<?php echo html::select('product', $products, $productID, "onchange='loadProduct(this.value);' class='form-control chosen control-product'");?>
<?php if($product->type != 'normal'):?>
<span class='input-group-addon fix-border fix-padding'></span>
<?php echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control chosen control-branch'");?>
</div>
</div>
</td>
<?php endif;?>
</tr>
<tr>
<th><?php echo $lang->story->title;?></th>
<td colspan="4">
<div class="input-control has-icon-right">
<?php echo html::input('title', $storyTitle, "class='form-control input-story-title' autocomplete='off' required");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix">
<li class="heading"><?php echo $lang->story->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<input type="hidden" class="colorpicker" id="color" name="color" value="" data-icon="color" data-wrapper="input-control-icon-right" data-update-color="#title" data-provide="colorpicker">
</div>
</div>
</td>
</tr>
<?php if(strpos(",$showFields,", ',pri,') !== false):?>
<tr>
<th><?php echo $lang->story->pri;?></th>
<td colspan="4">
<?php
$hasCustomPri = false;
foreach($lang->story->priList as $priKey => $priValue)
{
if(!empty($priKey) and (string)$priKey != (string)$priValue)
<?php endif;?>
</td>
<td colspan="2">
<div class='input-group' id='moduleIdBox'>
<div class="input-group-addon"><?php echo $lang->story->module;?></div>
<?php
echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen' required");
if(count($moduleOptionMenu) == 1)
{
$hasCustomPri = true;
break;
echo "<div class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story&currentModuleID=0&branch=$branch"), $lang->tree->manage, '_blank');
echo '&nbsp; ';
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
echo '</div>';
}
}
$priList = $lang->story->priList;
if(end($priList))
{
unset($priList[0]);
$priList[0] = '';
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control chosen'");?>
<?php else: ?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control' data-provide='labelSelector'");?>
<?php endif; ?>
</td>
</tr>
<?php endif;?>
<?php if(strpos(",$showFields,", ',estimate,') !== false):?>
<tr>
<th><?php echo $lang->story->estimateAB;?></th>
<td><input type="number" min="0" step="0.5" name="estimate" id="estimate" value="<?php echo $estimate;?>" class="form-control" autocomplete="off"></td>
<td class="muted"><?php echo $lang->story->hour;?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->story->reviewedBy;?></th>
<td><?php echo html::select('assignedTo', $users, empty($needReview) ? $product->PO : '', "class='form-control chosen'");?></td>
<?php if(!$this->story->checkForceReview()):?>
<td>
<div class='checkbox-primary'>
<input id='needNotReview' name='needNotReview' value='1' type='checkbox' class='no-margin' <?php echo $needReview;?>/>
<label for='needNotReview'><?php echo $lang->story->needNotReview;?></label>
</div>
</td>
?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->story->plan;?></th>
<td colspan="2">
<div class='input-group' id='planIdBox'>
<?php
echo html::select('plan', $plans, $planID, "class='form-control chosen'");
if(count($plans) != 1)
{
echo "<div class='input-group-btn'>";
echo html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch"), "<i class='icon icon-plus'></i>", '_blank', "class='btn' data-toggle='tooltip' title='{$lang->productplan->create}'");
echo '&nbsp; ';
echo html::a("javascript:loadProductPlans($productID)", "<i class='icon icon-refresh'></i>", '', "class='btn' data-toggle='tooltip' title='{$lang->refresh}'");
echo '</div>';
}
?>
</div>
</td>
<?php if(strpos(",$showFields,", ',source,') !== false):?>
<td colspan="2">
<div class="input-group">
<div class="input-group">
<div class="input-group-addon"><?php echo $lang->story->source;?></div>
<?php echo html::select('source', $lang->story->sourceList, $source, "class='form-control chosen'");?>
<span class='input-group-addon'><?php echo $lang->story->sourceNote;?></span>
<?php echo html::input('sourceNote', $sourceNote, "class='form-control' autocomplete='off' style='width:140px;'");?>
</div>
</div>
</td>
<?php endif;?>
</tr>
<tr>
<th><?php echo $lang->story->title;?></th>
<td colspan="4">
<div class="input-control has-icon-right">
<?php echo html::input('title', $storyTitle, "class='form-control input-story-title' autocomplete='off' required");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix">
<li class="heading"><?php echo $lang->story->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<input type="hidden" class="colorpicker" id="color" name="color" value="" data-icon="color" data-wrapper="input-control-icon-right" data-update-color="#title" data-provide="colorpicker">
</div>
</div>
</td>
</tr>
<?php if(strpos(",$showFields,", ',pri,') !== false):?>
<tr>
<th><?php echo $lang->story->pri;?></th>
<td colspan="4">
<?php
$hasCustomPri = false;
foreach($lang->story->priList as $priKey => $priValue)
{
if(!empty($priKey) and (string)$priKey != (string)$priValue)
{
$hasCustomPri = true;
break;
}
}
$priList = $lang->story->priList;
if(end($priList))
{
unset($priList[0]);
$priList[0] = '';
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control chosen'");?>
<?php else: ?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control' data-provide='labelSelector'");?>
<?php endif; ?>
</td>
</tr>
<?php endif;?>
<?php if(strpos(",$showFields,", ',estimate,') !== false):?>
<tr>
<th><?php echo $lang->story->estimateAB;?></th>
<td><input type="number" min="0" step="0.5" name="estimate" id="estimate" value="<?php echo $estimate;?>" class="form-control" autocomplete="off"></td>
<td class="muted"><?php echo $lang->story->hour;?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->story->reviewedBy;?></th>
<td><?php echo html::select('assignedTo', $users, empty($needReview) ? $product->PO : '', "class='form-control chosen'");?></td>
<?php if(!$this->story->checkForceReview()):?>
<td>
<div class='checkbox-primary'>
<input id='needNotReview' name='needNotReview' value='1' type='checkbox' class='no-margin' <?php echo $needReview;?>/>
<label for='needNotReview'><?php echo $lang->story->needNotReview;?></label>
</div>
</td>
<?php endif;?>
</tr>
<tr>
<th><?php echo $lang->story->spec;?></th>
<td colspan="4"><?php echo html::textarea('spec', $spec, "rows='9' class='form-control kindeditor disabled-ie-placeholder' hidefocus='true' placeholder='" . htmlspecialchars($lang->story->specTemplate) . "'");?></td>
</tr>
<?php if(strpos(",$showFields,", ',verify,') !== false):?>
<tr>
<th><?php echo $lang->story->verify;?></th>
<td colspan="4"><?php echo html::textarea('verify', $verify, "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<?php endif;?>
</tr>
<tr>
<th><?php echo $lang->story->spec;?></th>
<td colspan="4"><?php echo html::textarea('spec', $spec, "rows='9' class='form-control kindeditor disabled-ie-placeholder' hidefocus='true' placeholder='" . htmlspecialchars($lang->story->specTemplate) . "'");?></td>
</tr>
<?php if(strpos(",$showFields,", ',verify,') !== false):?>
<tr>
<th><?php echo $lang->story->verify;?></th>
<td colspan="4"><?php echo html::textarea('verify', $verify, "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->story->legendAttatch;?></th>
<td colspan='4'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<?php if(strpos(",$showFields,", ',mailto,') !== false):?>
<tr>
<th><?php echo $lang->story->mailto;?></th>
<td colspan="4">
<div class="input-group">
<?php echo html::select('mailto[]', $users, str_replace(' ' , '', $mailto), "class='form-control chosen' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</div>
</td>
</tr>
<?php endif;?>
<?php if(strpos(",$showFields,", ',keywords,') !== false):?>
<tr>
<th><?php echo $lang->story->keywords;?></th>
<td colspan="4">
<?php echo html::input('keywords', $keywords, 'class="form-control" autocomplete="off"');?>
</td>
</tr>
<?php endif;?>
</tbody>
<tfoot>
<tr>
<td colspan="5" class="text-center">
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide btn-gray');?>
</td>
</tr>
</tfoot>
</table>
<span id='responser'></span>
</form>
<tr>
<th><?php echo $lang->story->legendAttatch;?></th>
<td colspan='4'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<?php if(strpos(",$showFields,", ',mailto,') !== false):?>
<tr>
<th><?php echo $lang->story->mailto;?></th>
<td colspan="4">
<div class="input-group">
<?php echo html::select('mailto[]', $users, str_replace(' ' , '', $mailto), "class='form-control chosen' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</div>
</td>
</tr>
<?php endif;?>
<?php if(strpos(",$showFields,", ',keywords,') !== false):?>
<tr>
<th><?php echo $lang->story->keywords;?></th>
<td colspan="4">
<?php echo html::input('keywords', $keywords, 'class="form-control" autocomplete="off"');?>
</td>
</tr>
<?php endif;?>
</tbody>
<tfoot>
<tr>
<td colspan="5" class="text-center">
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide btn-gray');?>
</td>
</tr>
</tfoot>
</table>
<span id='responser'></span>
</form>
</div>
</div>
<?php js::set('storyModule', $lang->story->module);?>
<?php include '../../common/view/footer.html.php';?>
+4 -6
View File
@@ -26,6 +26,7 @@
<?php endif;?>
</h2>
<div class="pull-right btn-toolbar">
<button type='button' data-toggle="importLinesModal" class="btn btn-info"><?php echo $lang->pasteText;?></button>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=batchCreateFields')?>
<?php include '../../common/view/customfield.html.php';?>
</div>
@@ -58,17 +59,14 @@
<?php if($project->type != 'ops'):?>
<th class='w-200px<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', ' required'); echo $hiddenStory;?>'><?php echo $lang->task->story;?></th>
<?php endif;?>
<th class='required has-btn'>
<?php echo $lang->task->name;?></span>
<button type='button' data-toggle="importLinesModal" class="btn btn-info"><?php echo $lang->pasteText;?></button>
</th>
<th class='required has-btn'><?php echo $lang->task->name;?></span></th>
<th class='w-80px required'><?php echo $lang->typeAB;?></span></th>
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', ' required');?>'><?php echo $lang->task->assignedTo;?></th>
<th class='w-50px<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
<th class='w-60px<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', ' required');?>'><?php echo $lang->task->estStarted;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', ' required');?>'><?php echo $lang->task->deadline;?></th>
<th class='<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', ' required');?>'><?php echo $lang->task->desc;?></th>
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', ' required');?>'><?php echo $lang->task->pri;?></th>
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', ' required');?>'><?php echo $lang->task->pri;?></th>
</tr>
</thead>
<tbody>
+31 -8
View File
@@ -28,8 +28,8 @@
<table class='table table-form'>
<tbody>
<tr>
<th class='w-80px'><?php echo $lang->testcase->product;?></th>
<td class='w-p45-f'>
<th><?php echo $lang->testcase->product;?></th>
<td>
<div class='input-group'>
<?php echo html::select('product', $products, $productID, "onchange='loadAll(this.value);' class='form-control chosen'");?>
<?php if($this->session->currentProductType != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control' style='width:120px'");?>
@@ -104,13 +104,36 @@
<?php if(strpos(",$showFields,", ',pri,') !== false):?>
<tr>
<th><?php echo $lang->testcase->pri;?></th>
<td><?php echo html::select('pri', (array)$lang->testcase->priList, $pri, "class='form-control minw-80px chosen'");?></td>
<td colspan="2">
<?php
$hasCustomPri = false;
foreach($lang->testcase->priList as $priKey => $priValue)
{
if(!empty($priKey) and (string)$priKey != (string)$priValue)
{
$hasCustomPri = true;
break;
}
}
$priList = $lang->testcase->priList;
if(end($priList))
{
unset($priList[0]);
$priList[0] = '';
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control chosen'");?>
<?php else: ?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control' data-provide='labelSelector'");?>
<?php endif; ?>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->testcase->precondition;?></th>
<td colspan='2'><?php echo html::textarea('precondition', $precondition, " rows='2' class='form-control'");?></td>
</tr>
</tr>
<tr>
<th><?php echo $lang->testcase->steps;?></th>
<td colspan='2'>
@@ -171,18 +194,18 @@
<?php endforeach; ?>
</tbody>
</table>
</td>
</td>
</tr>
<?php if(strpos(",$showFields,", ',keywords,') !== false):?>
<tr>
<th><?php echo $lang->testcase->keywords;?></th>
<td colspan='2'><?php echo html::input('keywords', $keywords, "class='form-control' autocomplete='off'");?></td>
</tr>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->testcase->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
</tr>
</tbody>
<tfoot>
<tr>
@@ -190,7 +213,7 @@
<?php
echo html::submitButton($lang->save, '', 'btn btn-wide btn-primary');
echo ' &nbsp; ';
echo html::backButton($lang->goback, '', 'btn btn-wide btn-gray');
echo html::backButton($lang->goback, '', 'btn btn-wide');
?>
</td>
</tr>
+63 -55
View File
@@ -11,65 +11,73 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='titlebar'>
<div class='heading'>
<div class='input-group pull-left' style='font-weight:normal;'>
<span class='input-group-addon'><strong style='font-size:15px'><?php echo $lang->testcase->selectLib;?></strong></span>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<div class='input-group w-150px'>
<span class='input-group-addon'><?php echo $lang->testcase->selectLib;?></span>
<?php echo html::select('fromlib', $libraries, $libID, "onchange='reload(this.value)' class='form-control chosen'");?>
</div>
</div>
</div>
<div id='querybox' class='show'></div>
<form class='form-condensed' method='post' target='hiddenwin' id='importFromLib'>
<table class='table tablesorter table-fixed table-selectable'>
<thead>
<?php $vars = "productID=$productID&branch=$branch&libID=$libID&orderBy=%s&browseType=$browseType&queryID=$queryID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<?php if($branches):?>
<th class='w-100px'><?php echo $lang->testcase->branch ?></th>
<?php endif;?>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-200px'><?php echo $lang->testcase->fromModule ?></th>
<th class='w-200px'><?php echo $lang->testcase->module ?></th>
<th class='w-100px'><?php common::printOrderLink('type', $orderBy, $vars, $lang->testcase->type)?></th>
</tr>
</thead>
<tbody>
<?php foreach($cases as $case):?>
<tr class='text-center'>
<td class='cell-id'>
<input type='checkbox' name='caseIdList[<?php echo $case->id?>]' value='<?php echo $case->id;?>' />
<?php if(!common::printLink('testcase', 'view', "caseID=$case->id", sprintf('%03d', $case->id))) printf('%03d', $case->id);?>
</td>
<?php if($branches):?>
<td><?php echo html::select("branch[{$case->id}]", $branches, $branch, "class='form-control'")?></td>
<?php endif;?>
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo $case->pri == '0' ? '' : zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
<td class='text-left nobr'><?php if(!common::printLink('testcase', 'view', "caseID=$case->id", $case->title)) echo $case->title;?></td>
<?php $libModule = zget($libModules, $case->module, '');?>
<td class='text-left' title='<?php echo $libModule?>'><?php echo $libModule;?></th>
<td class='text-left' data-module='<?php echo $case->module?>' style='overflow:visible'><?php echo html::select("module[{$case->id}]", $modules, 0, "class='form-control chosen' onchange='setModule(this)'");?></th>
<td><?php echo zget($lang->testcase->typeList, $case->type);?></th>
</tr>
<?php endforeach;?>
<tfoot>
<tr>
<td colspan='<?php echo empty($branches) ? 6 : 7?>'>
<div class='table-actions clearfix'>
<?php echo html::selectButton();?>
<?php echo html::submitButton($lang->testcase->import);?>
<?php echo html::linkButton($lang->goback, $this->session->caseList);?>
</div>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</tbody>
</table>
<div></div>
</form>
<div id='mainContent' class='main-content'>
<div id='querybox' class='show'></div>
<hr class='small' />
<form class='main-table' method='post' target='hiddenwin' id='importFromLib' data-ride='table'>
<table class='table has-sort-head table-fixed'>
<thead>
<?php $vars = "productID=$productID&branch=$branch&libID=$libID&orderBy=%s&browseType=$browseType&queryID=$queryID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<tr>
<th class='c-id'>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<?php if($branches):?>
<th class='w-100px'><?php echo $lang->testcase->branch ?></th>
<?php endif;?>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-200px'><?php echo $lang->testcase->fromModule ?></th>
<th class='w-200px'><?php echo $lang->testcase->module ?></th>
<th class='w-100px'><?php common::printOrderLink('type', $orderBy, $vars, $lang->testcase->type)?></th>
</tr>
</thead>
<tbody>
<?php foreach($cases as $case):?>
<tr>
<td class='c-id'>
<div class="checkbox-primary">
<input type='checkbox' name='caseIdList[<?php echo $case->id?>]' value='<?php echo $case->id;?>' />
<label></label>
</div>
<?php printf('%03d', $case->id);?>
</td>
<?php if($branches):?>
<td><?php echo html::select("branch[{$case->id}]", $branches, $branch, "class='form-control'")?></td>
<?php endif;?>
<td><span class='label-pri <?php echo 'label-pri-' . $case->pri;?>'><?php echo $case->pri == '0' ? '' : zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
<td class='text-left nobr'><?php if(!common::printLink('testcase', 'view', "caseID=$case->id", $case->title)) echo $case->title;?></td>
<?php $libModule = zget($libModules, $case->module, '');?>
<td class='text-left' title='<?php echo $libModule?>'><?php echo $libModule;?></th>
<td class='text-left' data-module='<?php echo $case->module?>' style='overflow:visible'><?php echo html::select("module[{$case->id}]", $modules, 0, "class='form-control chosen' onchange='setModule(this)'");?></th>
<td><?php echo zget($lang->testcase->typeList, $case->type);?></th>
</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'>
<?php echo html::submitButton($lang->testcase->import);?>
</div>
<?php echo html::linkButton($lang->goback, $this->session->caseList);?>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
</div>
<?php js::set('productID', $productID)?>
<?php js::set('branch', $branch)?>
<?php include '../../common/view/footer.html.php';?>
+2
View File
@@ -14,3 +14,5 @@
.datatable-menu {display:none;}
.pl-5px{padding-left:5px;}
#pageActions {top: -60px;}
+1
View File
@@ -0,0 +1 @@
#queryBox.show {border-bottom: 1px solid #ddd;}
+1
View File
@@ -42,6 +42,7 @@ $lang->testsuite->confirmDelete = 'Do you want to delete this suite?';
$lang->testsuite->libraryDelete = 'Do you want to delete this library?';
$lang->testsuite->confirmUnlinkCase = 'Do you want to unlink this Case?';
$lang->testsuite->noticeNone = 'You have not created a suite yet.';
$lang->testsuite->noModule = '<div>You have no modules</div><div>Manage now</div>';
$lang->testsuite->lblCases = 'Cases';
$lang->testsuite->lblUnlinkCase = 'Unlink Case';
+1
View File
@@ -42,6 +42,7 @@ $lang->testsuite->confirmDelete = '您确认要删除该套件吗?';
$lang->testsuite->libraryDelete = '您确认要删除该用例库吗?';
$lang->testsuite->confirmUnlinkCase = '您确认要移除该用例吗?';
$lang->testsuite->noticeNone = '您还没有创建套件';
$lang->testsuite->noModule = '<div>您现在还没有模块信息</div><div>请维护用例库模块</div>';
$lang->testsuite->lblCases = '用例列表';
$lang->testsuite->lblUnlinkCase = '移除用例';
+1
View File
@@ -42,6 +42,7 @@ $lang->testsuite->confirmDelete = '您確認要刪除該套件嗎?';
$lang->testsuite->libraryDelete = '您確認要刪除該用例庫嗎?';
$lang->testsuite->confirmUnlinkCase = '您確認要移除該用例嗎?';
$lang->testsuite->noticeNone = '您還沒有創建套件';
$lang->testsuite->noModule = '<div>您現在還沒有模組信息</div><div>請維護用例庫模組</div>';
$lang->testsuite->lblCases = '用例列表';
$lang->testsuite->lblUnlinkCase = '移除用例';
+52 -43
View File
@@ -14,50 +14,59 @@
<?php js::set('confirmDelete', $lang->testsuite->confirmDelete)?>
<?php js::set('flow', $this->config->global->flow);?>
<?php if($this->config->global->flow != 'onlyTest'):?>
<div id="titlebar">
<div class="heading"> <?php echo $lang->testsuite->browse?> </div>
<div class="actions"><?php common::printIcon('testsuite', 'create', "product=$productID");?></div>
<div id="mainMenu" class='clearfix'>
<div class="btn-toolbar pull-left">
<a href class='btn btn-link btn-active-text'>
<span class='text'><?php echo $lang->testsuite->browse?></span>
<span class='label label-light label-badge'><?php echo $pager->recTotal;?></span>
</a>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('testsuite', 'create', "product=$productID", "<i class='icon icon-plus'> </i>" . $lang->testsuite->create, '', "class='btn btn-primary'");?>
</div>
</div>
<?php endif;?>
<table class='table tablesorter table-fixed' id='suiteList'>
<thead>
<?php $vars = "productID=$productID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<tr>
<th class='w-id text-left'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-200px text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->testsuite->name);?></th>
<th><?php echo $lang->testsuite->desc;?></th>
<th class='w-80px'><?php common::printOrderLink('addedBy', $orderBy, $vars, $lang->testsuite->addedBy);?></th>
<th class='w-150px'><?php common::printOrderLink('addedDate', $orderBy, $vars, $lang->testsuite->addedDate);?></th>
<th class='w-100px {sorter:false} text-left'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($suites as $suite):?>
<tr class='text-left'>
<td><?php echo sprintf('%03d', $suite->id);?></td>
<td class='text-left' title="<?php echo $suite->name?>">
<?php if($suite->type == 'public') echo "<span class='label label-info'>{$lang->testsuite->authorList['public']}</span> ";?>
<?php if($suite->type == 'private') echo "<span class='label label-warning'>{$lang->testsuite->authorList['private']}</span> ";?>
<?php echo html::a(inlink('view', "suiteID=$suite->id"), $suite->name);?>
</td>
<td><?php echo $suite->desc;?></td>
<td><?php echo zget($users, $suite->addedBy);?></td>
<td><?php echo $suite->addedDate;?></td>
<td class='text-center'>
<?php
common::printIcon('testsuite', 'linkCase', "suiteID=$suite->id", $suite, 'list', 'link');
common::printIcon('testsuite', 'edit', "suiteID=$suite->id", $suite, 'list');
<div id='mainContent' class='main-table'>
<table class='table has-sort-head' id='suiteList'>
<thead>
<?php $vars = "productID=$productID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<tr>
<th class='w-id text-left'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-200px text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->testsuite->name);?></th>
<th><?php echo $lang->testsuite->desc;?></th>
<th class='w-90px'><?php common::printOrderLink('addedBy', $orderBy, $vars, $lang->testsuite->addedBy);?></th>
<th class='w-150px'><?php common::printOrderLink('addedDate', $orderBy, $vars, $lang->testsuite->addedDate);?></th>
<th class='w-130px text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($suites as $suite):?>
<tr class='text-left'>
<td><?php echo sprintf('%03d', $suite->id);?></td>
<td class='text-left' title="<?php echo $suite->name?>">
<?php if($suite->type == 'public') echo "<span class='label label-info'>{$lang->testsuite->authorList['public']}</span> ";?>
<?php if($suite->type == 'private') echo "<span class='label label-warning'>{$lang->testsuite->authorList['private']}</span> ";?>
<?php echo html::a(inlink('view', "suiteID=$suite->id"), $suite->name);?>
</td>
<td><?php echo $suite->desc;?></td>
<td><?php echo zget($users, $suite->addedBy);?></td>
<td><?php echo $suite->addedDate;?></td>
<td class='c-actions'>
<?php
common::printIcon('testsuite', 'linkCase', "suiteID=$suite->id", $suite, 'list', 'link');
common::printIcon('testsuite', 'edit', "suiteID=$suite->id", $suite, 'list');
if(common::hasPriv('testsuite', 'delete', $suite))
{
$deleteURL = $this->createLink('testsuite', 'delete', "suiteID=$suite->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"suiteList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->testsuite->delete}' class='btn-icon'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot><tr><td colspan='6'><?php $pager->show();?></td></tr></tfoot>
</table>
if(common::hasPriv('testsuite', 'delete', $suite))
{
$deleteURL = $this->createLink('testsuite', 'delete', "suiteID=$suite->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"suiteList\",confirmDelete)", '<i class="icon icon-sm icon-trash"></i>', '', "title='{$lang->testsuite->delete}' class='btn'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
</div>
<?php include '../../common/view/footer.html.php';?>
+26 -24
View File
@@ -11,32 +11,34 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div class='container mw-1400px'>
<div id='titlebar'>
<div class='heading'>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['create']);?></small> <?php echo $lang->testsuite->create;?></strong>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->testsuite->create;?></h2>
</div>
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->testsuite->name;?></th>
<td colspan='2'><?php echo html::input('name', '', "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<th><?php echo $lang->testsuite->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', '', "rows=10 class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->testsuite->author;?></th>
<td><?php echo html::radio('type', $lang->testsuite->authorList, 'private');?></td>
</tr>
<tr>
<td class='text-center' colspan='3'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
</tr>
</table>
</form>
</div>
<form class='form-condensed' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->testsuite->name;?></th>
<td colspan='2'><?php echo html::input('name', '', "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<th><?php echo $lang->testsuite->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', '', "rows=10 class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->testsuite->author;?></th>
<td><?php echo html::radio('type', $lang->testsuite->authorList, 'private');?></td>
</tr>
<tr>
<td></td><td colspan='2'><?php echo html::submitButton() . html::backButton();?> </td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+22 -20
View File
@@ -11,28 +11,30 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div class='container mw-1400px'>
<div id='titlebar'>
<div class='heading'>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['create']);?></small> <?php echo $lang->testsuite->createLib;?></strong>
<div id="mainContent" class="main-content">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->testsuite->createLib;?></h2>
</div>
<form class="load-indicator main-form form-ajax" id="createForm" method="post" target='hiddenwin'>
<table class="table table-form">
<tr>
<th><?php echo $lang->testsuite->name;?></th>
<td><?php echo html::input('name', '', "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<th><?php echo $lang->testsuite->desc;?></th>
<td><?php echo html::textarea('desc', '', "rows=10 class='form-control'");?></td>
</tr>
<tr>
<td class='text-center' colspan='2'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
</tr>
</table>
</form>
</div>
<form class='form-condensed' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->testsuite->name;?></th>
<td colspan='2'><?php echo html::input('name', '', "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<th><?php echo $lang->testsuite->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', '', "rows=10 class='form-control'");?></td>
</tr>
<tr>
<td></td><td colspan='2'><?php echo html::submitButton() . html::backButton();?> </td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+28 -27
View File
@@ -11,35 +11,36 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div class='container mw-1400px'>
<div id='titlebar'>
<div class='heading'>
<strong><?php echo html::a($this->createLink('testsuite', 'view', 'suiteID=' . $suite->id), $suite->name, '_blank');?></strong>
<small class='text-muted'> <?php echo $lang->testsuite->edit;?> <?php echo html::icon($lang->icons['edit']);?></small>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->testsuite->edit;?></h2>
</div>
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->testsuite->name;?></th>
<td><?php echo html::input('name', $suite->name, "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<th><?php echo $lang->testsuite->desc;?></th>
<td><?php echo html::textarea('desc', htmlspecialchars($suite->desc), "rows=10 class='form-control'");?></td>
</tr>
<?php if($suite->type != 'library'):?>
<tr>
<th><?php echo $lang->testsuite->author;?></th>
<td><?php echo html::radio('type', $lang->testsuite->authorList, $suite->type);?></td>
</tr>
<?php endif;?>
<tr>
<td class='text-center' colspan='2'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
</tr>
</table>
</form>
</div>
<form class='form-condensed' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->testsuite->name;?></th>
<td colspan='2'><?php echo html::input('name', $suite->name, "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<th><?php echo $lang->testsuite->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($suite->desc), "rows=10 class='form-control'");?></td>
</tr>
<?php if($suite->type != 'library'):?>
<tr>
<th><?php echo $lang->testsuite->author;?></th>
<td><?php echo html::radio('type', $lang->testsuite->authorList, $suite->type);?></td>
</tr>
<?php endif;?>
<tr>
<td></td><td colspan='2'><?php echo html::submitButton() . html::backButton();?> </td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+170 -180
View File
@@ -25,7 +25,9 @@ js::set('flow', $this->config->global->flow);
.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'>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
</div>
<ul class='submenu hidden'>
<?php echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i>&nbsp;{$lang->testcase->bySearch}</a></li> ";?>
@@ -67,202 +69,190 @@ js::set('flow', $this->config->global->flow);
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
</div>
<?php else:?>
<div id='featurebar'>
<div class='heading'>
<?php echo "<span class='prefix'>" . html::icon($lang->icons['usecase']) . '</span><strong>' . $libName . '</strong>';?>
<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
$this->app->loadLang('tree');
echo isset($moduleID) ? $moduleName : $this->lang->tree->all;
if(!empty($moduleID))
{
$removeLink = $browseType == 'bymodule' ? inlink('library', "libID=$libID&browseType=$browseType&param=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("libCaseModule")';
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
}
?>
</div>
</div>
<div class='nav'>
<li>
<div class='label-angle <?php echo !empty($moduleID) ? 'with-close' : ''?>'>
<?php
$this->app->loadLang('tree');
echo isset($moduleID) ? $moduleName : $this->lang->tree->all;
if(!empty($moduleID))
{
$removeLink = $browseType == 'bymodule' ? inlink('library', "libID=$libID&browseType=$browseType&param=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("libCaseModule")';
echo html::a($removeLink, "<span class='close'>&times;</span>", '', "class='text-muted'");
}
?>
</div>
</li>
<?php $hasCasesPriv = common::hasPriv('testsuite', 'library'); ?>
<div class='btn-toolbar pull-left'>
<?php
if($hasCasesPriv) echo "<li id='allTab'>" . html::a($this->inlink('library', "libID=$libID&browseType=all"), $lang->testcase->allCases) . "</li>";
if($hasCasesPriv and ($config->testcase->needReview or !empty($config->testcase->forceReview))) echo "<li id='waitTab'>" . html::a($this->inlink('library', "libID=$libID&browseType=wait"), $lang->testcase->statusList['wait']) . "</li>";
echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i>&nbsp;{$lang->testcase->bySearch}</a></li> ";
if(common::hasPriv('testsuite', 'libView')) echo '<li>' . html::a(inlink('libView', "libID=$libID"), $lang->testsuite->view) . '</li>';
if(common::hasPriv('testsuite', 'library'))
{
echo html::a($this->inlink('library', "libID=$libID&browseType=all"), "<span class='text'>{$lang->testcase->allCases}</span><span class='label label-light label-badge'>{$pager->recTotal}</span>", '', "id='allTab' class='btn btn-link'");
if($config->testcase->needReview or !empty($config->testcase->forceReview)) echo html::a($this->inlink('library', "libID=$libID&browseType=wait"), "<span class='text'>" . $lang->testcase->statusList['wait'] . "</span><span class='label label-light label-badge'>{$pager->recTotal}</span>", '', "id='waitTab' class='btn btn-link'");
}
?>
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->testcase->bySearch;?></a>
</div>
<div class='actions'>
<div class='btn-toolbar pull-right'>
<div class='btn-group'>
<?php
$link = common::hasPriv('testsuite', 'exportTemplet') ? $this->createLink('testsuite', 'exportTemplet', "libID=$libID") : '#';
if(common::hasPriv('testsuite', 'exportTemplet')) echo html::a($link, "<i class='icon-download-alt'></i> " . $lang->testsuite->exportTemplet, '', "class='btn export'");
$link = common::hasPriv('testsuite', 'import') ? $this->createLink('testsuite', 'import', "libID=$libID") : '#';
if(common::hasPriv('testsuite', 'import')) echo html::a($link, "<i class='icon-upload-alt'></i> " . $lang->testcase->importFile, '', "class='btn export'");
?>
</div>
<div class='btn-group'>
<div class='btn-group' id='createActionMenu'>
<?php
$misc = common::hasPriv('testsuite', 'createCase') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
$link = common::hasPriv('testsuite', 'createCase') ? $this->createLink('testsuite', 'createCase', "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0)) : '#';
echo html::a($link, "<i class='icon-plus'></i>" . $lang->testcase->create, '', $misc);
?>
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'>
<span class='caret'></span>
</button>
<ul class='dropdown-menu pull-right'>
<?php
$misc = common::hasPriv('testsuite', 'batchCreateCase') ? '' : "class=disabled";
$link = common::hasPriv('testsuite', 'batchCreateCase') ? $this->createLink('testsuite', 'batchCreateCase', "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0)) : '#';
echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', $misc) . "</li>";
?>
</ul>
</div>
<?php common::printLink('testsuite', 'exportTemplet', "libID=$libID", "<i class='icon-export'> </i>" . $lang->testsuite->exportTemplet, '', "class='btn btn-link export'");?>
<?php common::printLink('testsuite', 'import', "libID=$libID", "<i class='icon-import'> </i>" . $lang->testcase->importFile, '', "class='btn btn-link export'");?>
</div>
<?php $params = "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0);?>
<?php common::printLink('testsuite', 'batchCreateCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->batchCreate, '', "class='btn btn-secondary'");?>
<?php common::printLink('testsuite', 'createCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'");?>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
</div>
<div id='pageActions'>
<?php common::printLink('testsuite', 'libView', "libID=$libID", "<i class='icon icon-file-text'> </i>" . $lang->testsuite->view, '', "class='btn'");?>
</div>
<?php endif;?>
<div class='side' id='treebox'>
<a class='side-handle' data-id='testcaseTree'><i class='icon-caret-left'></i></a>
<div class='side-body'>
<div class='panel panel-sm'>
<div class='panel-heading nobr'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $libName;?></strong></div>
<div class='panel-body'>
<?php echo $moduleTree;?>
<div class='text-right'>
<?php common::printLink('tree', 'browse', "libID=$libID&view=caselib", $lang->tree->manage);?>
</div>
<div id="mainContent" class="main-row">
<div class="side-col" id="sidebar">
<div class="cell">
<?php if(!$moduleTree):?>
<hr class="space">
<div class="text-center text-muted">
<?php echo $lang->testsuite->noModule;?>
</div>
<hr class="space">
<?php endif;?>
<?php echo $moduleTree;?>
<div class="text-center">
<?php common::printLink('tree', 'browse', "libID=$libID&view=caselib", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
<hr class="space-sm" />
</div>
</div>
</div>
</div>
<div class='main'>
<script>setTreeBox();</script>
<form id='batchForm' method='post'>
<?php $vars = "libID=$libID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable' id='caseList'>
<thead>
<tr>
<th class='w-id {sorter:false}'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri {sorter:false}'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='{sorter:false}'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-type {sorter:false}'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th class='w-user {sorter:false}'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-100px {sorter:false}'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-70px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<?php if($cases):?>
<tbody>
<?php foreach($cases as $case):?>
<tr class='text-center'>
<?php $viewLink = $this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version");?>
<td class='cell-id'>
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/>
<?php echo html::a($viewLink, sprintf('%03d', $case->id));?>
</td>
<td><span class='<?php echo 'pri' . 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="<?php echo $case->title?>">
<?php if($modulePairs and $case->module)echo "<span title='{$lang->testcase->module}' class='label label-info label-badge'>{$modulePairs[$case->module]}</span> ";?>
<?php echo html::a($viewLink, $case->title, null, "style='color: $case->color'");?>
</td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td class='<?php if(isset($run)) echo $run->status;?> testcase-<?php echo $case->status?>'> <?php echo $lang->testcase->statusList[$case->status];?>
</td>
<td>
<?php
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
if(common::hasPriv('testcase', 'delete'))
{
$deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"caseList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->testcase->delete}' class='btn-icon'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<?php endif;?>
<tfoot>
<tr>
<td colspan='7'>
<?php if($cases):?>
<div class='table-actions clearfix'>
<?php echo html::selectButton();?>
<div class='btn-group dropup'>
<?php
$class = "class='disabled'";
$actionLink = $this->createLink('testcase', 'batchEdit', "libID=$libID&branch=0&type=lib");
$misc = common::hasPriv('testcase', 'batchEdit') ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
echo html::commonButton($lang->edit, $misc);
?>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<ul class='dropdown-menu' id='moreActionMenu'>
<?php
$actionLink = $this->createLink('testcase', 'batchDelete', "libID=$libID");
$misc = common::hasPriv('testcase', 'batchDelete') ? "onclick=\"confirmBatchDelete('$actionLink')\"" : $class;
echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
if(common::hasPriv('testcase', 'batchReview') and ($config->testcase->needReview or !empty($config->testcase->forceReview)))
{
echo "<li class='dropdown-submenu'>";
echo html::a('javascript:;', $lang->testcase->review, '', "id='reviewItem'");
echo "<ul class='dropdown-menu'>";
unset($lang->testcase->reviewResultList['']);
foreach($lang->testcase->reviewResultList as $key => $result)
{
$actionLink = $this->createLink('testcase', 'batchReview', "result=$key");
echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . '</li>';
}
echo '</ul></li>';
}
elseif($config->testcase->needReview or !empty($config->testcase->forceReview))
{
echo '<li>' . html::a('javascript:;', $lang->testcase->review, '', $class) . '</li>';
}
if(common::hasPriv('testcase', 'batchChangeModule'))
{
$withSearch = count($modules) > 8;
echo "<li class='dropdown-submenu'>";
echo html::a('javascript:;', $lang->testcase->moduleAB, '', "id='moduleItem'");
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search' : '') . "'>";
echo '<ul class="dropdown-list">';
foreach($modules as $moduleId => $module)
{
$actionLink = $this->createLink('testcase', 'batchChangeModule', "moduleID=$moduleId");
echo "<li class='option' data-key='$moduleID'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "</li>";
}
echo '</ul>';
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
echo '</div></li>';
}
else
{
echo '<li>' . html::a('javascript:;', $lang->testcase->moduleAB, '', $class) . '</li>';
}
?>
</ul>
<div class="main-col">
<div class="cell" id="queryBox"></div>
<form class="main-table table-testcase" data-ride="table" method="post" id='testcaseForm'>
<?php $canBatchEdit = common::hasPriv('testcase', 'batchEdit');?>
<?php $canBatchDelete = common::hasPriv('testcase', 'batchDelete');?>
<?php $canBatchReview = common::hasPriv('testcase', 'batchReview') and ($config->testcase->needReview or !empty($config->testcase->forceReview));?>
<?php $canBatchChangeModule = common::hasPriv('testcase', 'batchChangeModule');?>
<?php $canBatchAction = $canBatchEdit or $canBatchDelete or $canBatchReview or $canBatchChangeModule;?>
<?php $vars = "libID=$libID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<table class='table has-sort-head' id='caseList'>
<thead>
<tr>
<th class='c-id'>
<?php if($canBatchAction):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
</div>
<?php endif?>
<div class='text-right'><?php $pager->show();?></div>
</td>
</tr>
</tfoot>
</table>
</form>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-actions-2 text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php if($cases):?>
<?php foreach($cases as $case):?>
<tr>
<td class='cell-id'>
<?php if($canBatchAction):?>
<?php echo html::checkbox('caseIDList', array($case->id => sprintf('%03d', $case->id)));?>
<?php else:?>
<?php echo sprintf('%03d', $case->id);?>
<?php endif;?>
</td>
<td><span class='label-pri label-pri-<?php echo $case->pri;?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
<td class='text-left' title="<?php echo $case->title?>">
<?php if($modulePairs and $case->module) echo "<span title='{$lang->testcase->module}' class='label label-info label-badge'>{$modulePairs[$case->module]}</span> ";?>
<?php $viewLink = $this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version");?>
<?php echo html::a($viewLink, $case->title, null, "style='color: $case->color'");?>
</td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td class='<?php if(isset($run)) echo $run->status;?> testcase-<?php echo $case->status?>'> <?php echo $lang->testcase->statusList[$case->status];?></td>
<td class='c-actions'>
<?php
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
if(common::hasPriv('testcase', 'delete'))
{
$deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"caseList\",confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->testcase->delete}' class='btn'");
}
?>
</td>
</tr>
<?php endforeach;?>
<?php endif;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($cases):?>
<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', "libID=$libID&branch=0&type=lib");?>
<?php $misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";?>
<?php echo html::commonButton($lang->edit, $misc);?>
<?php if($canBatchDelete or $canBatchReview or $canBatchChangeModule):?>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<ul class='dropdown-menu' id='moreActionMenu'>
<?php
if($canBatchDelete)
{
$actionLink = $this->createLink('testcase', 'batchDelete', "libID=$libID");
$misc = "onclick=\"confirmBatchDelete('$actionLink')\"";
echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
}
if($canBatchReview)
{
echo "<li class='dropdown-submenu'>";
echo html::a('javascript:;', $lang->testcase->review, '', "id='reviewItem'");
echo "<ul class='dropdown-menu'>";
unset($lang->testcase->reviewResultList['']);
foreach($lang->testcase->reviewResultList as $key => $result)
{
$actionLink = $this->createLink('testcase', 'batchReview', "result=$key");
echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . '</li>';
}
echo '</ul></li>';
}
if($canBatchChangeModule)
{
$withSearch = count($modules) > 8;
echo "<li class='dropdown-submenu'>";
echo html::a('javascript:;', $lang->testcase->moduleAB, '', "id='moduleItem'");
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search' : '') . "'>";
echo '<ul class="dropdown-list">';
foreach($modules as $moduleId => $module)
{
$actionLink = $this->createLink('testcase', 'batchChangeModule', "moduleID=$moduleId");
echo "<li class='option' data-key='$moduleID'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "</li>";
}
echo '</ul>';
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
echo '</div></li>';
}
?>
</ul>
<?php endif;?>
</div>
</div>
<?php endif;?>
<?php echo $pager->show('right', 'pagerjs');?>
</div>
</form>
</div>
</div>
<script>
$('#module' + moduleID).addClass('active');
$('#<?php echo $this->session->libBrowseType?>Tab').addClass('active');
$('#<?php echo $this->session->libBrowseType?>Tab').addClass('btn-active-text');
if(flow == 'onlyTest')
{
$('#modulemenu > .nav > li.right').before($('#featurebar .submenu').html());
+29 -32
View File
@@ -11,44 +11,41 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='CASELIB'> <strong><?php echo $lib->id;?></strong></span>
<strong><?php echo $lib->name;?></strong>
<?php if($lib->deleted):?>
<span class='label label-danger'><?php echo $lang->testsuite->deleted;?></span>
<?php endif; ?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php $browseLink = $this->session->caseList ? $this->session->caseList : $this->createLink('testsuite', 'library', "libID=$lib->id");?>
<?php common::printBack($browseLink, 'btn btn-link');?>
<div class='divider'></div>
<div class='page-title'>
<span class='label label-id'><?php echo $lib->id;?></span>
<?php echo $lib->name;?>
<?php if($lib->deleted):?>
<span class='label label-danger'><?php echo $lang->testsuite->deleted;?></span>
<?php endif; ?>
</div>
</div>
<div class='actions'>
</div>
<div id='mainContent' class='main-content'>
<div class='cell'>
<div class='detail'>
<div class='detail-title'><?php echo $lang->testsuite->legendDesc;?></div>
<div class='detail-content article-content'><?php echo $lib->desc;?></div>
</div>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<div id="mainActions">
<nav class="container"></nav>
<div class="btn-toolbar">
<?php
$browseLink = $this->session->caseList ? $this->session->caseList : $this->createLink('testsuite', 'library', "libID=$lib->id");
$actionLinks = '';
common::printBack($browseLink);
if(!$lib->deleted)
{
ob_start();
echo "<div class='btn-group'>";
common::printIcon('testsuite', 'edit', "libID=$lib->id");
common::printIcon('testsuite', 'delete', "libID=$lib->id", '', 'button', '', 'hiddenwin');
echo '</div>';
echo "<div class='btn-group'>";
common::printRPN($browseLink);
echo '</div>';
$actionLinks = ob_get_contents();
ob_end_clean();
echo $actionLinks;
echo "<div class='divider'></div>";
common::printIcon('testsuite', 'edit', "libID=$lib->id");
common::printIcon('testsuite', 'delete', "libID=$lib->id", '', 'button', '', 'hiddenwin');
}
?>
</div>
</div>
<div class='main'>
<fieldset>
<legend><?php echo $lang->testsuite->legendDesc;?></legend>
<div class='article-content'><?php echo $lib->desc;?></div>
</fieldset>
<?php include '../../common/view/action.html.php';?>
<div class='actions'><?php echo $actionLinks;?></div>
</div>
<?php include '../../common/view/footer.html.php';?>
+66 -60
View File
@@ -13,68 +13,74 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php js::set('flow', $this->config->global->flow);?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'> <strong><?php echo $suite->id;?></strong></span>
<strong><?php echo html::a($this->createLink('testsuite', 'view', 'suiteID=' . $suite->id), $suite->name, '_blank');?></strong>
<small class='text-muted'> <?php echo $lang->testsuite->linkCase;?> <?php echo html::icon($lang->icons['link']);?></small>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php common::printBack($this->session->testsuiteList, 'btn btn-link');?>
<div class='divider'></div>
<div class='page-title'>
<span class='label label-id'><?php echo $suite->id;?></span>
<?php echo $suite->name;?>
<?php echo $lang->arrow . $lang->testsuite->linkCase;?>
</div>
</div>
<div class='actions'>
<div class='btn-group'><?php common::printRPN($this->session->testsuiteList);?> </div>
</div>
<div id='querybox' class='show'></div>
</div>
<form method='post'>
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable'>
<caption class='text-left text-special'>
<?php echo html::icon('unlink');?> &nbsp;<strong><?php echo $lang->testsuite->unlinkedCases;?></strong> (<?php echo $pager->recTotal;?>)
</caption>
<thead>
<tr>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-70px'><nobr><?php echo $lang->testsuite->linkVersion;?></nobr></th>
<th class='w-pri'><?php echo $lang->priAB;?></th>
<th><?php echo $lang->testcase->title;?></th>
<th class='w-type'><?php echo $lang->testcase->type;?></th>
<th class='w-user'><?php echo $lang->openedByAB;?></th>
<th class='w-status'><?php echo $lang->statusAB;?></th>
</tr>
</thead>
<tbody>
<?php foreach($cases as $case):?>
<tr class='text-center'>
<td class='cell-id'>
<input type='checkbox' name='cases[]' value='<?php echo $case->id;?>' />
<?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$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 input-sm" style="padding: 0 5px; height: 20px"');?> </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 class='text-left'>
<?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><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td class='case-<?php echo $case->status?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='7'>
<div id='mainContent' class='main-content'>
<div class="cell" id="queryBox"></div>
<form class='main-table table-testcase' data-ride='table' method='post'>
<div class="table-header">
<div class="table-statistic"><i class="icon-unlink"></i> &nbsp;<strong><?php echo $lang->testsuite->unlinkedCases;?></strong> (<?php echo $pager->recTotal;?>)</div>
</div>
<table class='table' id='testcaseList'>
<thead>
<tr>
<th class='w-id'>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php echo $lang->idAB;?>
</th>
<th class='w-70px text-center'><nobr><?php echo $lang->testsuite->linkVersion;?></nobr></th>
<th class='w-pri text-center'><?php echo $lang->priAB;?></th>
<th><?php echo $lang->testcase->title;?></th>
<th class='w-type'><?php echo $lang->testcase->type;?></th>
<th class='w-user text-center'><?php echo $lang->openedByAB;?></th>
<th class='w-status text-center'><?php echo $lang->statusAB;?></th>
</tr>
</thead>
<tbody>
<?php foreach($cases as $case):?>
<tr class='text-center'>
<td class='cell-id'>
<?php echo html::checkbox('cases', array($case->id => sprintf('%03d', $case->id)));?>
</td>
<td><?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;?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
<td class='text-left'>
<?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><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td class='case-<?php echo $case->status?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($cases):?>
<div class='table-actions pd-0 clearfix'><?php echo html::selectButton() . html::submitButton();?></div>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class='table-actions btn-toolbar'>
<?php echo html::submitButton('', '', 'btn');?>
</div>
<?php endif;?>
<div class='text-right'><?php $pager->show();?></div>
</td>
</tr>
</tfoot>
</table>
</form>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+86 -94
View File
@@ -14,86 +14,76 @@
<?php include '../../common/view/tablesorter.html.php';?>
<?php js::set('confirmUnlink', $lang->testsuite->confirmUnlinkCase)?>
<?php js::set('flow', $config->global->flow);?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='TESTSUITE'><strong><?php echo $suite->id;?></strong></span>
<strong><?php echo $suite->name;?></strong>
<?php if($suite->deleted):?>
<span class='label label-danger'><?php echo $lang->suite->deleted;?></span>
<?php endif; ?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php $browseLink = $this->session->testsuiteList ? $this->session->testsuiteList : $this->createLink('testsuite', 'browse', "productID=$suite->product");?>
<?php common::printBack($browseLink, 'btn btn-link');?>
<div class='divider'></div>
<div class='page-title'>
<span class='label label-id'><?php echo $suite->id;?></span>
<?php echo $suite->name;?>
<?php if($suite->deleted):?>
<span class='label label-danger'><?php echo $lang->suite->deleted;?></span>
<?php endif; ?>
</div>
</div>
<div class='actions'>
<div class='btn-toolbar pull-right'>
<?php
$browseLink = $this->session->testsuiteList ? $this->session->testsuiteList : $this->createLink('testsuite', 'browse', "productID=$suite->product");
$actionLinks = '';
if(!$suite->deleted)
{
ob_start();
echo "<div class='btn-group'>";
common::printIcon('testsuite', 'linkCase', "suiteID=$suite->id", $suite, 'button', 'link');
echo '</div>';
echo "<div class='btn-group'>";
common::printIcon('testsuite', 'edit', "suiteID=$suite->id");
common::printIcon('testsuite', 'delete', "suiteID=$suite->id", '', 'button', '', 'hiddenwin');
echo '</div>';
echo "<div class='btn-group'>";
common::printRPN($browseLink);
echo '</div>';
$actionLinks = ob_get_contents();
ob_end_clean();
echo $actionLinks;
}
?>
</div>
</div>
<div class='row-table'>
<div class='col-main'>
<div id='mainContent' class='main-row'>
<div class='main-col col-8'>
<div class='main'>
<form method='post' name='casesform' id='casesForm'>
<form class='main-table table-case' data-ride='table' method='post' name='casesform' id='casesForm'>
<div class='panel'>
<div class='panel-heading'>
<strong><?php echo $lang->testcase->common?></strong>
<div class='panel-actions pull-right'><?php common::printIcon('testsuite', 'linkCase', "suiteID=$suite->id", $suite, 'button', 'link');?></div>
</div>
<?php $canBatchEdit = common::hasPriv('testcase', 'batchEdit');?>
<?php $canBatchUnlink = common::hasPriv('testsuite', 'batchUnlinkCases');?>
<?php $hasCheckbox = ($canBatchEdit && $canBatchUnlink);?>
<?php $vars = "suiteID=$suite->id&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable' id='caseList'>
<table class='table has-sort-head' id='caseList'>
<thead>
<tr class='colhead'>
<th class='w-id {sorter: false}'><nobr><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></nobr></th>
<th class='w-pri {sorter: false}'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-150px {sorter: false}'> <?php common::printOrderLink('module', $orderBy, $vars, $lang->testcase->module);?></th>
<th class='{sorter: false}'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-type {sorter: false}'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->testcase->type);?></th>
<th class='w-status {sorter: false}'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-80px {sorter:false}'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testcase->lastRunResult);?></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 {sorter: false}'><?php echo $lang->actions;?></th>
<th class='c-id'>
<?php if($hasCheckbox):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></nobr>
</th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-150px'> <?php common::printOrderLink('module', $orderBy, $vars, $lang->testcase->module);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-90px'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->testcase->type);?></th>
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testcase->lastRunResult);?></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-130px text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<?php
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
$canBatchUnlink = common::hasPriv('testsuite', 'batchUnlinkCases');
$hasCheckbox = ($canBatchEdit && $canBatchUnlink);
?>
<?php if($cases):?>
<tbody>
<?php foreach($cases as $case):?>
<tr class='text-center'>
<td class='cell-id'>
<tr>
<td class='c-id'>
<?php if($hasCheckbox):?>
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/>
<?php endif;?>
<?php echo html::checkbox('caseIDList', array($case->id => sprintf('%03d', $case->id)));?>
<?php else:?>
<?php printf('%03d', $case->id);?>
<?php endif;?>
</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><span class='label-pri label-pri-<?php echo $case->pri;?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
<td class='text-left' title='<?php echo $modules[$case->module]?>'><?php echo $modules[$case->module];?></td>
<td class='text-left nobr'>
<td class='text-left nobr' title='<?php echo $case->title;?>'>
<?php if($case->branch) echo "<span class='label label-info label-badge'>{$branches[$case->branch]}</span>"?>
<?php echo html::a($this->createLink('testcase', 'view', "caseID=$case->id&version=$case->caseVersion"), $case->title);?>
</td>
@@ -103,12 +93,12 @@
<td><?php echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a($this->createLink('testcase', '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='text-center'>
<td class='c-actions'>
<?php
if(common::hasPriv('testsuite', 'unlinkCase', $suite))
{
$unlinkURL = $this->createLink('testsuite', 'unlinkCase', "suiteID=$suite->id&caseID=$case->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\",\"caseList\",confirmUnlink)", '<i class="icon-unlink"></i>', '', "title='{$lang->testsuite->unlinkCase}' class='btn-icon'");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\",\"caseList\",confirmUnlink)", '<i class="icon-unlink"></i>', '', "title='{$lang->testsuite->unlinkCase}' class='btn'");
}
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", $suite, 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", $suite, 'list', 'list-alt', '', 'results iframe', false, "data-width='95%'");
@@ -118,48 +108,50 @@
<?php endforeach;?>
</tbody>
<?php endif;?>
<tfoot>
<tr>
<td colspan='11' style='padding-left:5px;'>
<?php if($cases):?>
<div class='table-actions clearfix'>
<?php if($hasCheckbox) echo html::selectButton();?>
<div class='btn-group dropup'>
<?php
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID");
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
echo html::commonButton($lang->edit, $misc);
?>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php
$actionLink = $this->createLink('testsuite', 'batchUnlinkCases', "suiteID=$suite->id");
$misc = common::hasPriv('testsuite', 'batchUnlinkCases') ? "onclick=\"setFormAction('$actionLink')\"" : "class='disabled'";
echo "<li>" . html::a('javascript:;', $lang->testsuite->unlinkCase, '', $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>";
?>
</ul>
</div>
</div>
<?php endif;?>
<?php echo $pager->show();?>
</td>
</tr>
</tfoot>
</table>
<div class='table-footer'>
<?php if($cases):?>
<?php if($hasCheckbox):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php endif;?>
<div class='table-actions btn-toolbar'>
<div class='btn-group dropup'>
<?php
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID");
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
echo html::commonButton($lang->edit, $misc);
?>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php
$actionLink = $this->createLink('testsuite', 'batchUnlinkCases', "suiteID=$suite->id");
$misc = common::hasPriv('testsuite', 'batchUnlinkCases') ? "onclick=\"setFormAction('$actionLink')\"" : "class='disabled'";
echo "<li>" . html::a('javascript:;', $lang->testsuite->unlinkCase, '', $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>";
?>
</ul>
</div>
</div>
<?php endif;?>
<?php echo $pager->show('right', 'pagerjs');?>
</div>
</div>
</form>
</div>
</div>
<div class='col-side'>
<div class='main main-side'>
<fieldset>
<legend><?php echo $lang->testsuite->legendDesc;?></legend>
<div class='article-content'><?php echo $suite->desc;?></div>
</fieldset>
<div class='side-col col-4'>
<div class='cell'>
<div class='detail'>
<div class='detail-title'><?php echo $lang->testsuite->legendDesc;?></div>
<div class='detail-content article-content'>
<?php echo $suite->desc;?>
</div>
</div>
</div>
<div class='cell'>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
+1 -1
View File
@@ -385,7 +385,7 @@ class tree extends control
* @access public
* @return void
*/
public function ajaxGetDropMenu($rootID, $module, $method, $extra)
public function ajaxGetDropMenu($rootID, $module, $method, $extra = '')
{
$this->view->productID = $rootID;
$this->view->module = $module;
+2 -3
View File
@@ -46,10 +46,9 @@ if(empty($config->notMd5Pwd))js::import($jsRoot . 'md5.js');
<td id="keeplogin"><?php echo html::checkBox('keepLogin', $lang->user->keepLogin, $keepLogin);?></td>
</tr>
<tr>
<th></th>
<td class="form-actions">
<td class="form-actions" colspan='2'>
<?php
echo html::submitButton($lang->login);
echo html::submitButton($lang->login, '', 'btn btn-primary btn-wide');
if($app->company->guest) echo html::linkButton($lang->user->asGuest, $this->createLink($config->default->module));
echo html::hidden('referer', $referer);
echo html::a(inlink('reset'), $lang->user->resetPassword);