2024-02-07 17:31:12 +13:00
|
|
|
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
|
|
|
|
{% extends 'themes/' + theme() + '/base.html' %}
|
|
|
|
{% else %}
|
|
|
|
{% extends "base.html" %}
|
|
|
|
{% endif %} %}
|
2024-01-01 14:49:15 +13:00
|
|
|
{% from 'bootstrap/form.html' import render_form %}
|
2024-04-14 20:05:40 +12:00
|
|
|
{% set active_child = 'admin_users' %}
|
2024-01-01 14:49:15 +13:00
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2024-04-14 20:05:40 +12:00
|
|
|
<h1>{{ _('Users') }}</h1>
|
2024-02-28 05:04:07 +13:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('admin.admin_users_add') }}" style="float: right;">{{ _('Add local user') }}</a>
|
2024-01-01 14:49:15 +13:00
|
|
|
<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>
|
2024-02-28 05:04:07 +13:00
|
|
|
<table class="table table-striped mt-1">
|
2024-01-01 14:49:15 +13:00
|
|
|
<tr>
|
2024-08-03 21:31:10 +12:00
|
|
|
<th title="{{ _('Display name.') }}">{{ _('Name') }}</th>
|
|
|
|
<th>{{ _('Local/Remote') }}</th>
|
|
|
|
<th title="{{ _('Last seen.') }}">{{ _('Seen') }}</th>
|
|
|
|
<th title="{{ _('Attitude: Percentage of up votes vs. down votes the account made.') }}">{{ _('Attitude') }}</th>
|
|
|
|
<th title="{{ _('Reputation: The Karma of the account. Total up votes minus down votes they got.') }}">{{ _('Reputation') }}</th>
|
|
|
|
<th>{{ _('Banned') }}</th>
|
|
|
|
<th title="{{ _('How often a user has been reported.') }}">{{ _('Reports') }}</th>
|
|
|
|
<th title="{{ _('IP address of last interaction.') }}">{{ _('IP and country code') }}</th>
|
|
|
|
<th title="{{ _('Which website linked to PieFed when the user initially registered.') }}">{{ _('Source') }}</th>
|
|
|
|
<th>{{ _('Actions') }}</th>
|
2024-01-01 14:49:15 +13:00
|
|
|
</tr>
|
2024-02-06 17:40:03 +13:00
|
|
|
{% for user in users.items %}
|
2024-01-01 14:49:15 +13:00
|
|
|
<tr>
|
2024-06-29 19:43:09 +02:00
|
|
|
<td><a href="/u/{{ user.link() }}">
|
|
|
|
<img src="{{ user.avatar_thumbnail() }}" class="community_icon rounded-circle" loading="lazy" />
|
|
|
|
{{ user.display_name() }}</a></td>
|
|
|
|
<td>{% if user.is_local() %}Local{% else %}<a href="{{ user.ap_profile_id }}">Remote</a>{% endif %}</td>
|
2024-02-02 15:30:03 +13:00
|
|
|
<td>{% if request.args.get('local_remote', '') == 'local' %}
|
2024-08-23 11:14:47 +12:00
|
|
|
{{ arrow.get(user.last_seen).humanize(locale=locale) }}
|
2024-02-02 15:30:03 +13:00
|
|
|
{% else %}
|
|
|
|
{{ user.last_seen }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2024-11-25 20:51:12 +01:00
|
|
|
<td>{% if user.attitude != 1 %}{{ (user.attitude * 100) | round | int }}%{% endif %}</td>
|
2024-11-25 20:39:10 +01:00
|
|
|
<td>{% if user.reputation %}R {{ user.reputation | round | int }}{% endif %}</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-08-01 16:24:36 +08:00
|
|
|
<td>{{ user.ip_address if user.ip_address }}<br />{{ user.ip_address_country if user.ip_address_country }}</td>
|
2024-02-23 16:52:17 +13:00
|
|
|
<td>{{ user.referrer if user.referrer }} </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>
|
2024-04-14 20:05:40 +12:00
|
|
|
<hr />
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
{% include 'admin/_nav.html' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
2024-01-01 14:49:15 +13:00
|
|
|
{% endblock %}
|