diff --git a/lib/philomena_web/templates/tag/show.html.slime b/lib/philomena_web/templates/tag/show.html.slime index 1cf1cdfa..a8b85c43 100644 --- a/lib/philomena_web/templates/tag/show.html.slime +++ b/lib/philomena_web/templates/tag/show.html.slime @@ -1,3 +1,3 @@ -= render PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: @tags, images: @images, header: "Images tagged #{@tag.name}", scope: [q: @search_query], route: fn p -> Routes.tag_path(@conn, :show, @tag, p) end += render PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: @tags, images: @images, header: "Images tagged #{@tag.name}", scope: scope(@conn), route: fn p -> Routes.tag_path(@conn, :show, @tag, p) end = render PhilomenaWeb.SearchView, "_form.html", conn: @conn diff --git a/lib/philomena_web/views/tag_view.ex b/lib/philomena_web/views/tag_view.ex index 4d567bc7..4c3ba759 100644 --- a/lib/philomena_web/views/tag_view.ex +++ b/lib/philomena_web/views/tag_view.ex @@ -6,8 +6,11 @@ defmodule PhilomenaWeb.TagView do alias Philomena.Elasticsearch alias Philomena.Tags.Tag alias Philomena.Repo + alias PhilomenaWeb.ImageScope import Ecto.Query + def scope(conn), do: ImageScope.scope(conn) + def tag_categories do [[key: "-", value: ""] | Tag.categories()] end