app/views/decidim/admin/participatory_process_steps/index.html.erb in decidim-admin-0.0.1 vs app/views/decidim/admin/participatory_process_steps/index.html.erb in decidim-admin-0.0.2

- old
+ new

@@ -38,15 +38,11 @@ <td> <%= humanize_boolean step.active? %> </td> <td class="actions"> <%= link_to t("actions.edit", scope: "decidim.admin"), edit_participatory_process_step_path(participatory_process, step) if can? :update, step %> - <% if can? :activate, step %> - <% if step.active? %> - <%= link_to t("actions.deactivate", scope: "decidim.admin"), participatory_process_step_activate_path(participatory_process, step), method: :delete, class: "small button secondary" %> - <% else %> - <%= link_to t("actions.activate", scope: "decidim.admin"), participatory_process_step_activate_path(participatory_process, step), method: :post, class: "small button secondary" %> - <% end %> + <% if can?(:activate, step) && !step.active? %> + <%= link_to t("actions.activate", scope: "decidim.admin"), participatory_process_step_activate_path(participatory_process, step), method: :post, class: "small button secondary" %> <% end %> <%= link_to t("actions.destroy", scope: "decidim.admin"), participatory_process_step_path(participatory_process, step), method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } if can? :destroy, step %> </td> </tr> <% end %>