preserve hidden param in tag navigation (fixes philomena-dev/philomena#40)

This commit is contained in:
Luna D 2020-10-21 20:03:59 +02:00
parent 60b2c01a71
commit 87eee9b332
No known key found for this signature in database
GPG key ID: 81AF416F2CC36FC8
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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