From 6d7eb739fc0f45bdf58fae5b6d5232e1e3ba7312 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 12 Oct 2014 15:38:15 +0300 Subject: [PATCH] Display confirmed events as green --- app/models/event.rb | 4 ++++ app/views/management/events/_suggestion_group.html.slim | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/event.rb b/app/models/event.rb index c72a556..4776123 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -24,6 +24,10 @@ class Event < ActiveRecord::Base touch :acceptance_notification_sent_at end + def confirmed? + !!confirmed_at + end + private def send_new_event_notification diff --git a/app/views/management/events/_suggestion_group.html.slim b/app/views/management/events/_suggestion_group.html.slim index 8a9166b..7fc2fbc 100644 --- a/app/views/management/events/_suggestion_group.html.slim +++ b/app/views/management/events/_suggestion_group.html.slim @@ -14,7 +14,7 @@ td span.title - = link_to management_event_path(suggestion), title: t(:view), remote: true + = link_to management_event_path(suggestion), title: t(:view), remote: true, class: "#{'text-success' if suggestion.confirmed?}" = suggestion.title br span.subtitle