Add old membership views

This commit is contained in:
Skia
2016-09-02 21:21:57 +02:00
parent c5fd9d0076
commit c62d3f4f4a
10 changed files with 179 additions and 50 deletions

View File

@@ -0,0 +1,29 @@
{% extends "club/club_base.jinja" %}
{% from 'core/macros.jinja' import user_profile_link %}
{% block club %}
<h2>{% trans %}Club old members{% endtrans %}</h2>
<table>
<thead>
<td>{% trans %}User{% endtrans %}</td>
<td>{% trans %}Role{% endtrans %}</td>
<td>{% trans %}Description{% endtrans %}</td>
<td>{% trans %}From{% endtrans %}</td>
<td>{% trans %}To{% endtrans %}</td>
</thead>
<tbody>
{% for m in club.members.exclude(end_date=None).order_by('-role', '-end_date').all() %}
<tr>
<td>{{ user_profile_link(m.user) }}</td>
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
<td>{{ m.description }}</td>
<td>{{ m.start_date }}</td>
<td>{{ m.end_date }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}