- blue = "#4886C2"
- green = "#7FEC8D"
- red = "#E44646"
- orange = "#F49C54"
- grey = "#A6A6A6"
= 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'
.btn-group{role: "group"}
%button.btn.btn-sm.btn-outline-secondary.dropdown-toggle#title-actions{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button"}
.fa.fa-envelope-o.pr-1
Send email
.dropdown-menu.dropdown-menu-right{"aria-labelledby" => "title-actions"}
= link_to 'Create message (confirmed or accepted applicants)', new_manage_message_path(type: 'bulk', recipients: ["school::#{@school.id}"]), class: 'dropdown-item'
.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
.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.mb-4
.col-7
%h4.border-bottom.pb-2.mb-4 Today's Activity
= area_chart todays_activity_data_manage_dashboard_index_path(school_id: @school.id), colors: [blue, green, red, grey]
.col-5
%h4.border-bottom.pb-2.mb-4 Total Distribution
= pie_chart @school.questionnaires.group('acc_status').count
.row.mt-2.mb-4
.col
%h4.border-bottom.pb-2.mb-4 Confirmation Activity
= area_chart confirmation_activity_data_manage_dashboard_index_path(school_id: @school.id), colors: [green, red], library: { legend: { enabled: false } }
.row.mt-2
.col
%h4.pb-0
Questionnaires
%small.text-muted (#{@school.questionnaires.count} total, #{@school.questionnaires.count { |q| q.checked_in? }} checked in)
%table.table
%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"