Start using django_tables2 for table processing

This commit is contained in:
Jan Tuomi
2017-05-13 00:18:01 +03:00
parent 74746fc0de
commit 9a87ba56b5
9 changed files with 74 additions and 123 deletions
+2 -33
View File
@@ -49,39 +49,8 @@
<input type="button" value="{% trans "Download CSV" %}" id="download-csv" class="btn btn-info" ng-click="loadCSV()"/>
</div>
</div>
<table class="table table-bordered table-hover">
<thead>
<tr class="ui-widget-header">
<th>{% trans "Date" %}</th>
<th>{% trans "Source" %}</th>
<th>{% trans "Member information" %}</th>
<th class="table-button-column">{% trans "Payment count" %}: {{ payment_count }}</th>
</tr>
</thead>
<tbody>
{% for payment in payment_list %}
<tr>
<td>{{ payment.date }}</td>
<td>{{ payment.source }}</td>
<td>
{% if payment.member %}
{{ payment.member.last_name }} {{ payment.member.first_name }}, {{ payment.member.email }}
{% else %}
{% trans "No member data found" %}
{% endif %}
</td>
<td class="table-button-column">
<a href="/members/edit/{{ payment.id }}">
<input type="button" value="{% trans "Edit" %}" class="table-button btn btn-info" value="{% trans "Edit" %}" />
</a>
<a href="/members/delete_payment_confirm/{{ payment.id }}">
<input type="button" value="{% trans "Delete" %}" class="table-button btn btn-danger" />
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ table|safe }}
</div>
</div>
{% endblock content %}