=== modified file 'lava/utils/data_tables/tables.py'
@@ -123,7 +123,7 @@
method.
"""
if template is None:
- template = 'lava_scheduler_app/ajax_table.html'
+ template = 'ajax_table.html'
# The reason we pass data=[] here and patch the queryset in below is
# because of a bootstrapping issue. We want to sort the initial
# queryset, and this is much cleaner if the table has has its .columns
=== added file 'lava_server/templates/ajax_table.html'
@@ -0,0 +1,25 @@
+{% 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 %}