Show sectioned reports

This commit is contained in:
Christopher Neugebauer 2016-09-03 13:51:21 +10:00
parent b6222c5eba
commit 32340c9a98

View file

@ -15,24 +15,27 @@
{% endif %} {% endif %}
<hr /> <hr />
<table class="table table-striped"> {% for report in reports %}
<tr> <h3>{{ report.title }}</h3>
{% for heading in report.headings %} <table class="table table-striped">
<th>{{ heading }}</th>
{% endfor %}
</tr>
{% for line in report.data %}
<tr> <tr>
{% for item in line %} {% for heading in report.headings %}
<td> <th>{{ heading }}</th>
{% if report.link_view and forloop.counter0 == 0 %}
<a href="{% url report.link_view item %}">
{% endif %}
{{ item }}
</td>
{% endfor %} {% endfor %}
</tr> </tr>
{% endfor %} {% for line in report.data %}
</table> <tr>
{% for item in line %}
<td>
{% if report.link_view and forloop.counter0 == 0 %}
<a href="{% url report.link_view item %}">
{% endif %}
{{ item }}
</td>
{% endfor %}
</tr>
{% endfor %}
</table>
{% endfor %}
{% endblock %} {% endblock %}