modified: app.py new file: templates/admin_dashboard.html.j2 new file: templates/base.html.j2 new file: templates/daily_leaderboard.html.j2 new file: templates/daily_puzzle.html.j2 new file: templates/home.html.j2 new file: templates/invite_admin.html.j2 new file: templates/king_of_the_mountain.html.j2 new file: templates/leaderboard_index.html.j2 new file: templates/login.html.j2 new file: templates/manage_admins.html.j2 new file: templates/profile.html.j2 new file: templates/puzzle_menu.html.j2 new file: templates/upload.html.j2 new file: templates/verify.html.j2
40 lines
1.1 KiB
Django/Jinja
40 lines
1.1 KiB
Django/Jinja
{% extends 'base.html.j2' %}
|
|
|
|
{% block title %}Manage Admins{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>Manage Admins</h1>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Username</th>
|
|
<th>Email</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for admin in admins %}
|
|
<tr>
|
|
<td>{{ admin.username }}</td>
|
|
<td>{{ admin.email }}</td>
|
|
<td>
|
|
{% if admin.id != request.user.id %}
|
|
<form method="POST" action="{{ request.route_url('remove_admin', user_id=admin.id) }}" style="display:inline;">
|
|
<button type="submit" onclick="return confirm('Are you sure you want to revoke admin privileges from {{ admin.username }}?')">Revoke Admin</button>
|
|
</form>
|
|
{% else %}
|
|
<em>Current User</em>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% if message %}
|
|
<p>{{ message }}</p>
|
|
{% endif %}
|
|
|
|
<p><a href="{{ request.route_url('invite_admin') }}">Invite a New Admin</a></p>
|
|
{% endblock %}
|