{% extends "django_tables2/table.html" %}

{% block table.thead %}
<thead>
  <tr>
    {% for column in table.columns %}
    <th {{ column.attrs.th.as_html }}>{{ column.header }}</th>
    {% endfor %}
  </tr>
</thead>
{% endblock table.thead %}

{% block table %}
{{ block.super }}
{% comment %}
The div below is a ridiculous hack to avoid the jQuery.details.js
setting the display: of the script element to "block" when showing a
table that is in a <details> element.
{% endcomment %}
<div>
<script type="text/javascript">
$("#{{ table.attrs.id }}").dataTable({{ table.datatable_options|safe }});
</script>
</div>
{% endblock %}
