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

View file

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

View file

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