summaryrefslogtreecommitdiffstats
path: root/templates/admin/users.html
blob: 1bf5b2e19a669ba4b88f072b18297f1285501225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% extends "settings/base.html" %}

{% block subtitle %}Users{% endblock %}

{% block content %}
    <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>
    <section class="icon-menu">
        {% for user in page_obj %}
            <a class="option" href="{{ user.urls.admin_edit }}">
                <i class="fa-solid fa-user"></i>
                <span class="handle">
                    {{ user.email }}
                    <small>
                        {{ user.num_identities }} identit{{ user.num_identities|pluralize:"y,ies" }}
                    </small>
                </span>
                {% if user.banned %}
                    <span class="pill bad">Banned</span>
                {% endif %}
            </a>
        {% empty %}
            <p class="option empty">
                {% if query %}
                    No users match your query.
                {% else %}
                    There are no users yet.
                {% endif %}
            </p>
        {% endfor %}
        <div class="load-more">
            {% if page_obj.has_previous %}
                <a class="button" href=".?page={{ page_obj.previous_page_number }}">Previous Page</a>
            {% endif %}
            {% if page_obj.has_next %}
                <a class="button" href=".?page={{ page_obj.next_page_number }}">Next Page</a>
            {% endif %}
        </div>
    </section>
{% endblock %}