mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
show accurate year
This commit is contained in:
parent
9d81c39f54
commit
3d238df1c7
2 changed files with 7 additions and 2 deletions
|
|
@ -13,7 +13,8 @@ class CategoriesController < ApplicationController
|
|||
def show
|
||||
district = @school.district
|
||||
authenticate(district.name.downcase, "#{district.name.downcase}!")
|
||||
@school_category = SchoolCategory.for(@school, @category).first
|
||||
@year = (params[:year] || "2017").to_i
|
||||
@school_category = SchoolCategory.for(@school, @category).in(@year).first
|
||||
@child_school_categories = SchoolCategory.for_parent_category(@school, @category).valid
|
||||
@questions = @category.questions
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@
|
|||
=# link_to(image_tag(@district.logo), @district) if @district.present?
|
||||
%h2= link_to @school.name, @school
|
||||
= simple_format(@school.description)
|
||||
%p Data from 2016-2017 school year.
|
||||
- if @year.present?
|
||||
%p
|
||||
Data from
|
||||
= "#{@year - 1}-#{@year}"
|
||||
school year.
|
||||
- if @school.district.present?
|
||||
%p
|
||||
%strong District:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue