2022-11-17 16:43:00 -08:00
|
|
|
{% extends "settings/base.html" %}
|
2023-01-10 19:31:50 -08:00
|
|
|
{% load activity_tags %}
|
2022-11-16 20:42:25 -08:00
|
|
|
|
2022-11-17 16:43:00 -08:00
|
|
|
{% block subtitle %}Users{% endblock %}
|
2022-11-16 20:42:25 -08:00
|
|
|
|
|
|
|
{% block content %}
|
2022-12-16 15:38:52 -08:00
|
|
|
<form action="." class="search">
|
|
|
|
<input type="search" name="query" value="{{ query }}" placeholder="Search by email">
|
|
|
|
<button><i class="fa-solid fa-search"></i></button>
|
|
|
|
</form>
|
2023-01-10 19:31:50 -08:00
|
|
|
<table class="items">
|
2022-12-16 15:38:52 -08:00
|
|
|
{% for user in page_obj %}
|
2023-01-10 19:31:50 -08:00
|
|
|
<tr>
|
|
|
|
<td class="icon">
|
|
|
|
<a href="{{ user.urls.admin_edit }}" class="overlay"></a>
|
|
|
|
<i class="fa-solid fa-user"></i>
|
|
|
|
</td>
|
|
|
|
<td class="name">
|
|
|
|
<a href="{{ user.urls.admin_edit }}" class="overlay"></a>
|
2022-12-16 15:38:52 -08:00
|
|
|
{{ user.email }}
|
2023-01-10 19:31:50 -08:00
|
|
|
<small>{% if user.admin %}Admin{% elif user.moderator %}Moderator{% endif %}</small>
|
|
|
|
</td>
|
|
|
|
<td class="stat">
|
|
|
|
{{ user.num_identities }}
|
2022-12-16 15:38:52 -08:00
|
|
|
<small>
|
2023-01-10 19:31:50 -08:00
|
|
|
identit{{ user.num_identities|pluralize:"y,ies" }}
|
2022-12-16 15:38:52 -08:00
|
|
|
</small>
|
|
|
|
</span>
|
2023-01-10 19:31:50 -08:00
|
|
|
<td class="actions">
|
|
|
|
{% if user.banned %}
|
|
|
|
<span class="bad">Banned</span>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2022-12-16 15:38:52 -08:00
|
|
|
{% empty %}
|
2023-01-10 19:31:50 -08:00
|
|
|
<tr class="empty">
|
|
|
|
<td>
|
|
|
|
{% if query %}
|
|
|
|
No users match your query.
|
|
|
|
{% else %}
|
|
|
|
There are no users yet.
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2022-12-16 15:38:52 -08:00
|
|
|
{% endfor %}
|
2023-01-10 19:31:50 -08:00
|
|
|
</table>
|
|
|
|
<div class="pagination">
|
|
|
|
{% if page_obj.has_previous %}
|
|
|
|
<a class="button" href=".?{% urlparams page=page_obj.previous_page_number %}">Previous Page</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if page_obj.paginator.count %}
|
|
|
|
<span class="count">{{ page_obj.paginator.count }} user{{page_obj.paginator.count|pluralize }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% if page_obj.has_next %}
|
|
|
|
<a class="button" href=".?{% urlparams page=page_obj.next_page_number %}">Next Page</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-11-16 20:42:25 -08:00
|
|
|
{% endblock %}
|