<%= t(".steps_title") %> <% if can? :create, Decidim::ParticipatoryProcessStep %> <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process_step.name", scope: "decidim.admin")), new_participatory_process_step_path(current_participatory_process), class: 'button tiny button--title' %> <% end %>

<% if current_participatory_process.steps.any? %> <% current_participatory_process.steps.each do |step| %> <% end %>
<%= t("models.participatory_process_step.fields.title", scope: "decidim.admin") %> <%= t("models.participatory_process_step.fields.start_date", scope: "decidim.admin") %> <%= t("models.participatory_process_step.fields.end_date", scope: "decidim.admin") %>
<%= icon("move", class: "action-icon") %> <% if step.active? %> <% end %> <%= link_to translated_attribute(step.title), edit_participatory_process_step_path(current_participatory_process, step) %>
<% if step.start_date %> <%= l step.start_date.to_date, format: :long %> <% end%> <% if step.end_date %> <%= l step.end_date.to_date, format: :long %> <% end%> <% if can?(:activate, step) && !step.active? %> <%= icon_link_to "circle-check", participatory_process_step_activate_path(current_participatory_process, step), t("actions.activate", scope: "decidim.admin"), class: "action-icon--activate", method: :post %> <% end %> <% if can? :update, step %> <%= icon_link_to "pencil", edit_participatory_process_step_path(current_participatory_process, step), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %> <% end %> <% if can? :destroy, step %> <%= icon_link_to "circle-x", participatory_process_step_path(current_participatory_process, step), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> <% end %>
<% end %>