templates/datatable/Main/datatableHtml.html.twig line 1

Open in your IDE?
  1. {% block main %}
  2. {% if multiple %}<form name="frm-{{ id }}">{% endif %}
  3.     <table class="{{ class|default('display table table-bordered') }}" id="{{ id }}">
  4.         <thead>
  5.             <tr>
  6.             {% if multiple %}
  7.                 <th width="1%" ><input type="checkbox" name="datatable_action_all" /></th>
  8.             {% endif %}
  9.             {% for label,key in fields %}
  10.                 {% if label != '_identifier_' %}
  11.                     <th>{{ label|replace({' ': '&nbsp;'})|raw }}</th>
  12.                 {% endif %}
  13.             {% endfor %}
  14.             </tr>
  15.         </thead>
  16.         {% if search %}
  17.         {% set i = 0 %}
  18.         <tfoot>
  19.             <tr>
  20.                 {% if multiple %}
  21.                 <th></th>
  22.                 {% endif %}
  23.                 {% for label,key in fields %}
  24.                     {% if label != '_identifier_' %}
  25.                         {% if searchFields is not empty %}
  26.                             {% if i in searchFields %}
  27.                             <td><input index="{{ i }}" searchable="true" type="text" placeholder="{% trans %}Rechercher{% endtrans %}" class="search_init" /></td>
  28.                             {% else %}
  29.                             <td></td>
  30.                             {% endif %}
  31.                         {% endif %}
  32.                     {% endif %}
  33.                     {% set i = i+1 %}
  34.                 {% endfor %}
  35.             </tr>
  36.         </tfoot>
  37.         {% endif %}
  38.     </table>
  39. {% if multiple %}</form>{% endif %}
  40. {% endblock  %}