This commit is contained in:
Catouse
2018-05-16 10:09:38 +08:00
10 changed files with 368 additions and 366 deletions
+3 -3
View File
@@ -91,10 +91,10 @@ js::set('confirmDelete', $lang->user->confirmDelete);
<td class='c-actions'>
<div class='more'>
<?php
if($user->ranzhi) common::printIcon('user', 'unbind', "userID=$user->account", '', 'list', 'unlink', "hiddenwin");
if((strtotime(date('Y-m-d H:i:s')) - strtotime($user->locked)) < $this->config->user->lockMinutes * 60)
if(true or $user->ranzhi) common::printIcon('user', 'unbind', "userID=$user->account", '', 'list', 'unlink', "hiddenwin");
if(true or (strtotime(date('Y-m-d H:i:s')) - strtotime($user->locked)) < $this->config->user->lockMinutes * 60)
{
common::printIcon('user', 'unlock', "userID=$user->account", '', 'list', '', "hiddenwin");
common::printIcon('user', 'unlock', "userID=$user->account", '', 'list', 'unlock', "hiddenwin");
}
?>
</div>
+2 -2
View File
@@ -54,11 +54,11 @@
if(common::hasPriv('group', 'delete') and $group->role != 'limited')
{
$deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '<i class="icon icon-sm icon-close"></i>', '', "title='{$lang->group->delete}' class='btn'");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->group->delete}' class='btn'");
}
else
{
echo "<button class='btn disabled'><i class='icon icon-sm icon-close disabled' title='{$lang->group->delete}'></i></button>";
echo "<button class='btn disabled'><i class='icon icon-trash disabled' title='{$lang->group->delete}'></i></button>";
}
?>
</td>
+4 -15
View File
@@ -36,17 +36,17 @@
</div>
<form id="recordForm" method='post' target='hiddenwin' style='margin-top:25px'>
<table class='table table-form table-fixed'>
<?php if(count($estimates)):?>
<thead>
<tr class='text-center'>
<th class="w-id"><?php echo $lang->idAB;?></th>
<th class="w-100px"><?php echo $lang->task->date;?></th>
<th class="w-120px"><?php echo $lang->task->date;?></th>
<th class="w-60px"><?php echo $lang->task->consumedThisTime;?></th>
<th class="w-60px"><?php echo $lang->task->leftThisTime;?></th>
<th><?php echo $lang->comment;?></th>
<th class="w-60px"><?php echo $lang->actions;?></th>
<th class='w-10px'></th>
</tr>
</thead>
<?php if(count($estimates)):?>
<?php foreach($estimates as $estimate):?>
<tr class="text-center">
<td><?php echo $estimate->id;?></td>
@@ -67,16 +67,6 @@
<?php endforeach;?>
<?php endif;?>
<?php if(in_array($task->status, array('wait', 'pause', 'doing'))):?>
<thead>
<tr class='text-center'>
<th class="w-id"><?php echo $lang->idAB;?></th>
<th class="w-120px"><?php echo $lang->task->date;?></th>
<th class="w-60px"><?php echo $lang->task->consumedThisTime;?></th>
<th class="w-60px"><?php echo $lang->task->leftThisTime;?></th>
<th><?php echo $lang->comment;?></th>
<th class='w-10px'></th>
</tr>
</thead>
<?php for($i = 1; $i <= 3; $i++):?>
<tr class="text-center">
<td><?php echo $i . html::hidden("id[$i]", $i);?></td>
@@ -87,14 +77,13 @@
<td></td>
</tr>
<?php endfor;?>
<?php endif;?>
<tr>
<td colspan='6' class='text-center'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</table>
<?php endif;?>
</form>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
<?php endif;?>
+119 -113
View File
@@ -12,122 +12,128 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('dittoNotice', $this->lang->testcase->dittoNotice);?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['testcase']);?></span>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchEdit']);?></small> <?php echo $lang->testcase->common . $lang->colon . $lang->testcase->batchEdit;?></strong>
<div class='actions'>
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i> </button>
<div id="mainContent" class="main-content">
<div class="main-header">
<h2><?php echo $lang->testcase->common . $lang->colon . $lang->testcase->batchEdit;?></h2>
<div class="pull-right btn-toolbar">
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=testcase&section=custom&key=batchEditFields')?>
<?php include '../../common/view/customfield.html.php';?>
</div>
</div>
</div>
<?php if(isset($suhosinInfo)):?>
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
<?php else:?>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
foreach(explode(',', $this->config->testcase->edit->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->testcase->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
?>
<form class='form-condensed' method='post' target='hiddenwin' action="<?php echo inLink('batchEdit');?>">
<table class='table table-form table-fixed'>
<thead>
<tr>
<th class='w-50px'><?php echo $lang->idAB;?></th>
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
<?php echo $lang->priAB;?>
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
</th>
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'>
<?php echo $lang->statusAB;?>
<?php if(isset($requiredFields['status'])) echo " <span class='required'></span>";?>
</th>
<?php if($branchProduct):?>
<th class='w-150px<?php echo zget($visibleFields, 'branch', ' hidden')?>'><?php echo $lang->testcase->branch;?></th>
<?php endif;?>
<th class='w-150px<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->testcase->module;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'story', ' hidden')?>'>
<?php echo $lang->testcase->story;?>
<?php if(isset($requiredFields['story'])) echo " <span class='required'></span>";?>
</th>
<th><?php echo $lang->testcase->title;?> <span class='required'></span></th>
<th class='w-120px'><?php echo $lang->testcase->type;?> <span class='required'></span></th>
<th class='<?php echo zget($visibleFields, 'precondition', 'hidden')?>'>
<?php echo $lang->testcase->precondition;?>
<?php if(isset($requiredFields['precondition'])) echo " <span class='required'></span>";?>
</th>
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'>
<?php echo $lang->testcase->keywords;?>
<?php if(isset($requiredFields['keywords'])) echo " <span class='required'></span>";?>
</th>
<th class='w-300px<?php echo zget($visibleFields, 'stage', ' hidden')?>'>
<?php echo $lang->testcase->stage;?>
<?php if(isset($requiredFields['stage'])) echo " <span class='required'></span>";?>
</th>
</tr>
</thead>
<tbody>
<?php foreach($caseIDList as $caseID):?>
<?php
if(!isset($cases[$caseID])) continue;
if(!$productID and $branchProduct)
<?php if(isset($suhosinInfo)):?>
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
<?php else:?>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
foreach(explode(',', $this->config->testcase->edit->requiredFields) as $field)
{
if($field)
{
$product = $this->product->getByID($cases[$caseID]->product);
$branches = $product->type == 'normal' ? array('' => '') : $this->loadModel('branch')->getPairs($product->id);
if($product->type != 'normal')
{
foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName;
$branches = array('ditto' => $this->lang->story->ditto) + $branches;
}
$modules = $this->tree->getOptionMenu($cases[$caseID]->product, $viewType = 'case', 0, $cases[$caseID]->branch);
$modules = array('ditto' => $this->lang->story->ditto) + $modules;
$requiredFields[$field] = '';
if(strpos(",{$config->testcase->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
?>
<tr class='text-center'>
<td><?php echo $caseID . html::hidden("caseIDList[$caseID]", $caseID);?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>'> <?php echo html::select("pris[$caseID]", $priList, $cases[$caseID]->pri, 'class=form-control');?></td>
<td class='<?php echo zget($visibleFields, 'status', 'hidden')?>'><?php echo html::select("statuses[$caseID]", (array)$lang->testcase->statusList, $cases[$caseID]->status, 'class=form-control');?></td>
<?php if($branchProduct):?>
<td class='text-left<?php echo zget($visibleFields, 'branch', ' hidden')?>' style='overflow:visible'>
<?php $branchProductID = $productID ? $productID : $product->id;?>
<?php $disabled = (isset($product) and $product->type == 'normal') ? "disabled='disabled'" : '';?>
<?php echo html::select("branches[$caseID]", $branches, $cases[$caseID]->branch, "class='form-control chosen' onchange='loadBranches($branchProductID, this.value, $caseID)', $disabled");?>
</td>
<?php endif;?>
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[$caseID]", $modules, $cases[$caseID]->module, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'story', ' hidden')?>' style='overflow:visible'><?php echo html::select("stories[$caseID]", $stories, $cases[$caseID]->story, "class='form-control chosen'");?></td>
<td style='overflow:visible' title='<?php echo $cases[$caseID]->title?>'>
<div class='input-group'>
<?php echo html::hidden("colors[$caseID]", $cases[$caseID]->color, "data-provide='colorpicker' data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->testcase->colorTag}' data-update-text='#titles\\[{$caseID}\\]'");?>
<?php echo html::input("titles[$caseID]", $cases[$caseID]->title, "class='form-control' autocomplete='off'"); echo "<span class='star'>*</span>";?>
</div>
</td>
<td><?php echo html::select("types[$caseID]", $typeList, $cases[$caseID]->type, 'class=form-control');?></td>
<td class='<?php echo zget($visibleFields, 'precondition', 'hidden')?>'><?php echo html::textarea("precondition[$caseID]", $cases[$caseID]->precondition, "rows='1' class='form-control autosize'")?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'> <?php echo html::input("keywords[$caseID]", $cases[$caseID]->keywords, "class='form-control' autocomplete='off'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'stage', ' hidden')?>' style='overflow:visible'><?php echo html::select("stages[$caseID][]", $lang->testcase->stageList, $cases[$caseID]->stage, "class='form-control chosen' multiple data-placeholder='{$lang->testcase->stage}'");?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr><td colspan='<?php echo $branchProduct ? (count($visibleFields) + 3) : (count($visibleFields) + 2);?>' class='text-center'><?php echo html::submitButton();?></td></tr>
</tfoot>
</table>
</form>
}
?>
<form method='post' target='hiddenwin' action="<?php echo inLink('batchEdit');?>">
<table class='table table-form table-fixed'>
<thead>
<tr>
<th class='w-50px'><?php echo $lang->idAB;?></th>
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
<?php echo $lang->priAB;?>
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
</th>
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'>
<?php echo $lang->statusAB;?>
<?php if(isset($requiredFields['status'])) echo " <span class='required'></span>";?>
</th>
<?php if($branchProduct):?>
<th class='w-150px<?php echo zget($visibleFields, 'branch', ' hidden')?>'><?php echo $lang->testcase->branch;?></th>
<?php endif;?>
<th class='w-150px<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->testcase->module;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'story', ' hidden')?>'>
<?php echo $lang->testcase->story;?>
<?php if(isset($requiredFields['story'])) echo " <span class='required'></span>";?>
</th>
<th><?php echo $lang->testcase->title;?> <span class='required'></span></th>
<th class='w-120px'><?php echo $lang->testcase->type;?> <span class='required'></span></th>
<th class='<?php echo zget($visibleFields, 'precondition', 'hidden')?>'>
<?php echo $lang->testcase->precondition;?>
<?php if(isset($requiredFields['precondition'])) echo " <span class='required'></span>";?>
</th>
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'>
<?php echo $lang->testcase->keywords;?>
<?php if(isset($requiredFields['keywords'])) echo " <span class='required'></span>";?>
</th>
<th class='w-300px<?php echo zget($visibleFields, 'stage', ' hidden')?>'>
<?php echo $lang->testcase->stage;?>
<?php if(isset($requiredFields['stage'])) echo " <span class='required'></span>";?>
</th>
</tr>
</thead>
<tbody>
<?php foreach($caseIDList as $caseID):?>
<?php
if(!isset($cases[$caseID])) continue;
if(!$productID and $branchProduct)
{
$product = $this->product->getByID($cases[$caseID]->product);
$branches = $product->type == 'normal' ? array('' => '') : $this->loadModel('branch')->getPairs($product->id);
if($product->type != 'normal')
{
foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName;
$branches = array('ditto' => $this->lang->story->ditto) + $branches;
}
$modules = $this->tree->getOptionMenu($cases[$caseID]->product, $viewType = 'case', 0, $cases[$caseID]->branch);
$modules = array('ditto' => $this->lang->story->ditto) + $modules;
}
?>
<tr class='text-center'>
<td><?php echo $caseID . html::hidden("caseIDList[$caseID]", $caseID);?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>'> <?php echo html::select("pris[$caseID]", $priList, $cases[$caseID]->pri, 'class=form-control');?></td>
<td class='<?php echo zget($visibleFields, 'status', 'hidden')?>'><?php echo html::select("statuses[$caseID]", (array)$lang->testcase->statusList, $cases[$caseID]->status, 'class=form-control');?></td>
<?php if($branchProduct):?>
<td class='text-left<?php echo zget($visibleFields, 'branch', ' hidden')?>' style='overflow:visible'>
<?php $branchProductID = $productID ? $productID : $product->id;?>
<?php $disabled = (isset($product) and $product->type == 'normal') ? "disabled='disabled'" : '';?>
<?php echo html::select("branches[$caseID]", $branches, $cases[$caseID]->branch, "class='form-control chosen' onchange='loadBranches($branchProductID, this.value, $caseID)', $disabled");?>
</td>
<?php endif;?>
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[$caseID]", $modules, $cases[$caseID]->module, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'story', ' hidden')?>' style='overflow:visible'><?php echo html::select("stories[$caseID]", $stories, $cases[$caseID]->story, "class='form-control chosen'");?></td>
<td style='overflow:visible' title='<?php echo $cases[$caseID]->title?>'>
<div class='input-group'>
<div class="input-control has-icon-right">
<?php echo html::input("title[$caseID]", $cases[$caseID]->title, "class='form-control' autocomplete='off'");?>
<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->testcase->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<?php echo html::hidden("color[$caseID]", $cases[$caseID]->color, "data-provide='colorpicker' data-icon='color' data-wrapper='input-control-icon-right' data-update-color='#title\\[$caseID\\]'");?>
</div>
</div>
</div>
</td>
<td><?php echo html::select("types[$caseID]", $typeList, $cases[$caseID]->type, 'class=form-control');?></td>
<td class='<?php echo zget($visibleFields, 'precondition', 'hidden')?>'><?php echo html::textarea("precondition[$caseID]", $cases[$caseID]->precondition, "rows='1' class='form-control autosize'")?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'> <?php echo html::input("keywords[$caseID]", $cases[$caseID]->keywords, "class='form-control' autocomplete='off'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'stage', ' hidden')?>' style='overflow:visible'><?php echo html::select("stages[$caseID][]", $lang->testcase->stageList, $cases[$caseID]->stage, "class='form-control chosen' multiple data-placeholder='{$lang->testcase->stage}'");?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr><td colspan='<?php echo $branchProduct ? (count($visibleFields) + 3) : (count($visibleFields) + 2);?>' class='text-center'><?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?></td></tr>
</tfoot>
</table>
</form>
<?php endif;?>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=testcase&section=custom&key=batchEditFields')?>
<?php include '../../common/view/customfield.html.php';?>
</div>
<?php include '../../common/view/footer.html.php';?>
+24 -25
View File
@@ -19,31 +19,30 @@ function closeWindow()
}
}
</script>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['export']);?></span>
<strong><?php echo $lang->testcase->exportTemplet;?></strong>
<div class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->testcase->exportTemplet;?></h2>
</div>
</div>
<form class='form-condensed' method='post' target='hiddenwin' onsubmit='setDownloading();' style='padding: 40px 5%'>
<table class='w-p100'>
<tr>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->testcase->num;?></span>
<?php
echo html::input('num', '10', "class='form-control' autocomplete='off'");
?>
</div>
</td>
<td class='w-100px'>
<?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', "class='form-control'");?>
</td>
<td>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
<form method='post' target='hiddenwin' onsubmit='setDownloading();' style='padding: 40px 5%'>
<table class='w-p100'>
<tr>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->testcase->num;?></span>
<?php
echo html::input('num', '10', "class='form-control' autocomplete='off'");
?>
</div>
</td>
<td class='w-100px'>
<?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', "class='form-control'");?>
</td>
<td>
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
</td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
+7 -4
View File
@@ -1,7 +1,10 @@
<?php include '../../common/view/header.lite.html.php';?>
<div class='container mw-600px'>
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin' style="padding:30px">
<table class='table table-form'>
<div class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->testcase->importFile;?></h2>
</div>
<form method='post' enctype='multipart/form-data' target='hiddenwin' style="padding:30px">
<table class='table table-form w-p100'>
<tr>
<td align='center'>
<input type='file' name='file' class='form-control'/>
@@ -10,7 +13,7 @@
<?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', "class='form-control'");?>
</td>
<td>
<?php echo html::submitButton();?>
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
</td>
</tr>
</table>
+100 -98
View File
@@ -5,104 +5,106 @@
<?php if(isset($suhosinInfo)):?>
<div class='alert alert-info'><?php echo $suhosinInfo?></div>
<?php else:?>
<form target='hiddenwin' method='post' class='form-condensed'>
<table class='table table-fixed active-disabled table-custom' id='showData'>
<thead>
<tr>
<th class='w-50px'><?php echo $lang->lineNumber?></th>
<th class='w-70px'><?php echo $lang->testcase->id?></th>
<th><?php echo $lang->testcase->title?></th>
<?php if(!empty($branches)):?>
<th class='w-100px'><?php echo $lang->testcase->branch?></th>
<?php endif;?>
<th class='w-100px'><?php echo $lang->testcase->module?></th>
<th class='w-120px'><?php echo $lang->testcase->story?></th>
<th class='w-70px'><?php echo $lang->testcase->pri?></th>
<th class='w-100px'><?php echo $lang->testcase->type?></th>
<th><?php echo $lang->testcase->stage?></th>
<th class='w-80px'><?php echo $lang->testcase->keywords?></th>
<th><?php echo $lang->testcase->precondition?></th>
<th class='w-300px'>
<table class='w-p100 table-borderless'>
<tr>
<th><?php echo $lang->testcase->stepDesc?></th>
<th><?php echo $lang->testcase->stepExpect?></th>
</tr>
</table>
</th>
</tr>
</thead>
<tbody>
<?php
$insert = true;
$addID = 1;
?>
<?php foreach($caseData as $key => $case):?>
<?php if(empty($case->title)) continue;?>
<tr valign='top' align='center'>
<td><?php echo $key;?></td>
<td>
<?php
if(!empty($case->id))
{
echo $case->id . html::hidden("id[$key]", $case->id);
$insert = false;
}
else
{
echo "<sub class='gray' style='vertical-align:sub;'>{$lang->testcase->new}</sub>";
}
echo html::hidden("product[$key]", $productID);
?>
</td>
<td><?php echo html::input("title[$key]", htmlspecialchars($case->title, ENT_QUOTES), "class='form-control'")?></td>
<?php if(!empty($branches)):?>
<td class='text-left' style='overflow:visible'><?php echo html::select("branch[$key]", $branches, (isset($case->branch) and $case->branch !== '') ? $case->branch : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->branch : $branch), "class='form-control chosen'")?></td>
<?php endif;?>
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("story[$key]", $stories, isset($case->story) ? $case->story : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->story : ''), "class='form-control chosen'")?></td>
<td><?php echo html::select("pri[$key]", $lang->testcase->priList, isset($case->pri) ? $case->pri : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->pri : ''), "class='form-control'")?></td>
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, $case->type, "class='form-control'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control' autocomplete='off'")?></td>
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?></td>
<td>
<?php if(isset($stepData[$key]['desc'])):?>
<table class='w-p100 bd-0'>
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
<?php if(empty($desc['content'])) continue;?>
<tr class='step'>
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
<td><?php echo html::textarea("desc[$key][$id]", htmlspecialchars($desc['content']), "class='form-control'")?></td>
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlspecialchars($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
</tr>
<?php endforeach;?>
</table>
<div id="mainContent" class="main-content">
<form target='hiddenwin' method='post'>
<table class='table table-fixed active-disabled table-custom' id='showData'>
<thead>
<tr>
<th class='w-50px'><?php echo $lang->lineNumber?></th>
<th class='w-70px'><?php echo $lang->testcase->id?></th>
<th><?php echo $lang->testcase->title?></th>
<?php if(!empty($branches)):?>
<th class='w-100px'><?php echo $lang->testcase->branch?></th>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo !empty($branches) ? 12 : 11;?>' class='text-center'>
<?php
if(!$insert)
{
include '../../common/view/noticeimport.html.php';
echo "<button type='button' data-toggle='myModal' class='btn btn-primary'>{$lang->save}</button>";
}
else
{
echo html::submitButton();
}
echo ' &nbsp; ' . html::backButton()
?>
</td>
</tr>
</tfoot>
</table>
</form>
<th class='w-100px'><?php echo $lang->testcase->module?></th>
<th class='w-120px'><?php echo $lang->testcase->story?></th>
<th class='w-70px'><?php echo $lang->testcase->pri?></th>
<th class='w-100px'><?php echo $lang->testcase->type?></th>
<th><?php echo $lang->testcase->stage?></th>
<th class='w-80px'><?php echo $lang->testcase->keywords?></th>
<th><?php echo $lang->testcase->precondition?></th>
<th class='w-300px'>
<table class='w-p100 table-borderless'>
<tr>
<th><?php echo $lang->testcase->stepDesc?></th>
<th><?php echo $lang->testcase->stepExpect?></th>
</tr>
</table>
</th>
</tr>
</thead>
<tbody>
<?php
$insert = true;
$addID = 1;
?>
<?php foreach($caseData as $key => $case):?>
<?php if(empty($case->title)) continue;?>
<tr valign='top' align='center'>
<td><?php echo $key;?></td>
<td>
<?php
if(!empty($case->id))
{
echo $case->id . html::hidden("id[$key]", $case->id);
$insert = false;
}
else
{
echo "<sub class='gray' style='vertical-align:sub;'>{$lang->testcase->new}</sub>";
}
echo html::hidden("product[$key]", $productID);
?>
</td>
<td><?php echo html::input("title[$key]", htmlspecialchars($case->title, ENT_QUOTES), "class='form-control'")?></td>
<?php if(!empty($branches)):?>
<td class='text-left' style='overflow:visible'><?php echo html::select("branch[$key]", $branches, (isset($case->branch) and $case->branch !== '') ? $case->branch : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->branch : $branch), "class='form-control chosen'")?></td>
<?php endif;?>
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("story[$key]", $stories, isset($case->story) ? $case->story : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->story : ''), "class='form-control chosen'")?></td>
<td><?php echo html::select("pri[$key]", $lang->testcase->priList, isset($case->pri) ? $case->pri : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->pri : ''), "class='form-control'")?></td>
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, $case->type, "class='form-control'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control' autocomplete='off'")?></td>
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?></td>
<td>
<?php if(isset($stepData[$key]['desc'])):?>
<table class='w-p100 bd-0'>
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
<?php if(empty($desc['content'])) continue;?>
<tr class='step'>
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
<td><?php echo html::textarea("desc[$key][$id]", htmlspecialchars($desc['content']), "class='form-control'")?></td>
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlspecialchars($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
</tr>
<?php endforeach;?>
</table>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo !empty($branches) ? 12 : 11;?>' class='text-center'>
<?php
if(!$insert)
{
include '../../common/view/noticeimport.html.php';
echo "<button type='button' data-toggle='myModal' class='btn btn-primary btn-wide'>{$lang->save}</button>";
}
else
{
echo html::submitButton('', '', 'btn btn-primary btn-wide');
}
echo ' &nbsp; ' . html::backButton('', '', 'btn btn-wide')
?>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
<?php endif;?>
<script>
$(function(){affix('#showData thead')})
@@ -120,7 +122,7 @@ function affix(obj)
$('.active-disabled ' + obj + ' th').each(function(i){$('#headerClone ' + obj + ' th').eq(i).width($(this).width())});
first = false;
}
else if(scroH<fixH)
else if(scroH<fixH)
{
$("#headerClone").remove();
first = true;
+23 -25
View File
@@ -19,31 +19,29 @@ function closeWindow()
}
}
</script>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['export']);?></span>
<strong><?php echo $lang->testcase->exportTemplet;?></strong>
<div class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->testcase->exportTemplet;?></h2>
</div>
</div>
<form class='form-condensed' method='post' target='hiddenwin' onsubmit='setDownloading();' style='padding: 40px 5%'>
<table class='w-p100'>
<tr>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->testcase->num;?></span>
<?php
<form method='post' target='hiddenwin' onsubmit='setDownloading();' style='padding: 40px 5%'>
<table class='w-p100'>
<tr>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->testcase->num;?></span>
<?php
echo html::input('num', '10', "class='form-control' autocomplete='off'");
?>
</div>
</td>
<td class='w-100px'>
<?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', "class='form-control'");?>
</td>
<td>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
?>
</div>
</td>
<td class='w-100px'>
<?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', "class='form-control'");?>
</td>
<td>
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
</td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
+6 -3
View File
@@ -1,6 +1,9 @@
<?php include '../../common/view/header.lite.html.php';?>
<div class='container mw-600px'>
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin' style="padding:30px">
<div class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->testcase->importFile;?></h2>
</div>
<form method='post' enctype='multipart/form-data' target='hiddenwin' style="padding:30px">
<table class='table table-form'>
<tr>
<td align='center'>
@@ -10,7 +13,7 @@
<?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', "class='form-control'");?>
</td>
<td>
<?php echo html::submitButton();?>
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
</td>
</tr>
</table>
+80 -78
View File
@@ -5,92 +5,94 @@
<?php if(isset($suhosinInfo)):?>
<div class='alert alert-info'><?php echo $suhosinInfo?></div>
<?php else:?>
<form target='hiddenwin' method='post' class='form-condensed'>
<table class='table table-fixed active-disabled table-custom'>
<thead>
<tr>
<th class='w-70px'><?php echo $lang->testcase->id?></th>
<th><?php echo $lang->testcase->title?></th>
<th class='w-100px'><?php echo $lang->testcase->module?></th>
<th class='w-70px'><?php echo $lang->testcase->pri?></th>
<th class='w-100px'><?php echo $lang->testcase->type?></th>
<th><?php echo $lang->testcase->stage?></th>
<th class='w-80px'><?php echo $lang->testcase->keywords?></th>
<th><?php echo $lang->testcase->precondition?></th>
<th class='w-300px'>
<table class='w-p100 table-borderless'>
<tr>
<th><?php echo $lang->testcase->stepDesc?></th>
<th><?php echo $lang->testcase->stepExpect?></th>
</tr>
</table>
</th>
</tr>
</thead>
<tbody>
<?php $insert = true;?>
<?php foreach($caseData as $key => $case):?>
<?php if(empty($case->title)) continue;?>
<?php if(!empty($case->id) and !isset($cases[$case->id])) $case->id = 0;?>
<tr valign='top' align='center'>
<td>
<?php
if(!empty($case->id))
{
echo $case->id . html::hidden("id[$key]", $case->id);
$insert = false;
}
else
{
echo $key . " <sub class='gray' style='vertical-align:sub;'>{$lang->testcase->new}</sub>";
}
echo html::hidden("lib[$key]", $libID);
?>
</td>
<td><?php echo html::input("title[$key]", $case->title, "class='form-control' style='margin-top:2px' autocomplete='off'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : (!empty($case->id) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?></td>
<td><?php echo html::select("pri[$key]", $lang->testcase->priList, isset($case->pri) ? $case->pri : (!empty($case->id) ? $cases[$case->id]->pri : ''), "class='form-control'")?></td>
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, isset($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control' autocomplete='off'")?></td>
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?></td>
<td>
<?php if(isset($stepData[$key]['desc'])):?>
<table class='w-p100 bd-0'>
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
<?php if(empty($desc['content'])) continue;?>
<tr class='step'>
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
<td><?php echo html::textarea("desc[$key][$id]", htmlspecialchars($desc['content']), "class='form-control'")?></td>
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlspecialchars($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
</tr>
<?php endforeach;?>
</table>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='9' class='text-center'>
<div id="mainContent" class="main-content">
<form target='hiddenwin' method='post'>
<table class='table table-fixed active-disabled table-custom'>
<thead>
<tr>
<th class='w-70px'><?php echo $lang->testcase->id?></th>
<th><?php echo $lang->testcase->title?></th>
<th class='w-100px'><?php echo $lang->testcase->module?></th>
<th class='w-70px'><?php echo $lang->testcase->pri?></th>
<th class='w-100px'><?php echo $lang->testcase->type?></th>
<th><?php echo $lang->testcase->stage?></th>
<th class='w-80px'><?php echo $lang->testcase->keywords?></th>
<th><?php echo $lang->testcase->precondition?></th>
<th class='w-300px'>
<table class='w-p100 table-borderless'>
<tr>
<th><?php echo $lang->testcase->stepDesc?></th>
<th><?php echo $lang->testcase->stepExpect?></th>
</tr>
</table>
</th>
</tr>
</thead>
<tbody>
<?php $insert = true;?>
<?php foreach($caseData as $key => $case):?>
<?php if(empty($case->title)) continue;?>
<?php if(!empty($case->id) and !isset($cases[$case->id])) $case->id = 0;?>
<tr valign='top' align='center'>
<td>
<?php
if(!$insert)
if(!empty($case->id))
{
include '../../common/view/noticeimport.html.php';
echo "<button type='button' data-toggle='myModal' class='btn btn-primary'>{$lang->save}</button>";
echo $case->id . html::hidden("id[$key]", $case->id);
$insert = false;
}
else
{
echo html::submitButton();
echo $key . " <sub class='gray' style='vertical-align:sub;'>{$lang->testcase->new}</sub>";
}
echo ' &nbsp; ' . html::backButton()
echo html::hidden("lib[$key]", $libID);
?>
</td>
<td><?php echo html::input("title[$key]", $case->title, "class='form-control' style='margin-top:2px' autocomplete='off'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : (!empty($case->id) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?></td>
<td><?php echo html::select("pri[$key]", $lang->testcase->priList, isset($case->pri) ? $case->pri : (!empty($case->id) ? $cases[$case->id]->pri : ''), "class='form-control'")?></td>
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, isset($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control' autocomplete='off'")?></td>
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?></td>
<td>
<?php if(isset($stepData[$key]['desc'])):?>
<table class='w-p100 bd-0'>
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
<?php if(empty($desc['content'])) continue;?>
<tr class='step'>
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
<td><?php echo html::textarea("desc[$key][$id]", htmlspecialchars($desc['content']), "class='form-control'")?></td>
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlspecialchars($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
</tr>
<?php endforeach;?>
</table>
<?php endif;?>
</td>
</tr>
</tfoot>
</table>
</form>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='9' class='text-center'>
<?php
if(!$insert)
{
include '../../common/view/noticeimport.html.php';
echo "<button type='button' data-toggle='myModal' class='btn btn-primary btn-wide'>{$lang->save}</button>";
}
else
{
echo html::submitButton('', '', 'btn btn-primary btn-wide');
}
echo ' &nbsp; ' . html::backButton('', '', 'btn btn-wide')
?>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
<?php endif;?>
<script>
$(function(){affix('thead')})
@@ -108,7 +110,7 @@ function affix(obj)
$('.active-disabled ' + obj + ' th').each(function(i){$('#headerClone ' + obj + ' th').eq(i).width($(this).width())});
first = false;
}
else if(scroH<fixH)
else if(scroH<fixH)
{
$("#headerClone").remove();
first = true;