{% extends 'base.html.twig' %} {% set bodyClass = 'documentation_document list' %} {% set menuItem = 'documentation' %} {% set activeCategories = [] %} {% for object in objects %} {% for cat in object.categories %} {% set activeCategories = activeCategories|merge([cat.name]) %} {% endfor %} {% endfor %} {% block title %}{{ 'documentation.document.title.title'|trans }} - {{ parent() }}{% endblock %} {% block stylesheets %} {% endblock %} {% block body_head %}

{{ 'documentation.document.title.title'|trans }} {{ 'documentation.document.title.subtitle'|trans }}

{% endblock %} {% block breadcrumb %} {% set breadcrumb = [ { 'name': 'documentation.document.title.title'|trans } ] %} {% include '_breadcrumb.html.twig' with {'breadcrumb': breadcrumb} %} {% endblock %} {% block body %}
{% if is_granted('ROLE_ADMIN') %} {{ 'documentation.category.action.list'|trans }} {% endif %}
{% for object in objects %} {% endfor %}
Liste des documents
{{ 'documentation.document.label.pinned'|trans }} {{ 'documentation.document.list.favorite'|trans }} {{ 'documentation.document.list.type'|trans }} {{ 'documentation.document.list.weight'|trans }} {{ 'documentation.document.label.name'|trans }} {{ 'documentation.document.label.categories'|trans }} {{ 'global.label.created_at'|trans }} {{ 'global.label.updated_at'|trans }} {{ 'global.label.actions'|trans }}
{% if object.pinned == 1 %} {{ object.pinned }} {% endif %} {% if object.favoritedUsers |filter(f => f.id == app.user.id)|length > 0 %} 1 {% else %} 0 {% endif %} {% if object.typeName == "Vidéo" %} {% elseif object.typeName == "PDF" %} {% elseif object.typeName == "Document" %} {% elseif object.typeName == "Lien" %} {% elseif object.typeName == "Image" %} {% elseif object.typeName == "PowerPoint" %} {% elseif object.typeName == "Excel" %} {% elseif object.typeName == "Audio" %} {% endif %} {{ object.typeName }} {{ object.size }} {{ object.name }} {{ object.categories|map(c => "#{c.name}") | join(', ') }} {{ object.createdAt|date('d/m/Y H:i') }} {{ object.updatedAt|date('d/m/Y H:i') }} {% if is_granted('ROLE_ADMIN') %}  {{ 'global.action.edit'|trans }}  {{ 'global.action.delete'|trans }} {% endif %} {% if is_granted('ROLE_REFERENT') and not is_granted('ROLE_ADMIN') %} {% endif %}
{% endblock %} {% block javascripts %} {% set dataTableOptions = { columns: [ {"data": "pinned"}, {"data": "favorite"}, {"data": "type"}, {"data": "weight"}, {"data": "name"}, {"data": "category"}, {"data": "created_at", "visible" : false}, {"data": "updated_at", "visible" : false}, {"data": "actions", "orderable": false, "class": 'noVis'}, ], order: [[0,'desc'],[6,'desc']], language: { buttons: { colvis: "Colonnes" }, }, dom: 'Brtip', columnDefs: [ { targets: 4, className: 'noVis' } ], buttons: [ { extend: 'colvis', columns: ':not(.noVis)' } ] } %} {# {{ include('_Utils/_serverside_datatable.html.twig') }} #} {{ include('_Utils/_datatable.html.twig') }} {% endblock %}