= render "layouts/manage/page_title", title: @school.name, subtitle: "School" do
.btn-group
= link_to 'Edit', edit_manage_school_path(@school), class: 'btn btn-sm btn-outline-secondary'
= link_to 'Merge', merge_manage_school_path(@school), class: 'btn btn-sm btn-outline-secondary'
.row
.col-md-6
%h4.border-bottom.pb-2.mb-3 Details
%dl.row
%dt.col-md-4 Name
%dd.col-md-8
= @school.name
%br
%small
= link_to google_maps_link(@school.name), target: '_blank' do
Search in Google Maps
%span.fa.fa-external-link.icon-space-l-half
%dt.col-md-4 Address
%dd.col-md-8
- if @school.address.present?
= @school.address
%br
= @school.full_location
%br
%small
- link = google_maps_link(@school.address, @school.city, @school.state)
= link_to link, target: '_blank' do
Search in Google Maps
%span.fa.fa-external-link.icon-space-l-half
%dt.col-md-4 Bus List
%dd.col-md-8= @school.bus_list ? link_to(@school.bus_list.name, manage_bus_list_path(@school.bus_list)) : '(not assigned)'
.col-md-6
%h4.pb-0 Duplicate Names
%table.table.table-striped
%thead
%tr
%th School Name
%th Date Created
%tbody
- dupes = SchoolNameDuplicate.where(school_id: @school.id)
- dupes.each do |dupe|
%tr
%td= dupe.name
%td= display_datetime(dupe.created_at)
- if dupes.blank?
%tr
%td{colspan: 2}
%em No duplicate names exist for this school.
%p.small.text-muted
%span.fa.fa-info-circle.icon-space-l.icon-space-r-half
If someone attempts to apply using a name above, they'll automatically be converted to this school.
.row.mt-2
.col
%h4.pb-0 Questionnaires
%table.table
%caption #{@school.questionnaires.count} total
%thead
%tr
%th
%th First Name
%th Last Name
%th Email
%th Status
%th Checked In?
%tbody
- @school.questionnaires.order(:acc_status).each do |q|
%tr
%td= link_to ''.html_safe, manage_questionnaire_path(q)
%td= q.first_name
%td= q.last_name
%td= q.email
%td= "#{Questionnaire::POSSIBLE_ACC_STATUS[q.acc_status]}".html_safe
%td= q.checked_in? ? "Yes" : "No"