kasownik/web/webapp/templates/admin_index.html

117 lines
3.0 KiB
HTML

{% extends "root.html" %}
{% set active_page = "admin" %}
{% block title %}Admin Member List{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-2 operations">
<h4>Active operations:</h4>
<h4>Available operations:</h4>
<p>
<a href="/admin/match"><b>Match transfers</b></a>
<a href="/admin/ldapsync"><b>Synchronize LDAP groups</b></a>
<a href="/admin/spam"><b>Spam members</b></a>
</p>
</div>
<div class="col-md-10">
<div class="row">
{% for group in active_members|groupby("type") %}
<div class="col-md-6">
<h2>Active members, {{ group.grouper }}:</h2>
<table class="table table-striped">
<tr>
<th>#</th>
<th>LDAP Username</th>
<th>Months Due</th>
<th>Payment Policy</th>
</tr>
{% for member in group.list %}
<tr>
<td>{{loop.index}}.</td>
<td>
<a href="/admin/member/{{member.username}}">
<b>{{member.username}}</b>
</a>
</td>
<td>
<span class="badge" style="background-color: #{{member.color}}">
{{member.months_due}}
</span>
{% if member.last_transfer_bank != 'IdeaBank' %}
<span class="badge" style="background-color: red">
{{member.last_transfer_bank}}
</span>
{% endif %}
</td>
<td>{% include "button_payment_policy.html" %}</td>
</tr>
{% endfor %}
</table>
</div>
{% endfor %}
<div class="col-md-6">
<h2>Inactive-wannabes:</h2>
<table class="table table-striped">
<tr>
<th>#</th>
<th>LDAP Username</th>
<th>Months Due</th>
<th>Payment Policy</th>
</tr>
{% for member in inactive_members|selectattr("months_due") %}
<tr>
<td>{{loop.index}}.</td>
<td>
<a href="/admin/member/{{member.username}}">
<b>{{member.username}}</b>
</a>
</td>
<td>
<span class="badge" style="background-color: #{{member.color}}">
{{member.months_due}}
</span>
{% if member.last_transfer_bank != 'IdeaBank' %}
<span class="badge" style="background-color: red">
{{member.last_transfer_bank}}
</span>
{% endif %}
</td>
<td>{% include "button_payment_policy.html" %}</td>
</tr>
{% endfor %}
</table>
</div>
<div class="col-md-6">
<h2>Inactive members:</h2>
<table class="table table-striped">
<tr>
<th>#</th>
<th>LDAP Username</th>
<th>Months Due</th>
<th>Payment Policy</th>
</tr>
{% for member in inactive_members|rejectattr("months_due") %}
<tr>
<td>{{loop.index}}.</td>
<td>
<a href="/admin/member/{{member.username}}">
<b>{{member.username}}</b>
</a>
</td>
<td>
<span class="badge" style="background-color: #{{member.color}}">
{{member.months_due}}
</span>
</td>
<td>{% include "button_payment_policy.html" %}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
</div>
</div>
{% endblock %}