<%= t "decidim.admin.titles.consultations" %> <%= link_to t("actions.new_consultation", scope: "decidim.admin"), ["new", "consultation"], class: "button tiny button--title" if allowed_to? :create, :consultation %>

<% @consultations.each do |consultation| %> <% end %>
<%= t("models.consultation.fields.title", scope: "decidim.admin") %> <%= t("models.consultation.fields.created_at", scope: "decidim.admin") %> <%= t("models.consultation.fields.published", scope: "decidim.admin") %>
<% if allowed_to? :update, :consultation, consultation: consultation %> <%= link_to translated_attribute(consultation.title), edit_consultation_path(consultation) %>
<% elsif allowed_to? :preview, :consultation, consultation: consultation %> <%= link_to translated_attribute(consultation.title), decidim_consultations.consultation_path(consultation), target: "_blank" %>
<% else %> <%= translated_attribute(consultation.title) %> <% end %>
<%= l consultation.created_at, format: :short %> <% if consultation.published? %> <%= t("consultations.index.published", scope: "decidim.admin") %> <% else %> <%= t("consultations.index.not_published", scope: "decidim.admin") %> <% end %> <% if allowed_to? :update, :consultation, consultation: consultation %> <%= icon_link_to "pencil", edit_consultation_path(consultation), t("actions.configure", scope: "decidim.admin"), class: "action-icon--edit" %> <% end %> <% if allowed_to? :preview, :consultation, consultation: consultation %> <%= icon_link_to "eye", decidim_consultations.consultation_path(consultation), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview", target: "_blank" %> <% end %>