* If bug severity has customed, show severity value not the key.

This commit is contained in:
chenfeiCF
2018-10-08 14:09:34 +08:00
parent f48a0491a4
commit 3987bac511
7 changed files with 118 additions and 4 deletions
+15
View File
@@ -34,6 +34,17 @@
<th class='c-status'><?php echo $lang->bug->statusAB;?></th>
</tr>
</thead>
<?php
$hasCustomSeverity = false;
foreach($lang->bug->severityList as $severityKey => $severityValue)
{
if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
{
$hasCustomSeverity = true;
break;
}
}
?>
<tbody>
<?php foreach($bugs as $bug):?>
<?php
@@ -46,7 +57,11 @@
<td class='c-pri'><span class='label-pri label-pri-<?php echo $bug->pri?>' title='<?php echo zget($lang->bug->priList, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri)?></span></td>
<?php endif;?>
<td class='c-severity'>
<?php if($hasCustomSeverity):?>
<span class='<?php echo 'label-severity-custom';?>' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span>
<?php else:?>
<span class='label-severity' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'><?php echo $bug->severity;?></span>
<?php endif;?>
</td>
<td class='c-name' style='color: <?php echo $bug->color?>' title='<?php echo $bug->title?>'><?php echo $bug->title?></td>
<td class='c-status' title='<?php echo zget($lang->bug->statusList, $bug->status)?>'>