Fixed bootstrap table and label classes (mainly the danger ones)

This commit is contained in:
Alex Russell 2013-08-01 16:37:21 +01:00
parent 62071c6d86
commit 9bb21fc01a
3 changed files with 10 additions and 10 deletions

View file

@ -10,7 +10,7 @@
switch($build->getStatus())
{
case 0:
$cls = 'info';
$cls = 'active';
$subcls = 'info';
$status = 'Pending';
@ -29,8 +29,8 @@ switch($build->getStatus())
break;
case 3:
$cls = 'error';
$subcls = 'important';
$cls = 'danger';
$subcls = 'danger';
$status = 'Failed';
break;
}
@ -53,7 +53,7 @@ switch($build->getStatus())
?>
<?php
foreach($plugins as $plugin => $pluginstatus):
$subcls = $pluginstatus?'label label-success':'label label-important';
$subcls = $pluginstatus?'label label-success':'label label-danger';
?> <span class='<?= $subcls ?>'><?php print $this->Build()->formatPluginName($plugin); ?></span> <?php endforeach; ?>
<br style='clear:both;' />
</td>
@ -71,4 +71,4 @@ switch($build->getStatus())
</div>
</td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>

View file

@ -60,12 +60,12 @@ foreach($projects as $projectId => $project):
switch($project['lastbuildstatus'])
{
case 0:
$cls = 'info';
$cls = 'active';
$status = 'Pending';
break;
case 1:
$cls = 'warning';
$cls = 'danger';
$status = 'Running';
break;
@ -81,7 +81,7 @@ foreach($projects as $projectId => $project):
}
$health = ($project['health'] <= 0 ? 'Stormy': ($project['successes'] < $project['count']? 'Overcast': 'Sunny'));
$subcls = ($project['health'] <= 0 ? 'important': ($project['successes'] < $project['count']? 'warning': 'success'));
$subcls = ($project['health'] <= 0 ? 'danger': ($project['successes'] < $project['count']? 'warning': 'success'));
?>
<tr class="<?php print $cls; ?>">
<td>
@ -111,4 +111,4 @@ foreach($projects as $projectId => $project):
<td><?= $project['successes'] ?>/<?= $project['failures'] ?></td>
<td><a class="btn btn-default btn-small" href='<?= PHPCI_URL ?>project/build/<?= $projectId ?>'>build now &raquo;</a></td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>

View file

@ -60,4 +60,4 @@
</tbody>
</table>
</div>
</div>
</div>