acm-site/acmsite/templates/admin/users.html
Cara Salter 026523b26f
Enable Officer positions to be created and photos to be uploaded
holy shit

Closes: #4
TODO: Create API for getting current officers and upcoming events
2024-04-01 14:14:56 +11:00

50 lines
1.9 KiB
HTML

{% extends "admin/admin-layout.html" %}
{% block app_content %}
<h1>Member List</h1>
<a href="{{ url_for('admin.users_csv') }}" target="_blank">CSV for ACM</a>
<table class="table table-striped">
<thead>
<tr>
<th>Email</th>
<th>Name</th>
<th>Created</th>
<th>Last Login</th>
<th>Officer?</th>
<th>Options</th>
</tr>
</thead>
<tbody>
{% for u in u_list %}
<tr>
<td>{{ u.email }}</td>
<td>{{ u.first_name }} {{ u.last_name }}</td>
<td>{{ u.created }}</td>
<td>{{ u.last_login }}</td>
<td>{{ u.is_admin }}</td>
<td>
<div class="dropdown">
<a href="#" class="btn btn-primary dropdown-toggle"
data-bs-toggle="dropdown"><span
class="caret"></span></a>
<ul class="dropdown-menu">
{% if u.is_admin %}
<li class="dropdown-item">Demote Officer</li>
{% else %}
<li class="dropdown-item">Promote Officer</li>
{% endif %}
<li class="dropdown-item"><a href="{{
url_for('admin.officer_positions',
user_id=u.id)}}">Manage Officer
Entries</a></li>
<li class="dropdown-item">View Event Checkins</li>
<li class="dropdown-item">Delete Member</li>
</ul>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock app_content %}