From 80fe0e234b83f98ce2276da40bf8b8fa7ebf1632 Mon Sep 17 00:00:00 2001 From: differentreality Date: Fri, 12 Jul 2013 19:11:47 +0300 Subject: [PATCH] make attended a button --- app/views/admin/registrations/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/admin/registrations/show.html.haml b/app/views/admin/registrations/show.html.haml index 3253e999..67fceb92 100644 --- a/app/views/admin/registrations/show.html.haml +++ b/app/views/admin/registrations/show.html.haml @@ -31,6 +31,8 @@ - if field == "name" #{registration.last_name} #{registration.first_name} (#{registration.public_name}) + -elsif field == 'attended' + = link_to "#{registration.send(field.to_sym)}", admin_conference_registrations_change_field_path(@conference.short_title, :id => registration.id, :view_field => "#{field}"), :method => :put, ":#{field}" => registration.send(field.to_sym), :class => "btn btn-primary" -elsif (registration.send(field.to_sym).class == TrueClass || registration.send(field.to_sym).class == FalseClass) = link_to "#{registration.send(field.to_sym)}", admin_conference_registrations_change_field_path(@conference.short_title, :id => registration.id, :view_field => "#{field}"), :method => :put, ":#{field}" => registration.send(field.to_sym) - elsif field == 'arrival' || field == 'departure'