2024-01-01 14:49:15 +13:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% from 'bootstrap/form.html' import render_form %}
|
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
{% include 'admin/_nav.html' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<form method="get">
|
2024-01-02 16:07:41 +13:00
|
|
|
<input type="search" name="search" value="{{ search }}">
|
|
|
|
<input type="radio" name="local_remote" value="local" id="local_remote_local" {{ 'checked' if local_remote == 'local' }}><label for="local_remote_local"> Local</label>
|
|
|
|
<input type="radio" name="local_remote" value="remote" id="local_remote_remote" {{ 'checked' if local_remote == 'remote' }}><label for="local_remote_remote"> Remote</label>
|
2024-01-01 14:49:15 +13:00
|
|
|
<input type="submit" name="submit" value="Search" class="btn btn-primary">
|
|
|
|
</form>
|
|
|
|
<table class="table table-striped">
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Local/Remote</th>
|
2024-01-11 22:33:43 +13:00
|
|
|
<th>Seen</th>
|
2024-01-01 14:49:15 +13:00
|
|
|
<th>Attitude</th>
|
2024-01-07 14:41:02 +13:00
|
|
|
<th>Rep</th>
|
2024-01-01 14:49:15 +13:00
|
|
|
<th>Banned</th>
|
2024-01-01 16:26:57 +13:00
|
|
|
<th>Reports</th>
|
2024-01-03 16:29:58 +13:00
|
|
|
<th>IP</th>
|
2024-01-01 14:49:15 +13:00
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
2024-02-06 17:40:03 +13:00
|
|
|
{% for user in users.items %}
|
2024-01-01 14:49:15 +13:00
|
|
|
<tr>
|
|
|
|
<td><img src="{{ user.avatar_thumbnail() }}" class="community_icon rounded-circle" loading="lazy" />
|
|
|
|
{{ user.display_name() }}</td>
|
|
|
|
<td>{{ 'Local' if user.is_local() else 'Remote' }}</td>
|
2024-02-02 15:30:03 +13:00
|
|
|
<td>{% if request.args.get('local_remote', '') == 'local' %}
|
|
|
|
{{ moment(user.last_seen).fromNow() }}
|
|
|
|
{% else %}
|
|
|
|
{{ user.last_seen }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2024-01-07 14:41:02 +13:00
|
|
|
<td>{{ user.attitude * 100 if user.attitude != 1 }}</td>
|
|
|
|
<td>{{ 'R ' + str(user.reputation) if user.reputation }}</td>
|
2024-01-01 14:49:15 +13:00
|
|
|
<td>{{ '<span class="red">Banned</span>'|safe if user.banned }} </td>
|
2024-01-01 16:26:57 +13:00
|
|
|
<td>{{ user.reports if user.reports > 0 }} </td>
|
2024-01-03 16:29:58 +13:00
|
|
|
<td>{{ user.ip_address if user.ip_address }} </td>
|
2024-01-01 14:49:15 +13:00
|
|
|
<td><a href="/u/{{ user.link() }}">View local</a> |
|
|
|
|
{% if not user.is_local() %}
|
|
|
|
<a href="{{ user.ap_profile_id }}">View remote</a> |
|
|
|
|
{% else %}
|
|
|
|
View remote |
|
|
|
|
{% endif %}
|
|
|
|
<a href="{{ url_for('admin.admin_user_edit', user_id=user.id) }}">Edit</a> |
|
|
|
|
<a href="{{ url_for('admin.admin_user_delete', user_id=user.id) }}" class="confirm_first">Delete</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2024-01-23 19:17:05 +13:00
|
|
|
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
2024-01-01 14:49:15 +13:00
|
|
|
{% if prev_url %}
|
|
|
|
<a href="{{ prev_url }}" class="btn btn-primary">
|
|
|
|
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if next_url %}
|
|
|
|
<a href="{{ next_url }}" class="btn btn-primary">
|
|
|
|
{{ _('Next page') }} <span aria-hidden="true">→</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|