<% add_decidim_page_title(t(".title")) %>

<%= link_to "#{t("title", scope: "decidim.admin.moderations.index")} > ", moderations_path %> <%= t(".title") %>

<%= cell("decidim/announcement", t(".callout_html", icon: icon("flag-line")), callout_class: "warning") %>
<%= t("models.moderation.fields.reported_content_url", scope: "decidim.moderations") %>
<% if (reportable_url = moderation.reportable.reported_content_url) %>
<%= link_to moderation.reportable.reported_content_url, reportable_url, target: "_blank" %>
<% else %>
<%= t("models.moderation.fields.deleted_resource", scope: "decidim.moderations") %>
<% end %>
<%= t("models.moderation.fields.reportable_id", scope: "decidim.moderations") %>
<%= moderation.reportable.id %>
<% if translatable_resource?(moderation.reportable) %>
<%= t(".content_original_language") %>
<%= locale_name moderation.reportable.content_original_language %>
<% end %>
<%= t(".reported_content") %> <% if translatable_resource?(moderation.reportable) %> <% end %>
<%= reported_content_for moderation.reportable %>
<% if translatable_resource?(moderation.reportable) %>
<%= reported_content_for moderation.reportable, locale: moderation.reportable.content_original_language %>
<% end %>
<%= t(".author") %>
<%= reportable_author_name(moderation.reportable) %>
<%= t("models.moderation.fields.reportable_type", scope: "decidim.moderations") %>
<%= moderation.reportable.class.name.demodulize %>
<%= t("models.moderation.fields.created_at", scope: "decidim.moderations") %>
<%= l(moderation.created_at, format: :long) %>
<%= t(".participatory_space") %>
<%= translated_attribute moderation.participatory_space.title %>
<% reports.each do |report| %> <% end %>
<%= t("models.report.fields.reason", scope: "decidim.moderations") %> <%= t("models.report.fields.locale", scope: "decidim.moderations") %> <%= t("models.report.fields.details", scope: "decidim.moderations") %> <%= t("actions.title", scope: "decidim.moderations") %>
<%= t("decidim.admin.moderations.report.reasons.#{report.reason}") %> <%= report.locale.present? ? locale_name(report.locale) : "" %> <%= report.details&.truncate(250) %> <%= icon_link_to "fullscreen-line", moderation_report_path(moderation_id: moderation, id: report.id), t("actions.expand", scope: "decidim.moderations"), class: "action-icon--expand" %>
<% if !moderation.reportable.hidden? && allowed_to?(:unreport, permission_resource) %> <%= link_to t("actions.unreport", scope: "decidim.moderations"), unreport_moderation_path(id: moderation), method: :put, class: "button button__sm button__secondary" %> <% end %> <% if !moderation.reportable.hidden? && allowed_to?(:hide, permission_resource) %> <%= link_to t("actions.hide", scope: "decidim.moderations"), hide_moderation_path(id: moderation), method: :put, class: "button button__sm button__secondary alert" %> <% end %> <% if moderation.reportable.hidden? && allowed_to?(:unhide, permission_resource) %> <%= link_to t("actions.unhide", scope: "decidim.moderations"), unhide_moderation_path(id: moderation), method: :put, class: "button button__sm button__secondary alert" %> <% end %>