show query in header

This commit is contained in:
byte[] 2019-12-07 16:55:56 -05:00
parent 54c6085ddf
commit a4197ee8c3
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
= cond do = cond do
- Enum.any?(@images) -> - Enum.any?(@images) ->
= render PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: @tags, images: @images, route: fn p -> Routes.search_path(@conn, :index, p) end, scope: scope(@conn) = render PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: @tags, images: @images, header: "Searching for #{@conn.params["q"]}", route: fn p -> Routes.search_path(@conn, :index, p) end, scope: scope(@conn)
- assigns[:error] -> - assigns[:error] ->
p p
' Oops, there was an error evaluating your query: ' Oops, there was an error evaluating your query:

View file

@ -1,3 +1,3 @@
= render PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: [{@tag, @body, @dnp_entries}], images: @images, scope: [q: @search_query] = render PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: [{@tag, @body, @dnp_entries}], images: @images, header: "Images tagged #{@tag.name}", scope: [q: @search_query]
= render PhilomenaWeb.SearchView, "_form.html", conn: @conn = render PhilomenaWeb.SearchView, "_form.html", conn: @conn