{% extends "default/datatable.html.twig" %} {% block custom_css %} {{parent()}} {% endblock %} {% block ajout %} {% if app.user.hasright(right_add) %} {{ 'Table.Add' | trans }} {% endif %} {% endblock %} {% block datatable %} {% for d in datas %} {% set modality_btn = false %} {% endfor %}
ID {{'Table.Variable.Code' | trans}} {{'Table.Variable.Name' | trans}} {{'Table.Variable.Nature' | trans}} {{'Table.Variable.Statut' | trans}} {{'Table.Action' | trans}}
{{ d.id }} {{ d.code }} {{ d.name }} {% if d.nature == 1 %} {{ 'Form.Variable.Nature.String' | trans}} {% elseif d.nature == 2 %} {{ 'Form.Variable.Nature.Text' | trans}} {% elseif d.nature == 3 %} {{ 'Form.Variable.Nature.Numerique' | trans}} {% elseif d.nature == 4 %} {{ 'Form.Variable.Nature.Date' | trans}} {% elseif d.nature == 5 %} {{ 'Form.Variable.Nature.Time' | trans}} {% elseif d.nature == 6 %} {{ 'Form.Variable.Nature.TimeZone' | trans}} {% elseif d.nature == 7 %} {{ 'Form.Variable.Nature.Boolean' | trans}} {% elseif d.nature == 8 %} {{ 'Form.Variable.Nature.Geo' | trans}} {% elseif d.nature == 9 %} {% set modality_btn = true %} {{ 'Form.Variable.Nature.Choice' | trans}} {% elseif d.nature == 10 %} {{ 'Form.Variable.Nature.File' | trans}} {% elseif d.nature == 11 %} {{ 'Form.Variable.Nature.Country' | trans}} {% endif %} {%if d.active %} {{ 'Form.Active' | trans}} {% else %} {{ 'Form.NoActive' | trans}} {% endif %} {% if app.user.hasright(right_edit) %} {{'Table.Edit' | trans}} {% endif %} {% if app.user.hasright(right_delete) %} {% if d.active %} {% else %} {% endif %} {% endif %} {% if app.user.hasright(right_add) %} {% if modality_btn %} {{'Table.Modalities_btn' | trans}} {% endif %} {% endif %}
{% include 'variable/modal.html.twig' %} {% include 'variable/modalImport.html.twig' %} {% endblock %} {% block initialisation %} {{parent()}} {% endblock %} {% block custom_js %} {{parent()}} {% endblock %}