mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
preserve hidden param in tag navigation (fixes philomena-dev/philomena#40)
This commit is contained in:
parent
60b2c01a71
commit
87eee9b332
2 changed files with 4 additions and 1 deletions
|
@ -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
|
= render PhilomenaWeb.SearchView, "_form.html", conn: @conn
|
||||||
|
|
|
@ -6,8 +6,11 @@ defmodule PhilomenaWeb.TagView do
|
||||||
alias Philomena.Elasticsearch
|
alias Philomena.Elasticsearch
|
||||||
alias Philomena.Tags.Tag
|
alias Philomena.Tags.Tag
|
||||||
alias Philomena.Repo
|
alias Philomena.Repo
|
||||||
|
alias PhilomenaWeb.ImageScope
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
|
|
||||||
|
def scope(conn), do: ImageScope.scope(conn)
|
||||||
|
|
||||||
def tag_categories do
|
def tag_categories do
|
||||||
[[key: "-", value: ""] | Tag.categories()]
|
[[key: "-", value: ""] | Tag.categories()]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue