% add_decidim_page_title(t("categories.index.categories_title", scope: "decidim.admin")) %>
<%= t("activemodel.attributes.category.name") %> | |
---|---|
<%= link_to translated_attribute(category.name), edit_category_path(current_participatory_space, category) %> |
<% if allowed_to? :update, :category, category: category %> <%= icon_link_to "pencil-line", edit_category_path(current_participatory_space, category), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %> <% end %> <% if allowed_to? :destroy, :category, category: category %> <% if category.unused? %> <%= icon_link_to "delete-bin-line", category_path(current_participatory_space, category), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> <% else %> <%= icon "delete-bin-line", class: "action-icon action-icon--disabled", role: "img", "aria-hidden": true %> <% end %> <% end %> |
<%= link_to translated_attribute(subcategory.name), edit_category_path(current_participatory_space, subcategory) %> |
<% if allowed_to? :update, :category, category: subcategory %> <%= icon_link_to "pencil-line", edit_category_path(current_participatory_space, subcategory), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %> <% end %> <% if allowed_to? :destroy, :category, category: subcategory %> <% if subcategory.unused? %> <%= icon_link_to "delete-bin-line", category_path(current_participatory_space, subcategory), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> <% else %> <%= icon "delete-bin-line", class: "action-icon action-icon--disabled", role: "img", "aria-hidden": true %> <% end %> <% end %> |