2019-11-15 16:40:10 +01:00
|
|
|
= cond do
|
2024-04-08 18:46:54 +02:00
|
|
|
- Enum.any?(@images) or override_display(@tags) ->
|
2024-06-06 22:28:35 +02:00
|
|
|
= render PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: @tags, images: @images, header: "Searching for #{@conn.params["q"]}", route: fn p -> ~p"/search?#{p}" end, scope: scope(@conn)
|
2019-12-08 06:12:23 +01:00
|
|
|
|
2019-11-15 16:40:10 +01:00
|
|
|
- assigns[:error] ->
|
2021-12-12 18:39:23 +01:00
|
|
|
.block.block--fixed.block--danger
|
|
|
|
' Oops, there was an error parsing your query! Check for mistakes like mismatched parentheses. The error was:
|
2019-11-15 16:40:10 +01:00
|
|
|
pre = assigns[:error]
|
2019-12-08 06:12:23 +01:00
|
|
|
|
|
|
|
- blank?(@conn.params["q"]) ->
|
|
|
|
/ Don't render anything.
|
|
|
|
|
2019-11-15 16:40:10 +01:00
|
|
|
- true ->
|
|
|
|
p
|
2019-11-18 15:14:26 +01:00
|
|
|
' No images found!
|
|
|
|
|
2021-12-12 18:39:23 +01:00
|
|
|
= render PhilomenaWeb.SearchView, "_form.html", conn: @conn
|