From 3ccad334466cb917f724f24768fcd7be3c03efac Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 5 Jul 2018 12:09:50 +0100 Subject: Use contextual classes for the job panels --- app/views/shared/_jobs.html.erb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 } %> -
+ <% panel_class_suffix = if job.finished_at + 'success' + elsif job.expired_at + 'warning' + else + 'danger' + end + %> + +