69 lines
2 KiB
HTML
69 lines
2 KiB
HTML
{% extends "site_base.html" %}
|
|
{% load bootstrap %}
|
|
{% load registrasion_tags %}
|
|
|
|
{% block body %}
|
|
|
|
<h2>{{ title }}</h2>
|
|
|
|
<p><a href="{% url 'reports_list' %}">Return to reports list</a></p>
|
|
|
|
{% if form %}
|
|
<form class="form-horizontal" method="GET">
|
|
{{ form | bootstrap}}
|
|
<br/>
|
|
<input class="btn btn-primary" type="submit">
|
|
</form>
|
|
{% endif %}
|
|
<hr />
|
|
|
|
{% for report in reports %}
|
|
<h3>{{ report.title }}</h3>
|
|
<table class="table table-striped table-reportdata">
|
|
<thead>
|
|
<tr>
|
|
{% for heading in report.headings %}
|
|
<th>{{ heading }}</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for line in report.rows %}
|
|
<tr>
|
|
{% for item in line %}
|
|
<td>
|
|
{{ item|safe }}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|
|
|
|
{% block extra_script %}
|
|
<script src="{{ STATIC_URL }}datatables/js/jquery.dataTables.min.js" type="text/javascript"></script>
|
|
<script src="{{ STATIC_URL }}tabletools/js/TableTools.min.js" type="text/javascript"></script>
|
|
<script src="{{ STATIC_URL }}datatables/js/dataTables.bootstrap.js" type="text/javascript"></script>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.2.0/ace.js"></script>
|
|
<script type="text/javascript">
|
|
$("table.table-reportdata").each(function () {
|
|
$(this).dataTable({
|
|
"sDom": "<'row'<'col-md-3'l><'col-md-3'T><'col-md-4'f>r>t<'row'<'col-md-3'i><'col-md-5'p>>",
|
|
"sPaginationType": "bootstrap",
|
|
"bStateSave": true,
|
|
"aLengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]],
|
|
"oTableTools": {
|
|
"aButtons": [
|
|
"copy",
|
|
"csv",
|
|
"print"
|
|
],
|
|
"sSwfPath": "{{ STATIC_URL }}tabletools/swf/copy_csv_xls.swf"
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|