mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-07 13:38:12 -08:00
chore: get overview page to show without errors
This commit is contained in:
parent
650a91ca62
commit
589c0f7e11
7 changed files with 31 additions and 16 deletions
|
|
@ -42,15 +42,15 @@ module Dashboard
|
|||
private
|
||||
|
||||
def overview_link(district_slug:, school_slug:, academic_year_range:)
|
||||
"/districts/#{district_slug}/schools/#{school_slug}/overview?year=#{academic_year_range}"
|
||||
"/dashboard/districts/#{district_slug}/schools/#{school_slug}/overview?year=#{academic_year_range}"
|
||||
end
|
||||
|
||||
def analyze_link(district_slug:, school_slug:, academic_year_range:)
|
||||
"/districts/#{district_slug}/schools/#{school_slug}/analyze?year=#{academic_year_range}&academic_years=#{academic_year_range}"
|
||||
"/dashboard/districts/#{district_slug}/schools/#{school_slug}/analyze?year=#{academic_year_range}&academic_years=#{academic_year_range}"
|
||||
end
|
||||
|
||||
def browse_link(district_slug:, school_slug:, academic_year_range:)
|
||||
"/districts/#{district_slug}/schools/#{school_slug}/browse/teachers-and-leadership?year=#{academic_year_range}"
|
||||
"/dashboard/districts/#{district_slug}/schools/#{school_slug}/browse/teachers-and-leadership?year=#{academic_year_range}"
|
||||
end
|
||||
|
||||
def active?(path:)
|
||||
|
|
|
|||
|
|
@ -7,13 +7,6 @@ module Dashboard
|
|||
NIL_SCORE = Score.new(average: nil, meets_teacher_threshold: false, meets_student_threshold: false,
|
||||
meets_admin_data_threshold: false)
|
||||
|
||||
enum group: {
|
||||
all_students: 0,
|
||||
race: 1,
|
||||
grade: 2,
|
||||
gender: 3
|
||||
}
|
||||
|
||||
def in_zone?(zone:)
|
||||
return false if average.nil? || average.is_a?(Float) && average.nan?
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
<div class="subcategory-card__benchmark-item">
|
||||
<svg class="subcategory-card__circle" width="24" height="24" xmlns="http://www.w3.org/2000/svg" <%= "data-bs-toggle=popover" if subcategory_card.insufficient_data? %> data-bs-placement="top" data-bs-content="This subcategory is not displayed due to limited availability of school admin data and/or low survey response rates.">
|
||||
<svg class="subcategory-card__circle"
|
||||
width="24"
|
||||
height="24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
<%= "data-bs-toggle=popover" if subcategory_card.insufficient_data? %>
|
||||
data-bs-placement="top"
|
||||
data-bs-content="This subcategory is not displayed due to limited availability of school admin data and/or low survey response rates.">
|
||||
<use class="harvey-ball harvey-ball--<%= subcategory_card.color %>" xlink:href="#<%= subcategory_card.harvey_ball_icon %>"></use>
|
||||
</svg>
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<%= render partial: "quality_framework_indicators", locals: { category_presenters: @category_presenters } %>
|
||||
|
||||
<div class="overall-response-rate-row">
|
||||
<%= render partial: "response_rate", locals: {response_rate_presenter: @student_response_rate_presenter} %>
|
||||
<%= render partial: "response_rate", locals: {response_rate_presenter: @teacher_response_rate_presenter} %>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
<div class="container">
|
||||
<div class="row py-4 justify-content-between align-items-center">
|
||||
<div class="col d-flex justify-content-start align-items-center">
|
||||
<%= link_to image_tag('logo.svg', alt: 'School Quality Measures Dashboard', size: "100x100"), welcome_path, class: 'me-7' %>
|
||||
<%= link_to image_tag('dashboard/logo.svg', alt: 'School Quality Measures Dashboard', size: "100x100"), welcome_path, class: 'me-7' %>
|
||||
<a class="sub-header-3 link me-4 <%= link_weight(path: 'overview') %>" href="<%= link_to_overview(district: @district, school: @school, academic_year: @academic_year) %>">Overview</a>
|
||||
<a class="sub-header-3 link me-4 <%= link_weight(path: 'browse') %>" href="<%= link_to_browse(district: @district, school: @school, academic_year: @academic_year) %>">Browse</a>
|
||||
<a class="sub-header-3 link <%= link_weight(path: 'analyze') %>" href="<%= link_to_analyze(district: @district, school: @school, academic_year: @academic_year) %>">Analyze</a>
|
||||
</div>
|
||||
|
||||
<div class="col d-flex justify-content-end">
|
||||
<select id="select-district" class="form-select" name="district" <%= District.count == 1 ? "hidden": "" %> >
|
||||
<select id="select-district" class="form-select" name="district" <%= @districts.size == 1 ? "hidden": "" %> >
|
||||
<% @districts.each do |district| %>
|
||||
<option class="district-options" value="<%= district_url_for(district: district, academic_year: @academic_year) %>" <%= @district.slug == district.slug ? "selected" : nil %>>
|
||||
<%= district.name %>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,22 @@
|
|||
<%= render partial: 'layouts/dashboard/google_analytics', locals: { google_analytics_id: @google_analytics_id } %>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<%= render partial: 'layouts/dashboard/header' %>
|
||||
</div>
|
||||
|
||||
<div class="bg-color-light-blue">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col mt-7">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= render partial: 'layouts/dashboard/footer' %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Dashboard::Engine.routes.draw do
|
|||
resources :districts do
|
||||
resources :schools, only: %i[index show] do
|
||||
resources :overview, only: [:index]
|
||||
# resources :categories, only: [:show], path: "browse"
|
||||
# resources :analyze, only: [:index]
|
||||
resources :categories, only: [:show], path: "browse"
|
||||
resources :analyze, only: [:index]
|
||||
end
|
||||
end
|
||||
get "/welcome", to: "home#index"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue