philomena/lib/philomena_web/views/search_view.ex

13 lines
338 B
Elixir
Raw Permalink Normal View History

2019-10-09 01:50:28 +02:00
defmodule PhilomenaWeb.SearchView do
use PhilomenaWeb, :view
2019-11-30 03:33:15 +01:00
def scope(conn), do: PhilomenaWeb.ImageScope.scope(conn)
2019-12-31 00:32:24 +01:00
def hides_images?(conn), do: can?(conn, :hide, %Philomena.Images.Image{})
2024-04-08 18:46:54 +02:00
def override_display([{_tag, _description, dnp_entries}]) do
Enum.any?(dnp_entries)
end
def override_display(_), do: false
2019-10-09 01:50:28 +02:00
end