* finish task #3748.

This commit is contained in:
wangyidong
2018-03-20 17:07:07 +08:00
parent 886153a0db
commit dfe9ca2e60
13 changed files with 359 additions and 89 deletions
+31 -7
View File
@@ -32,11 +32,20 @@
</div>
</div>
<?php
$visibleFields = array();
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $this->config->testcase->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->bug->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
$colspan = count($visibleFields) + 3;
$hiddenStory = (isonlybody() and $story) ? ' hidden' : '';
if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
@@ -48,14 +57,29 @@ if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
<th class='w-50px'><?php echo $lang->idAB;?></th>
<th class='w-120px<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo $lang->product->branch;?></th>
<th class='w-180px<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->testcase->module;?></th>
<th class='w-180px<?php echo zget($visibleFields, 'story', ' hidden'); echo $hiddenStory;?>'> <?php echo $lang->testcase->story;?></th>
<th class='w-180px<?php echo zget($visibleFields, 'story', ' hidden'); echo $hiddenStory;?>'>
<?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-100px'><?php echo $lang->testcase->type;?> <span class='required'></span></th>
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->testcase->pri;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'precondition', ' hidden')?>'><?php echo $lang->testcase->precondition;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'> <?php echo $lang->testcase->keywords;?></th>
<th class='w-200px<?php echo zget($visibleFields, 'stage', ' hidden')?>'> <?php echo $lang->testcase->stage;?></th>
<th class='w-70px<?php echo zget($visibleFields, 'review', ' hidden')?>'> <?php echo $lang->testcase->review;?></th>
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
<?php echo $lang->testcase->pri;?>
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
</th>
<th class='w-150px<?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-200px<?php echo zget($visibleFields, 'stage', ' hidden')?>'>
<?php echo $lang->testcase->stage;?>
<?php if(isset($requiredFields['stage'])) echo " <span class='required'></span>";?>
</th>
<th class='w-70px<?php echo zget($visibleFields, 'review', ' hidden')?>'><?php echo $lang->testcase->review;?></th>
</tr>
</thead>