{% extends 'django_tableaux/bootstrap4.html' %}
{% load django_tables2 bootstrap4 i18n %}
{% block table.thead %}
  {% if table.show_header %}
    <thead {{ table.attrs.thead.as_html }}>
    <tr>
      {% for column in table.columns %}
        <th {{ column.attrs.th.as_html }}>
          {% if column.name == "selection" %}
            <input type="checkbox" id="select_all_page"  name="select_all_page" class="ml-2">
          {% else %}
            {% if column.orderable %}
              <a href="{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}">
                {#            <span class="float-right text-white">{% if "-" in column.order_by.0 %}&#9651;{% else %}&#9661;{% endif %}</span>#}
                {{ column.header }}
              </a>
            {% else %}
              {{ column.header }}
            {% endif %}
          {% endif %}
        </th>
      {% endfor %}
    </tr>
    {% if table.filter.style == table.filter.style.HEADER %}
    <tr>
      {% for field in table.header_fields %}
        <td>
        {% if field %}
          {% bootstrap_field field show_label=False form_group_class="form-group hx-get" %}
        {% endif %}
        </td>
      {% endfor %}
    </tr>
      {% endif %}
    </thead>
  {% endif %}
{% endblock table.thead %}


