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

<%= t(".title") %>
<%= export_dropdown if allowed_to? :export, :comments %> <%= link_to t("actions.new", scope: "decidim.debates", name: t("models.debate.name", scope: "decidim.debates.admin")), new_debate_path, class: "button tiny button--simple" if allowed_to? :create, :debate %>

<%= th_resource_scope_label %> <% debates.each do |debate| %> <%= td_resource_scope_for(debate.scope) %> <% end %>
<%= t("models.debate.fields.title", scope: "decidim.debates") %> <%= t("models.debate.fields.start_time", scope: "decidim.debates") %> <%= t("models.debate.fields.end_time", scope: "decidim.debates") %><%= t("actions.title", scope: "decidim.debates") %>
<%= link_to present(debate).title(html_escape: true), resource_locator(debate).path, target: :blank %>
<% if debate.start_time %> <%= l debate.start_time, format: :long %> <% end %> <% if debate.end_time %> <%= l debate.end_time, format: :long %> <% end %> <% if allowed_to? :update, :debate, debate: debate %> <%= icon_link_to "pencil", edit_debate_path(debate), t("actions.edit", scope: "decidim.debates"), class: "action-icon--edit" %> <% else %> <% end %> <% if allowed_to? :close, :debate, debate: debate %> <%= icon_link_to "lock-locked", edit_debate_debate_close_path(debate_id: debate.id, id: debate.id), t("actions.close", scope: "decidim.debates"), class: "action-icon--close" %> <% else %> <% end %> <%= resource_permissions_link(debate) %> <% if allowed_to? :delete, :debate, debate: debate %> <%= icon_link_to "circle-x", debate_path(debate), t("actions.destroy", scope: "decidim.debates"), method: :delete, class: "action-icon--remove", data: { confirm: t("actions.confirm_destroy", scope: "decidim.debates") } %> <% else %> <% end %>