Design changes, it's a bit cleaner...
This commit is contained in:
@@ -10,15 +10,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
public function getLabelColorAttribute() {
|
||||
public function getColorAttribute() {
|
||||
switch ($this->status) {
|
||||
case 1:
|
||||
return 'label-warning';
|
||||
return 'warning';
|
||||
case 2:
|
||||
case 3:
|
||||
return 'label-info';
|
||||
return 'info';
|
||||
case 4:
|
||||
return 'label-success';
|
||||
return 'success';
|
||||
}
|
||||
}
|
||||
|
||||
public function getIconAttribute() {
|
||||
switch ($this->status) {
|
||||
case 1:
|
||||
return 'glyphicon-flag';
|
||||
case 2:
|
||||
return 'glyphicon-certificate';
|
||||
case 3:
|
||||
return 'glyphicon-eye-open';
|
||||
case 4:
|
||||
return 'glyphicon-ok';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
<?php
|
||||
$incidentDate = Carbon::now()->subDays($i);
|
||||
$incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->orderBy('created_at', 'desc')->get();
|
||||
?>
|
||||
<h2>{{ $incidentDate->format('jS M, Y') }}</h2>
|
||||
<hr />
|
||||
@if($incidents->count() === 0)
|
||||
<p>No incidents reported.</p>
|
||||
@else
|
||||
@foreach($incidents as $incident)
|
||||
<h3><span class='label {{ $incident->labelColor }}'>{{ $incident->humanStatus }}</span> {{ $incident->name }}</h3>
|
||||
<p>{{ $incident->message }}</p>
|
||||
<h4><small><time>{{ $incident->created_at->format('H:i:s A') }} {{ Config::get('app.timezone') }}</time></small></h4>
|
||||
@endforeach
|
||||
@endif
|
||||
<li class='list-group-item'>
|
||||
<?php
|
||||
$incidentDate = Carbon::now()->subDays($i);
|
||||
$incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->orderBy('created_at', 'desc')->get();
|
||||
?>
|
||||
<h3 class='list-group-item-heading'>{{ $incidentDate->format('jS M, Y') }}</h3>
|
||||
<hr />
|
||||
|
||||
@unless($incidents->count() > 0)
|
||||
<p>No incidents reported.</p>
|
||||
@endunless
|
||||
|
||||
@foreach($incidents as $incident)
|
||||
<span class='badge badge-{{ $incident->color }}'><i class='glyphicon {{ $incident->icon }}'></i></span>
|
||||
<h4>{{ $incident->name }}</h4>
|
||||
<time>{{ $incident->created_at->format('H:i:s A') }} {{ Config::get('app.timezone') }}</time>
|
||||
<p>{{ $incident->message }}</p>
|
||||
@endforeach
|
||||
</li>
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
</ul>
|
||||
|
||||
<h1>Past Incidents</h1>
|
||||
<ul class='list-group'>
|
||||
@for($i=0; $i <= 7; $i++)
|
||||
@include('incident', array('i', $i))
|
||||
@endfor
|
||||
</ul>
|
||||
@stop
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
body {
|
||||
color: #333333;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
.alert {
|
||||
@@ -14,35 +15,38 @@ body {
|
||||
border-color: #46b8da;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
&.alert-danger {
|
||||
background: #D91E18;
|
||||
border-color: #CF000F;
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
.list-group {
|
||||
margin-bottom: 20px;
|
||||
padding-left: 0;
|
||||
|
||||
a.list-group-item {
|
||||
color: #030303;
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
margin-bottom: -1px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #95a5a6;
|
||||
border: 1px solid #BDC3C7;
|
||||
|
||||
h4 {
|
||||
h1, h2, h3, h4 {
|
||||
&.list-group-item-heading {
|
||||
color: inherit;
|
||||
margin-top: 0px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
p, time {
|
||||
margin-bottom: 0;
|
||||
line-height: 1.3;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
|
||||
time {
|
||||
color: #6C7A89;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
public/build/css/.gitignore
vendored
1
public/build/css/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
application-*.css
|
||||
33
public/build/css/application-bb5fc830.css
Executable file
33
public/build/css/application-bb5fc830.css
Executable file
@@ -0,0 +1,33 @@
|
||||
body {
|
||||
color: #333333;
|
||||
font-size: 1.4em; }
|
||||
|
||||
.alert.alert-success {
|
||||
background-color: #8DCD8D;
|
||||
border-color: #4cae4c;
|
||||
color: white; }
|
||||
.alert.alert-info {
|
||||
background: #8CD3E8;
|
||||
border-color: #46b8da;
|
||||
color: #FFF; }
|
||||
.alert.alert-danger {
|
||||
background: #D91E18;
|
||||
border-color: #CF000F;
|
||||
color: #FFF; }
|
||||
|
||||
.list-group {
|
||||
margin-bottom: 20px;
|
||||
padding-left: 0; }
|
||||
.list-group .list-group-item {
|
||||
padding: 10px 15px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #BDC3C7; }
|
||||
.list-group .list-group-item h1.list-group-item-heading, .list-group .list-group-item h2.list-group-item-heading, .list-group .list-group-item h3.list-group-item-heading, .list-group .list-group-item h4.list-group-item-heading {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px; }
|
||||
.list-group .list-group-item p, .list-group .list-group-item time {
|
||||
margin-bottom: 0;
|
||||
line-height: 1.3em; }
|
||||
.list-group .list-group-item time {
|
||||
color: #6C7A89;
|
||||
font-weight: bold; }
|
||||
@@ -1,5 +1,6 @@
|
||||
body {
|
||||
color: #333333; }
|
||||
color: #333333;
|
||||
font-size: 1.4em; }
|
||||
|
||||
.alert.alert-success {
|
||||
background-color: #8DCD8D;
|
||||
@@ -9,23 +10,24 @@ body {
|
||||
background: #8CD3E8;
|
||||
border-color: #46b8da;
|
||||
color: #FFF; }
|
||||
.alert.alert-danger {
|
||||
background: #D91E18;
|
||||
border-color: #CF000F;
|
||||
color: #FFF; }
|
||||
|
||||
.list-group {
|
||||
margin-bottom: 20px;
|
||||
padding-left: 0; }
|
||||
.list-group a.list-group-item {
|
||||
color: #030303; }
|
||||
.list-group .list-group-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
margin-bottom: -1px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #95a5a6; }
|
||||
.list-group .list-group-item h4.list-group-item-heading {
|
||||
color: inherit;
|
||||
margin-top: 0px;
|
||||
border: 1px solid #BDC3C7; }
|
||||
.list-group .list-group-item h1.list-group-item-heading, .list-group .list-group-item h2.list-group-item-heading, .list-group .list-group-item h3.list-group-item-heading, .list-group .list-group-item h4.list-group-item-heading {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px; }
|
||||
.list-group .list-group-item p {
|
||||
.list-group .list-group-item p, .list-group .list-group-item time {
|
||||
margin-bottom: 0;
|
||||
line-height: 1.3; }
|
||||
line-height: 1.3em; }
|
||||
.list-group .list-group-item time {
|
||||
color: #6C7A89;
|
||||
font-weight: bold; }
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"css/application.css": "css/application-338fad29.css"
|
||||
"css/application.css": "css/application-bb5fc830.css"
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
body {
|
||||
color: #333333; }
|
||||
color: #333333;
|
||||
font-size: 1.4em; }
|
||||
|
||||
.alert.alert-success {
|
||||
background-color: #8DCD8D;
|
||||
@@ -9,23 +10,24 @@ body {
|
||||
background: #8CD3E8;
|
||||
border-color: #46b8da;
|
||||
color: #FFF; }
|
||||
.alert.alert-danger {
|
||||
background: #D91E18;
|
||||
border-color: #CF000F;
|
||||
color: #FFF; }
|
||||
|
||||
.list-group {
|
||||
margin-bottom: 20px;
|
||||
padding-left: 0; }
|
||||
.list-group a.list-group-item {
|
||||
color: #030303; }
|
||||
.list-group .list-group-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
margin-bottom: -1px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #95a5a6; }
|
||||
.list-group .list-group-item h4.list-group-item-heading {
|
||||
color: inherit;
|
||||
margin-top: 0px;
|
||||
border: 1px solid #BDC3C7; }
|
||||
.list-group .list-group-item h1.list-group-item-heading, .list-group .list-group-item h2.list-group-item-heading, .list-group .list-group-item h3.list-group-item-heading, .list-group .list-group-item h4.list-group-item-heading {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px; }
|
||||
.list-group .list-group-item p {
|
||||
.list-group .list-group-item p, .list-group .list-group-item time {
|
||||
margin-bottom: 0;
|
||||
line-height: 1.3; }
|
||||
line-height: 1.3em; }
|
||||
.list-group .list-group-item time {
|
||||
color: #6C7A89;
|
||||
font-weight: bold; }
|
||||
|
||||
Reference in New Issue
Block a user