aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-07-05 12:09:50 +0100
committerChristopher Baines <mail@cbaines.net>2018-07-05 12:09:50 +0100
commit3ccad334466cb917f724f24768fcd7be3c03efac (patch)
tree6e720b8c896d4b02af4b0c5bbfe4ec96beeeea70 /app
parentd1d225543b7bb9d1b57f0df0884ab9f4d6faaa8d (diff)
downloadgovuk-mini-environment-admin-3ccad334466cb917f724f24768fcd7be3c03efac.tar
govuk-mini-environment-admin-3ccad334466cb917f724f24768fcd7be3c03efac.tar.gz
Use contextual classes for the job panels
Diffstat (limited to 'app')
-rw-r--r--app/views/shared/_jobs.html.erb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/views/shared/_jobs.html.erb b/app/views/shared/_jobs.html.erb
index 5329661..3dd18c6 100644
--- a/app/views/shared/_jobs.html.erb
+++ b/app/views/shared/_jobs.html.erb
@@ -9,7 +9,16 @@
<% jobs.each do |job| %>
<% job_state = job_states.find { |x| x[:id] == job.id } %>
- <div class="panel panel-default">
+ <% panel_class_suffix = if job.finished_at
+ 'success'
+ elsif job.expired_at
+ 'warning'
+ else
+ 'danger'
+ end
+ %>
+
+ <div class="panel panel-<%= panel_class_suffix %>">
<div class="panel-heading" role="tab" id="jobHeading<%= job.id %>">
<h4 class="panel-title">
<a role="button"