{% extends "wagtailadmin/reports/base_report.html" %}
{% load i18n wagtailadmin_tags %}

{% block results %}
    {% if object_list %}
        <table class="listing">
            <thead>
                <tr>
                    <th class="title">
                        {% trans 'Name' %}
                    </th>
                    <th>
                        {% trans 'E-mail' %}
                    </th>
                    <th>
                        {% trans 'Date joined' %}
                    </th>
                    <th>
                        {% trans 'Avatar' %}
                    </th>
                </tr>
            </thead>
            <tbody>
                {% for entry in object_list %}
                    <tr>
                        <td class="title">
                            
                            {% if entry.edit_url %}
                                <a href="{{ entry.edit_url }}" title="{% trans 'Edit this user' %}">{{ entry.get_full_name|default:entry.username }}</a>
                            {% else %}
                                {{ entry.get_full_name|default:entry.username }}
                            {% endif %}
                        </td>
                        <td>
                            {{ entry.email }}
                        </td>
                        <td>
                            {% human_readable_date entry.date_joined %}
                        </td>
                        <td>
                            {% include "wagtailadmin/shared/user_avatar.html" with user=entry username=entry.user_display_name %}
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p>{% trans "No users." %}</p>
    {% endif %}
{% endblock %}

{% block no_results %}
    <p>{% trans "No users." %}</p>
{% endblock %}
