From a09d0d0a1870e093644e24c4217217bf9e06a3d7 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 16 Dec 2019 01:15:59 -0500 Subject: [PATCH] also filter inclusion on dropdown; explicit not found message --- lib/philomena_web/templates/gallery/index.html.slime | 11 ++++++++--- .../image/_add_to_gallery_dropdown.html.slime | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/philomena_web/templates/gallery/index.html.slime b/lib/philomena_web/templates/gallery/index.html.slime index e53b2626..0528f273 100644 --- a/lib/philomena_web/templates/gallery/index.html.slime +++ b/lib/philomena_web/templates/gallery/index.html.slime @@ -35,8 +35,13 @@ elixir: = pagination .block__content.js-resizable-media-container - = for gallery <- @galleries do - = render PhilomenaWeb.GalleryView, "_gallery.html", gallery: gallery, conn: @conn + = if Enum.any?(@galleries) do + = for gallery <- @galleries do + = render PhilomenaWeb.GalleryView, "_gallery.html", gallery: gallery, conn: @conn + + - else + .block.block--fixed.block--no-margin.block--warning + ' No galleries found! .block__header.block__header--light - = pagination \ No newline at end of file + = pagination diff --git a/lib/philomena_web/templates/image/_add_to_gallery_dropdown.html.slime b/lib/philomena_web/templates/image/_add_to_gallery_dropdown.html.slime index 61bd4b04..9fb9a7c9 100644 --- a/lib/philomena_web/templates/image/_add_to_gallery_dropdown.html.slime +++ b/lib/philomena_web/templates/image/_add_to_gallery_dropdown.html.slime @@ -8,7 +8,7 @@ .block .block__content.add-to-gallery-list .block__list - a.block__list__link.primary href=Routes.gallery_path(@conn, :index, include_image: @image.id) + a.block__list__link.primary href=Routes.gallery_path(@conn, :index, gallery: [include_image: @image.id]) i.fa.fa-table> span.hide-mobile Featured in