mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 07:28:41 -07:00
Only show district dropdown if there is more than one district in the database
This commit is contained in:
parent
4c2a299510
commit
880da0d8ff
1 changed files with 7 additions and 7 deletions
|
|
@ -9,13 +9,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col d-flex justify-content-end">
|
<div class="col d-flex justify-content-end">
|
||||||
<select id="select-district" class="form-select" name="district">
|
<select id="select-district" class="form-select" name="district" <%= District.count == 1 ? "hidden": "" %> >
|
||||||
<% @districts.each do |district| %>
|
<% @districts.each do |district| %>
|
||||||
<option class="district-options" value="<%= district_url_for(district: district, academic_year: @academic_year) %>" <%= @district.slug == district.slug ? "selected" : nil %>>
|
<option class="district-options" value="<%= district_url_for(district: district, academic_year: @academic_year) %>" <%= @district.slug == district.slug ? "selected" : nil %>>
|
||||||
<%= district.name %>
|
<%= district.name %>
|
||||||
</option>
|
</option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="select-school" class="ms-3 form-select" name="school">
|
<select id="select-school" class="ms-3 form-select" name="school">
|
||||||
<% @schools.each do |school| %>
|
<% @schools.each do |school| %>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue