{gettext("New report on %{instance}", instance: @instance_name) |> raw}

<%= if @report.reported do %> <% end %> <%= if Map.has_key?(@report, :events) and length(@report.events) > 0 do %> <% end %> <%= if Map.has_key?(@report, :comments) && length(@report.comments) > 0 do %> <% end %> <%= if Map.has_key?(@report, :content) do %> <% end %>

<%= if @report.reporter.type == :Application and @report.reporter.preferred_username == "relay" do %> {gettext( "Someone on %{instance} reported the following content for you to analyze:", instance: escape_html(@report.reporter.domain) ) |> raw} <% else %> {gettext("%{reporter} reported the following content.", reporter: escape_html(display_name_and_username(@report.reporter)) ) |> raw} <% end %>

<%= if @report.reported.type == :Group do %>

{gettext("Group reported")}

{Mobilizon.Actors.Actor.display_name_and_username(@report.reported)} <% else %>

{gettext("Profile reported")}

{Mobilizon.Actors.Actor.display_name_and_username(@report.reported)} <% end %>

{gettext("Flagged events")}

<%= for event <- @report.events do %> {gettext("%{title} by %{creator}", title: event.title, creator: Mobilizon.Actors.Actor.preferred_username_and_domain(@report.reported) )} <% end %>

{gettext("Flagged comments")}

<%= for comment <- @report.comments do %>

{Mobilizon.Service.Formatter.HTML.strip_tags(comment.text)}

<% end %>

{gettext("Reasons for report")}

{@report.content}

{gettext("View report")}