mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Rename 'Dashboard' to overview in page text and also modify 'dashboard' routes to be 'overview'. Finishes #180076071
This commit is contained in:
parent
2753888f11
commit
f553c3c11c
19 changed files with 34 additions and 34 deletions
|
|
@ -1,7 +1,7 @@
|
|||
module HeaderHelper
|
||||
|
||||
def link_to_dashboard(district:, school:, academic_year:)
|
||||
"/districts/#{district.slug}/schools/#{school.slug}/dashboard?year=#{academic_year.range}"
|
||||
def link_to_overview(district:, school:, academic_year:)
|
||||
"/districts/#{district.slug}/schools/#{school.slug}/overview?year=#{academic_year.range}"
|
||||
end
|
||||
|
||||
def link_to_browse(district:, school:, academic_year:)
|
||||
|
|
@ -9,18 +9,18 @@ module HeaderHelper
|
|||
end
|
||||
|
||||
def district_url_for(district:, academic_year:)
|
||||
dashboard_link(district_slug: district.slug, school_slug: district.schools.alphabetic.first.slug, academic_year_range: academic_year.range, uri_path: request.fullpath)
|
||||
overview_link(district_slug: district.slug, school_slug: district.schools.alphabetic.first.slug, academic_year_range: academic_year.range, uri_path: request.fullpath)
|
||||
end
|
||||
|
||||
def school_url_for(school:, academic_year:)
|
||||
dashboard_link(district_slug: school.district.slug, school_slug: school.slug, academic_year_range: academic_year.range, uri_path: request.fullpath)
|
||||
overview_link(district_slug: school.district.slug, school_slug: school.slug, academic_year_range: academic_year.range, uri_path: request.fullpath)
|
||||
end
|
||||
|
||||
def school_mapper(school)
|
||||
{
|
||||
name: school.name,
|
||||
district_id: school.district_id,
|
||||
url: district_school_dashboard_index_path(school.district, school, {year: AcademicYear.first.range})
|
||||
url: district_school_overview_index_path(school.district, school, {year: AcademicYear.first.range})
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -30,9 +30,9 @@ module HeaderHelper
|
|||
|
||||
private
|
||||
|
||||
def dashboard_link(district_slug:, school_slug:, academic_year_range:, uri_path:)
|
||||
if uri_path.include?("dashboard")
|
||||
return "/districts/#{district_slug}/schools/#{school_slug}/dashboard?year=#{academic_year_range}"
|
||||
def overview_link(district_slug:, school_slug:, academic_year_range:, uri_path:)
|
||||
if uri_path.include?("overview")
|
||||
return "/districts/#{district_slug}/schools/#{school_slug}/overview?year=#{academic_year_range}"
|
||||
end
|
||||
"/districts/#{district_slug}/schools/#{school_slug}/browse/teachers-and-leadership?year=#{academic_year_range}"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
module DashboardHelper
|
||||
module OverviewHelper
|
||||
def format_academic_year(ay)
|
||||
years = ay.range.split('-')
|
||||
"#{years.first} – 20#{years.second}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue