{% extends 'base.html.twig' %} {% block title %}Gestion des outils - Admin{% endblock %} {% block body %}
{# Header #}
{% include '_molecules/page-header/page-header.html.twig' with { title: 'Gestion des outils', subtitle: 'Liste des outils disponibles sur la plateforme Bubul. Ajoutez ou modifiez les outils directement depuis cette interface.', icon: 'settings', backHref: path('app_dashboard'), backLabel: 'Retour au dashboard' } only %} {% include '_atoms/button/button.html.twig' with { label: 'Nouvel outil', variant: 'primary', size: 'lg', icon: 'plus', href: path('admin_tool_new') } only %}
{# Compteur #}
{{ tools|length }} outil{{ tools|length > 1 ? 's' : '' }} enregistré{{ tools|length > 1 ? 's' : '' }}
{# Tableau des outils #}
{% for tool in tools %} {% else %} {% endfor %}
Nom Code Description Tokens Actions
{% set tc = tool_colors[tool.code] ?? 'primary' %} {% set hex = (tool_color_details[tool.code] ?? {}).primary ?? null %} {% set hexSecondary = (tool_color_details[tool.code] ?? {}).secondary ?? null %}
{% include '_atoms/icon/icon.html.twig' with { name: tool.sidebarIcon, size: 'md', color: tc, colorPrimary: hex, colorSecondary: hexSecondary } only %}
{{ tool.name }} {{ tool.code }} {{ tool.description|default('—') }} {% if tool.isTokenable %} {% include '_atoms/badge/badge.html.twig' with { label: 'Oui', variant: 'success', size: 'sm' } only %} {% else %} {% include '_atoms/badge/badge.html.twig' with { label: 'Non', variant: 'gray', size: 'sm' } only %} {% endif %} {% include '_atoms/button/button.html.twig' with { variant: 'ghost', size: 'sm', icon: 'edit', href: path('admin_tool_edit', {id: tool.id}), attr: { title: 'Modifier' } } only %}
{% include '_molecules/empty-state/empty-state.html.twig' with { title: 'Aucun outil enregistré', description: 'Créez le premier outil pour commencer.', icon: 'settings', variant: 'minimal', actions: [{ label: 'Créer un outil', href: path('admin_tool_new'), variant: 'primary', icon: 'plus' }] } only %}
{% endblock %}