% add_decidim_meta_tags({
description: translated_attribute(debate.description),
title: present(debate).title,
url: debate_url(debate.id)
}) %>
<%
edit_link(
resource_locator(debate).edit,
:update,
:debate,
debate: debate
)
%>
<%= link_to debates_path(filter_link_params), class: "small hollow" do %>
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
<%= t(".back") %>
<% end %>
<%== present(debate).title(links: true) %>
<% debate_presenter = Decidim::Debates::DebatePresenter.new(debate) %>
<%= cell "decidim/author", debate_presenter.author, from: debate, context: { extra_classes: ["author-data--small"] } %>
<% if allowed_to?(:edit, :debate, debate: debate) %>
<%= link_to t(".edit_debate"), edit_debate_path(debate), class: "button secondary hollow expanded button-sc button--icon follow-button" %>
<% elsif admin_allowed_to?(:update, :debate, debate: debate) %>
<%= link_to t(".edit_debate"), resource_locator(debate).edit, class: "button secondary hollow expanded button-sc button--icon follow-button" %>
<% end %>
<% close_debate_action_text = (debate.closed? ? ".edit_conclusions" : ".close_debate" ) %>
<% if allowed_to?(:close, :debate, debate: debate) %>
<% elsif admin_allowed_to?(:close, :debate, debate: debate) %>
<%= link_to t(close_debate_action_text), Decidim::EngineRouter.admin_proxy(debate.component).edit_debate_debate_close_path(debate_id: debate.id, id: debate.id), class: "button hollow expanded button-sc button--icon follow-button" %>
<% end %>
<%= resource_reference(debate) %>
<%= resource_version(debate_presenter, versions_path: debate_versions_path(debate)) %>
<%= render partial: "decidim/shared/share_modal" %>
<%= embed_modal_for debate_widget_url(debate, format: :js) %>
<% if debate.closed? %>
<%= t(".debate_closed") %>
<% end %>
<%= render_debate_description(debate) %>
<% if debate.closed? %>
<%= cell("decidim/announcement", { announcement: { title: t(".debate_conclusions_are", date: l(debate.closed_at, format: :decidim_short)), body: simple_format(translated_attribute(debate.conclusions)) }, callout_class: "success" }) %>
<% end %>
<% if translated_attribute(debate.instructions).present? %>
<%= decidim_sanitize(simple_format(translated_attribute(debate.instructions), {}, sanitize: false)) %>
<% end %>
<% if translated_attribute(debate.information_updates).present? %>
<%= decidim_sanitize(simple_format(translated_attribute(debate.information_updates), {}, sanitize: false)) %>
<% end %>
<% if debate.category %>
<% end %>
<%= cell "decidim/endorsers_list", debate %>
<%= comments_for debate %>
<%=
render partial: "decidim/shared/flag_modal", locals: {
reportable: debate,
form: report_form,
url: decidim.report_path(sgid: debate.to_sgid.to_s)
}
%>
<%=
render partial: "close_debate_modal", locals: {
debate: debate,
form: close_debate_form
}
%>