mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
fix post navigation
This commit is contained in:
parent
2c8a5fd43d
commit
5f9fe0cb98
2 changed files with 6 additions and 1 deletions
|
@ -15,7 +15,7 @@ h2 Search Results
|
|||
= cond do
|
||||
- Enum.any?(@posts) ->
|
||||
- route = fn p -> Routes.post_path(@conn, :index, p) end
|
||||
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @posts, route: route, params: [cq: @conn.params["pq"]], conn: @conn
|
||||
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @posts, route: route, params: [pq: @conn.params["pq"]], conn: @conn
|
||||
|
||||
= for {body, post} <- @posts, post.topic.hidden_from_users == false do
|
||||
= render PhilomenaWeb.PostView, "_post.html", body: body, post: post, conn: @conn
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
= cond do
|
||||
- Enum.any?(@images) ->
|
||||
= 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] ->
|
||||
p
|
||||
' Oops, there was an error evaluating your query:
|
||||
pre = assigns[:error]
|
||||
|
||||
- blank?(@conn.params["q"]) ->
|
||||
/ Don't render anything.
|
||||
|
||||
- true ->
|
||||
p
|
||||
' No images found!
|
||||
|
|
Loading…
Reference in a new issue