{# Documents Grid Component Grid view for document listing (desktop and mobile) Required variables: - mediaList: Array of Media entities - company: Company entity - viewMode: Current view mode ('table' or 'grid') - selectedCategory: Selected category (optional) #} {% import 'admin/companies/documents/_macros.html.twig' as docs %} {# Desktop Grid View #} {% if viewMode == 'grid' %} {% endif %} {# Mobile Card View (Always visible on mobile) #}
{% if mediaList is empty %} {{ docs.empty_state( 'fa-file-alt', 'Aucun document disponible', 'Commencez par téléverser un document', true, company ) }} {% else %}
{% for media in mediaList %} {% include 'admin/companies/documents/_document_grid_card.html.twig' with {media: media, company: company} %} {% endfor %}
{# Pagination Mobile #} {% if mediaList.getTotalItemCount > 0 %}
{{ knp_pagination_render(mediaList, '@KnpPaginator/Pagination/tailwind_pagination.html.twig') }}
{% endif %} {% endif %}