logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

email_view.ex (634B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.EmailView do
  5. use Pleroma.Web, :view
  6. import Phoenix.HTML
  7. import Phoenix.HTML.Link
  8. alias Pleroma.Web.Gettext
  9. def avatar_url(user) do
  10. Pleroma.User.avatar_url(user)
  11. end
  12. def format_date(date) when is_binary(date) do
  13. date
  14. |> Timex.parse!("{ISO:Extended:Z}")
  15. |> Timex.format!("{Mshort} {D}, {YYYY} {h24}:{m}")
  16. end
  17. def admin_user_url(%{id: id}) do
  18. Pleroma.Web.Endpoint.url() <> "/pleroma/admin/#/users/" <> id
  19. end
  20. end