From b8772c3aad9b29a111aee5177557abf0bf17991d Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sun, 29 Dec 2024 15:47:12 -0800 Subject: [PATCH] Add no results message for alt style searches --- app/views/alt_styles/index.html.haml | 11 ++++++----- app/views/pet_types/index.html.haml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/alt_styles/index.html.haml b/app/views/alt_styles/index.html.haml index 621ab62d..fc13fab5 100644 --- a/app/views/alt_styles/index.html.haml +++ b/app/views/alt_styles/index.html.haml @@ -34,11 +34,12 @@ selected: @species&.human_name, include_blank: "Species…" = f.submit "Go", name: nil -= will_paginate @alt_styles, class: "rainbow-pool-pagination" - -%ul.rainbow-pool-list= render @alt_styles - -= will_paginate @alt_styles, class: "rainbow-pool-pagination" +- if @alt_styles.present? + = will_paginate @alt_styles, class: "rainbow-pool-pagination" + %ul.rainbow-pool-list= render @alt_styles + = will_paginate @alt_styles, class: "rainbow-pool-pagination" +- else + %p.rainbow-pool-no-results We don't have any styles matching that search. - content_for :stylesheets do = stylesheet_link_tag "application/breadcrumbs" diff --git a/app/views/pet_types/index.html.haml b/app/views/pet_types/index.html.haml index ef25ab9a..f7653d34 100644 --- a/app/views/pet_types/index.html.haml +++ b/app/views/pet_types/index.html.haml @@ -34,7 +34,7 @@ %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! + %p.rainbow-pool-no-results We don't have any pets matching that search. - content_for :stylesheets do = stylesheet_link_tag "application/rainbow-pool"