Added check_box for presence

This commit is contained in:
raluka 2015-07-02 12:27:28 +02:00
parent 124d275a09
commit e1832732b4

View file

@ -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),