{% extends "default/datatable.html.twig" %} {% block custom_css %} {{parent()}} {% endblock %} {% block ajout %} {% if app.user.hasright(right_add) %} {{ 'Table.Add' | trans }} {% endif %} {% endblock %} {% block actionAll %}
{% if app.user.hasright(right_news) %} {{ 'Table.Public.News' | trans }}   {% endif %}
{% endblock %} {% block datatable %} {% for d in datas %} {% endfor %}
ID {{'Table.Public.Name' | trans}} {{'Table.Public.Description' | trans}} {{'Table.Public.Date' | trans}} {{'Table.Public.Publish' | trans}} {{'Table.Action' | trans}}
{{ d.id }} {{ d.name }} {{ d.description }} {{ d.creadate | format_datetime('long', 'none', locale=app.request.getLocale()) }} {% if d.publish == true %} {{'Table.Publish' | trans}} {% else %} {{'Table.DePublish' | trans}} {% endif %} {% if app.user.hasright(right_download) %} {%set fic = root_path()~"/uploads/publication/"~d.clean~"-"~d.id~"."~d.extFile %} {% if fileExists(fic) %} {{'Table.Download' | trans}} {% endif %} {% endif %} {% if app.user.hasright(right_edit) %} {{'Table.Edit' | trans}} {% endif %} {% if app.user.hasright(right_delete) %} {% endif %}
{% include 'publication/modal.html.twig' %} {% if app.user.hasright(right_news) %} {% include 'publication/modalNews.html.twig' %} {% endif %} {% if app.user.hasright(right_dif) %} {% include 'publication/modalDiffusion.html.twig' %} {% endif %} {% endblock %} {% block initialisation %} {{parent()}} {% endblock %} {% block action %} {% endblock %} {% block custom_js %} {{parent()}} {% endblock %}