当然,也可以这么改,如下
修改
<?php if($this->config->global->flow != 'onlyTest'):?>
<?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'");
?>
<?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'");?>
<?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'");?>
<?php endif;?>
</div>
</td>
</tr>
<?php endif;?>
为
<?php if($this->config->global->flow != 'onlyTest'):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
<tr>
<th><?php echo $lang->bug->isHistory;?></th>
<td>
<div class='input-group' >
<?php echo html::select('isHistory', $lang->bug->isHistoryList, $isHistory, "class='form-control'");?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->channel;?></span>
<?php echo html::select('channel', $lang->bug->channelList, $channel, "class='form-control'");?>
</div>
</td>
<td>
<div class='input-group' id='bugTypeInputGroup'>
<span class='input-group-addon'><?php echo $lang->bug->type;?></span>
<?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'");
?>
<?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'");?>
<?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'");?>
<?php endif;?>
</div>
</td>
</tr>
<?php endif;?>
修改效果
修改zentaopms/module/bug/view/edit.html.php
如下图,在合适的位置插入以下代码
js::set('isHistory' , $bug->isHistory);
js::set('channel' , $bug->channel);
如下图,在合适的位置插入以下代码
<tr>
<th><?php echo $lang->bug->isHistory;?></th>
<td><?php echo html::select('isHistory', $lang->bug->isHistoryList, $bug->isHistory, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->bug->channel;?></th>
<td><?php echo html::select('channel', $lang->bug->channelList, $bug->channel, "class='form-control'");?></td>
</tr>
修改效果
修改zentaopms/module/bug/view/resolve.html.php
如下图,在合适的位置插入以下代码
<tr>
<th class='w-80px'><?php echo $lang->bug->isHistory;?></th>
<td class='w-p35-f'><?php echo html::select('isHistory', $lang->bug->isHistoryList, $bug->isHistory, "class='form-control' ");?></td>
</tr>
修改效果
修改zentaopms/module/bug/view/view.html.php
在合适位置插入以下代码
<tr>
<th><?php echo '历史遗留?'?></th>
<td><span class='<?php echo 'isHistory' . zget($lang->bug->isHistoryList, $bug->isHistory);?>'><?php echo zget($lang->bug->isHistoryList, $bug->isHistory)?></span></td>
</tr>
<tr>
<th><?php echo $lang->bug->channel;?></th>
<td><span class='<?php echo 'channel' . zget($lang->bug->channelList, $bug->channel);?>'><?php echo zget($lang->bug->channelList, $bug->channel)?></span></td>
</tr>
修改效果