Issue#690: fixed Attendance Button

This commit is contained in:
raluka 2015-07-10 15:40:11 +02:00
parent 124d275a09
commit 3df77c84f6
3 changed files with 21 additions and 45 deletions

View file

@ -44,24 +44,15 @@
%td
= link_to 'Questions','#', class: 'btn btn-success question-btn', 'data-id' => index, 'data-name' => registration.name
%td
= check_box_tag "#{@conference.short_title}_#{registration.id}", registration.id, registration.attended,
class: 'switch-checkbox', method: :patch,
url: toggle_attendance_admin_conference_registration_path(@conference.short_title, id: registration.id)+"?attended=",
data: { size: "small",
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),