2016-09-30 10:46:05 +00:00
|
|
|
{% 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 %}
|
2017-04-16 06:01:57 +00:00
|
|
|
<form class="form-horizontal" method="GET">
|
2016-09-30 10:46:05 +00:00
|
|
|
{{ form | bootstrap}}
|
|
|
|
<br/>
|
|
|
|
<input class="btn btn-primary" type="submit">
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
{% for report in reports %}
|
2017-10-04 09:37:07 +00:00
|
|
|
<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>
|
2016-09-30 10:46:05 +00:00
|
|
|
{% endfor %}
|
2017-10-04 09:37:07 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2016-09-30 10:46:05 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% endblock %}
|
2017-10-04 09:37:07 +00:00
|
|
|
|
|
|
|
{% 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">
|
2017-10-04 13:55:30 +00:00
|
|
|
$("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>>",
|
2017-10-04 09:37:07 +00:00
|
|
|
"sPaginationType": "bootstrap",
|
|
|
|
"bStateSave": true,
|
2017-10-04 13:55:30 +00:00
|
|
|
"aLengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]],
|
2017-10-04 09:37:07 +00:00
|
|
|
"oTableTools": {
|
|
|
|
"aButtons": [
|
|
|
|
"copy",
|
|
|
|
"csv",
|
|
|
|
"print"
|
|
|
|
],
|
|
|
|
"sSwfPath": "{{ STATIC_URL }}tabletools/swf/copy_csv_xls.swf"
|
|
|
|
}
|
2017-10-04 13:55:30 +00:00
|
|
|
});
|
|
|
|
});
|
2017-10-04 09:37:07 +00:00
|
|
|
</script>
|
|
|
|
{% endblock %}
|