mobilizon/lib/web/templates/email/report.text.eex
Thomas Citharel f2ac3e2e5d
feat(reports): allow reports to hold multiple events
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-08-31 10:43:36 +02:00

27 lines
1.1 KiB
Elixir

<%= gettext "New report from %{reporter} on %{instance}", reporter: Mobilizon.Actors.Actor.display_name_and_username(@report.reporter), instance: @instance_name %>
--
<%= if @report.reported do %>
<%= if @report.reported.type == :Group do %>
<%= gettext "Group %{group} was reported", group: Mobilizon.Actors.Actor.display_name_and_username(@report.reported) %>
<% else %>
<%= gettext "Profile %{profile} was reported", profile: Mobilizon.Actors.Actor.display_name_and_username(@report.reported) %>
<% end %>
<% end %>
<%= if Map.has_key?(@report, :event) && length(@report.events) > 0 do %>
<%= gettext "Events" %>
<%= for event <- @report.events do %>
<%= event.title %>
<% end %>
<% end %>
<%= if Map.has_key?(@report, :comments) && length(@report.comments) > 0 do %>
<%= gettext "Comments" %>
<%= for comment <- @report.comments do %>
<%= comment.text %>
<% end %>
<% end %>
<%= if @report.content do %>
<%= gettext "Reason" %>
<%= @report.content %>
<% end %>
<%= gettext "View report:" %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :moderation_report, @report.id) %>