From e1832732b4295434209fff173dadb5b90006fd0a Mon Sep 17 00:00:00 2001 From: raluka Date: Thu, 2 Jul 2015 12:27:28 +0200 Subject: [PATCH] Added check_box for presence --- app/views/admin/registrations/index.html.haml | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/app/views/admin/registrations/index.html.haml b/app/views/admin/registrations/index.html.haml index eb89719a..30b90c8a 100644 --- a/app/views/admin/registrations/index.html.haml +++ b/app/views/admin/registrations/index.html.haml @@ -44,24 +44,14 @@ %td = link_to 'Questions','#', class: 'btn btn-success question-btn', 'data-id' => index, 'data-name' => registration.name %td + = check_box_tag class:'switch-checkbox', + data: { size: "large", + on_color: 'success', + off_color: 'warning', + on_text: 'Present', + off_text: 'Absent' } .btn-group .btn-group - - if registration.attended - - btnclass = 'btn-success' - - else - - btnclass = 'btn-warning' - %button{type: "button", class: "btn #{btnclass} dropdown-toggle", "data-toggle" => "dropdown", "aria-expanded" => "false"} - - if registration.attended - Present - - else - Absent - %span.caret - %ul.dropdown-menu{role: "menu"} - %li - = link_to "Present", present_admin_conference_registration_path(@conference.short_title, id: registration.id), - method: :patch - = link_to "Absent" , absent_admin_conference_registration_path(@conference.short_title, id: registration.id), - method: :patch = link_to 'Edit', edit_admin_conference_registration_path(@conference.short_title, id: registration), method: :get, class: 'btn btn-primary' = link_to 'Delete', admin_conference_registration_path(@conference.short_title, registration),