You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
909 B
28 lines
909 B
= render 'layouts/legacy/school_header'
|
|
|
|
- if @school_categories.blank?
|
|
.row.pt-3.mt-3
|
|
|
|
.row.pt-3.mt-3
|
|
.col-12.text-center
|
|
%h3 Insufficient Responses
|
|
%p No data is displayed for this school because of insufficient responses.
|
|
- elsif @district.name == "Boston"
|
|
- sorted_categories = @school_categories.sort { |a, b| "#{a.category.path.first.name} #{a.category.name}" <=> "#{b.category.path.first.name} #{b.category.name}" }
|
|
- grouped = sorted_categories.inject({}) do |hash, item|
|
|
- all = hash[item.category.path.first] || []
|
|
- all << item
|
|
- hash[item.category.path.first] = all
|
|
- hash
|
|
- grouped.each do |root_category, group|
|
|
.row.pt-3.mt-3
|
|
.col-12
|
|
%h3= root_category.name
|
|
.row
|
|
= render group
|
|
- else
|
|
.row
|
|
= render @school_categories.sort { |a, b| a.root_index <=> b.root_index }
|
|
|
|
= render "legacy/shared/performance_spectrum"
|