Labels are now coloured by their status
This commit is contained in:
@@ -9,4 +9,16 @@
|
||||
case 4: return 'Fixed';
|
||||
}
|
||||
}
|
||||
|
||||
public function getLabelColorAttribute() {
|
||||
switch ($this->status) {
|
||||
case 1:
|
||||
return 'label-warning';
|
||||
case 2:
|
||||
case 3:
|
||||
return 'label-info';
|
||||
case 4:
|
||||
return 'label-success';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<p>No incidents reported.</p>
|
||||
@else
|
||||
@foreach($incidents as $incident)
|
||||
<h3>{{ $incident->name }}, <span class='label label-info'>{{ $incident->humanStatus }}</span></h3>
|
||||
<h3><span class='label {{ $incident->labelColor }}'>{{ $incident->humanStatus }}</span> {{ $incident->name }}</h3>
|
||||
<p>{{ $incident->message }}</p>
|
||||
<h4><time>{{ $incident->created_at->format('H:i:s A') }} {{ Config::get('app.timezone') }}</time></h4>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user