mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
84 lines
No EOL
4.4 KiB
HTML
84 lines
No EOL
4.4 KiB
HTML
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
|
|
{% extends 'themes/' + theme() + '/base.html' %}
|
|
{% else %}
|
|
{% extends "base.html" %}
|
|
{% endif %} %}
|
|
{% from 'bootstrap/form.html' import render_form %}
|
|
{% set active_child = 'admin_users' %}
|
|
|
|
{% block app_content %}
|
|
<div class="row">
|
|
<div class="col">
|
|
<h1>{{ _('Users') }}</h1>
|
|
<a class="btn btn-primary" href="{{ url_for('admin.admin_users_add') }}" style="float: right;">{{ _('Add local user') }}</a>
|
|
<form method="get">
|
|
<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>
|
|
<input type="submit" name="submit" value="Search" class="btn btn-primary">
|
|
</form>
|
|
<table class="table table-striped mt-1">
|
|
<tr>
|
|
<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.') }}">Rep</th>
|
|
<th>Banned</th>
|
|
<th title="{{ _('How often a user has been reported.') }}">Reports</th>
|
|
<th title="{{ _('IP address of last interaction.') }}">IP</th>
|
|
<th title="{{ _('Which website linked to PieFed when the user initially registered.') }}">Source</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
{% for user in users.items %}
|
|
<tr>
|
|
<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>
|
|
<td>{% if request.args.get('local_remote', '') == 'local' %}
|
|
{{ moment(user.last_seen).fromNow() }}
|
|
{% else %}
|
|
{{ user.last_seen }}
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ user.attitude * 100 if user.attitude != 1 }}</td>
|
|
<td>{{ 'R ' + str(user.reputation) if user.reputation }}</td>
|
|
<td>{{ '<span class="red">Banned</span>'|safe if user.banned }} </td>
|
|
<td>{{ user.reports if user.reports > 0 }} </td>
|
|
<td>{{ user.ip_address if user.ip_address }}<br />{{ user.ip_address_country if user.ip_address_country }}</td>
|
|
<td>{{ user.referrer if user.referrer }} </td>
|
|
<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>
|
|
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
|
{% 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>
|
|
<hr />
|
|
<div class="row">
|
|
<div class="col">
|
|
{% include 'admin/_nav.html' %}
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
{% endblock %} |