mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08: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 class="col d-flex justify-content-end">
|
||||
<select id="select-district" class="form-select" name="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 %>>
|
||||
<%= district.name %>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
<select id="select-district" class="form-select" name="district" <%= District.count == 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 %>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
|
||||
<select id="select-school" class="ms-3 form-select" name="school">
|
||||
<% @schools.each do |school| %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue