app/views/admin/application/categories/_panel.html.erb
<%
# categories_class = Communication::Website::Agenda::Category
visible = can?(:create, categories_class) || (root_categories.any? && can?(:edit, root_categories.first))
# lien vers la création d'une nouvelle catégorie
action = create_link categories_class
# Catégories
title = categories_class.model_name.human(count: 2)
%>
<% if visible %>
<%= osuny_panel title, action: action do %>
<%= render 'admin/application/categories/list',
root_categories: root_categories,
categories_class: categories_class %>
<% end %>
<% end %>