app/views/decidim/plans/admin/plans/_plan-tr.html.erb in decidim-plans-0.16.0 vs app/views/decidim/plans/admin/plans/_plan-tr.html.erb in decidim-plans-0.16.1
- old
+ new
@@ -38,9 +38,17 @@
<td class="table-list__actions">
<% if allowed_to? :edit, :plan, plan: plan %>
<%= icon_link_to "pencil", edit_plan_path(plan), t("actions.edit_plan", scope: "decidim.plans"), class: "action-icon--edit-plan" %>
<% end %>
+ <% if allowed_to? :close, :plan, plan: plan %>
+ <% if plan.closed? %>
+ <%= icon_link_to "action-undo", reopen_plan_path(plan), t("actions.reopen_plan", scope: "decidim.plans"), method: :post, class: "action-icon--reopen-plan" %>
+ <% else %>
+ <%= icon_link_to "ban", close_plan_path(plan), t("actions.close_plan", scope: "decidim.plans"), method: :post, class: "action-icon--close-plan" %>
+ <% end %>
+ <% end %>
+
<% if allowed_to? :create, :plan_answer %>
<%= icon_link_to "comment-square", edit_plan_plan_answer_path(plan_id: plan.id, id: plan.id), t("actions.answer", scope: "decidim.plans"), class: " icon--small" %>
<% else %>
<%= icon "comment-square", scope: "decidim.plans.admin", class: "action-icon action-icon--disabled" %>
<% end %>