mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 20:37:59 +01:00
15 lines
422 B
Elixir
15 lines
422 B
Elixir
defmodule PhilomenaWeb.MarkdownView do
|
|
use PhilomenaWeb, :view
|
|
|
|
def anonymous_by_default?(conn) do
|
|
conn.assigns.current_user.anonymous_by_default
|
|
end
|
|
|
|
def required?(required) when required == false, do: nil
|
|
def required?(_), do: true
|
|
|
|
def add_classes(base_classes, new_classes) when is_binary(new_classes),
|
|
do: "#{base_classes} #{new_classes}"
|
|
|
|
def add_classes(base_classes, _), do: base_classes
|
|
end
|