Add "no results" output for Rainbow Pool filters with no results

This commit is contained in:
Emi Matchu 2024-10-11 15:13:22 -07:00
parent 71f0aa4908
commit 7c1b3ca447
2 changed files with 11 additions and 5 deletions

View file

@ -63,3 +63,8 @@
display: flex
justify-content: center
gap: 1em
.rainbow-pool-no-results
margin-block: 1em
text-align: center
font-style: italic

View file

@ -8,11 +8,12 @@
= form.select :species, @species_names, selected: @selected_species&.human_name, include_blank: "Species…"
= form.submit "Go", name: nil
- if @pet_types.present?
= will_paginate @pet_types, class: "rainbow-pool-pagination"
%ui.rainbow-pool-list= render @pet_types
= will_paginate @pet_types, class: "rainbow-pool-pagination"
- else
%p.rainbow-pool-no-results No matching pets found!
- content_for :stylesheets do
= stylesheet_link_tag "application/rainbow-pool"