From 1a068d2d2427c893f56c389c15c23b3c6027fda7 Mon Sep 17 00:00:00 2001 From: William Hale Date: Thu, 6 Aug 2015 23:19:09 -0700 Subject: [PATCH] added Voted? column to admin/events view --- app/views/admin/events/index.html.haml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/views/admin/events/index.html.haml b/app/views/admin/events/index.html.haml index b796da61..0d1d7cf1 100644 --- a/app/views/admin/events/index.html.haml +++ b/app/views/admin/events/index.html.haml @@ -34,6 +34,8 @@ %b Difficulty %th %b State + %th + %b Voted? - @events.each do |event| %tr %td @@ -147,3 +149,14 @@ %span.caret %ul.dropdown-menu{:role=>"menu"} = render 'change_state_dropdown', event: event + + - if event.voted?(event, current_user) + - bgcolor = "" + - else + - bgcolor = "#F7819F" + %td{:style=>"background-color: #{bgcolor}"} + - if event.voted?(event, current_user) + Yes + - else + Not yet +