|
49 | 49 |
|
50 | 50 | = render "questionnaire_datatable", scope_params: { bus_list_id: @bus_list.id, acc_status: 'rsvp_confirmed' }, columns: %w(link first_name last_name email phone checked_in boarded_bus bus_captain school), order: '13 desc, 15 desc', bulk_actions: false
|
51 | 51 |
|
52 |
| - - if @bus_list.needs_bus_captain |
53 |
| - %h4.mt-4.pb-2 Possible Bus Captains |
54 |
| - %table.table |
55 |
| - %thead |
| 52 | + %h4.mt-4.pb-2 Interested Bus Captains |
| 53 | + %table.table |
| 54 | + %thead |
| 55 | + %tr |
| 56 | + %th |
| 57 | + %th First Name |
| 58 | + %th Last Name |
| 59 | + %th Email |
| 60 | + %th Phone Number |
| 61 | + %th School |
| 62 | + - if current_user.admin? |
| 63 | + %th Actions |
| 64 | + %tbody |
| 65 | + - @bus_list.passengers.select { |q| q.bus_captain_interest }.each do |p| |
56 | 66 | %tr
|
57 |
| - %th |
58 |
| - %th First Name |
59 |
| - %th Last Name |
60 |
| - %th Email |
61 |
| - %th Phone Number |
62 |
| - %th School |
| 67 | + %td= link_to '<i class="fa fa-search"></i>'.html_safe, manage_questionnaire_path(p) |
| 68 | + %td= p.first_name |
| 69 | + %td= p.last_name |
| 70 | + %td= p.email |
| 71 | + %td= phone_link_to p.phone |
| 72 | + %td= link_to p.school.name, manage_school_path(p.school) |
63 | 73 | - if current_user.admin?
|
64 |
| - %th Actions |
65 |
| - %tbody |
66 |
| - - @bus_list.passengers.select { |q| q.bus_captain_interest }.each do |p| |
67 |
| - %tr |
68 |
| - %td= link_to '<i class="fa fa-search"></i>'.html_safe, manage_questionnaire_path(p) |
69 |
| - %td= p.first_name |
70 |
| - %td= p.last_name |
71 |
| - %td= p.email |
72 |
| - %td= phone_link_to p.phone |
73 |
| - %td= link_to p.school.name, manage_school_path(p.school) |
74 |
| - - if current_user.admin? |
75 |
| - %td |
76 |
| - - if p.is_bus_captain? |
77 |
| - = link_to "Remove Bus Captain", toggle_bus_captain_manage_bus_list_path(@bus_list, questionnaire_id: p.id, bus_captain: '0'), method: 'post', class: 'text-danger' |
78 |
| - - else |
79 |
| - = link_to "Make Bus Captain", toggle_bus_captain_manage_bus_list_path(@bus_list, questionnaire_id: p.id, bus_captain: '1'), method: 'post', data: { confirm: 'Are you sure? This will send a confirmation email to the bus captain.' } |
| 74 | + %td |
| 75 | + - if p.is_bus_captain? |
| 76 | + = link_to "Remove Bus Captain", toggle_bus_captain_manage_bus_list_path(@bus_list, questionnaire_id: p.id, bus_captain: '0'), method: 'post', class: 'text-danger' |
| 77 | + - else |
| 78 | + = link_to "Make Bus Captain", toggle_bus_captain_manage_bus_list_path(@bus_list, questionnaire_id: p.id, bus_captain: '1'), method: 'post', data: { confirm: 'Are you sure? This will send a confirmation email to the bus captain.' } |
80 | 79 |
|
81 | 80 | .row.mt-2.mb-4
|
82 | 81 | .col
|
|
0 commit comments