mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-06-03 05:49:35 +00:00
5b051631ec
* update User model to allow for moved_to and also_known_as values * allow users to add aliases (also_known_as) in UI * allow users to move account to another one (moved_to) * redirect webfinger to the new account after a move * present notification to followers inviting to follow at new account Note: unlike Mastodon we're not running any unfollow/autofollow action here: users can decide for themselves This makes undoing moves easier. TODO There is still a bug with incoming Moves, at least from Mastodon. This seems to be something to do with Update activities (rather than Move, strictly).
120 lines
4.7 KiB
HTML
120 lines
4.7 KiB
HTML
{% extends 'settings/layout.html' %}
|
|
{% load i18n %}
|
|
{% load utilities %}
|
|
|
|
{% block title %}{% trans "Users" %}{% endblock %}
|
|
|
|
{% block header %}
|
|
{% if server %}
|
|
{% blocktrans with instance_name=server.server_name %}Users: <small>{{ instance_name }}</small>{% endblocktrans %}
|
|
<a href="{% url 'settings-users' %}" class="help has-text-weight-normal">Clear filters</a>
|
|
{% else %}
|
|
{% trans "Users" %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block panel %}
|
|
|
|
{% include 'settings/users/user_admin_filters.html' %}
|
|
|
|
<div class="block">
|
|
<div class="tabs">
|
|
<ul>
|
|
{% url 'settings-users' as url %}
|
|
<li {% if request.path in url %}class="is-active" aria-current="page"{% endif %}>
|
|
<a href="{{ url }}">{% trans "Local users" %}</a>
|
|
</li>
|
|
{% url 'settings-users' status="deleted" as url %}
|
|
<li {% if url in request.path %}class="is-active" aria-current="page"{% endif %}>
|
|
<a href="{{ url }}">{% trans "Deleted users" %}</a>
|
|
</li>
|
|
{% url 'settings-users' status="federated" as url %}
|
|
<li {% if url in request.path %}class="is-active" aria-current="page"{% endif %}>
|
|
<a href="{{ url }}">{% trans "Federated community" %}</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-container block">
|
|
<table class="table is-striped is-fullwidth">
|
|
<tr>
|
|
{% url 'settings-users' as url %}
|
|
<th colspan="2">
|
|
{% trans "Username" as text %}
|
|
{% include 'snippets/table-sort-header.html' with field="username" sort=sort text=text %}
|
|
</th>
|
|
<th>
|
|
{% trans "Date Added" as text %}
|
|
{% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %}
|
|
</th>
|
|
<th>
|
|
{% trans "Last Active" as text %}
|
|
{% include 'snippets/table-sort-header.html' with field="last_active_date" sort=sort text=text %}
|
|
</th>
|
|
<th>
|
|
{% trans "Status" as text %}
|
|
{% include 'snippets/table-sort-header.html' with field="is_active" sort=sort text=text %}
|
|
</th>
|
|
{% if status == "federated" %}
|
|
<th>
|
|
{% trans "Remote instance" as text %}
|
|
{% include 'snippets/table-sort-header.html' with field="federated_server__server_name" sort=sort text=text %}
|
|
</th>
|
|
{% endif %}
|
|
</tr>
|
|
{% for user in users %}
|
|
<tr>
|
|
<td class="pr-0">
|
|
{% include 'snippets/avatar.html' with user=user %}
|
|
</td>
|
|
<td class="overflow-wrap-anywhere pl-1">
|
|
<a href="{% url 'settings-user' user.id %}">{{ user|username }}</a>
|
|
</td>
|
|
<td>{{ user.created_date }}</td>
|
|
<td>{{ user.last_active_date }}</td>
|
|
<td>
|
|
{% if user.is_active %}
|
|
{% if user.moved_to %}
|
|
<span class="tag is-info" aria-hidden="true">
|
|
<span class="icon icon-x"></span>
|
|
</span>
|
|
{% trans "Moved" %}
|
|
{% else %}
|
|
<span class="tag is-success" aria-hidden="true">
|
|
<span class="icon icon-check"></span>
|
|
</span>
|
|
{% trans "Active" %}
|
|
{% endif %}
|
|
{% elif user.deactivation_reason == "moderator_deletion" or user.deactivation_reason == "self_deletion" %}
|
|
<span class="tag is-danger" aria-hidden="true">
|
|
<span class="icon icon-x"></span>
|
|
</span>
|
|
{% trans "Deleted" %}
|
|
<span class="help">({{ user.get_deactivation_reason_display }})</span>
|
|
{% else %}
|
|
<span class="tag is-warning" aria-hidden="true">
|
|
<span class="icon icon-x"></span>
|
|
</span>
|
|
{% trans "Inactive" %}
|
|
<span class="help">({{ user.get_deactivation_reason_display }})</span>
|
|
{% endif %}
|
|
</td>
|
|
{% if status == "federated" %}
|
|
<td>
|
|
{% if user.federated_server %}
|
|
<a href="{% url 'settings-federated-server' user.federated_server.id %}">{{ user.federated_server.server_name }}</a>
|
|
{% else %}
|
|
<em>{% trans "Not set" %}</em>
|
|
{% endif %}
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
|
|
{% include 'snippets/pagination.html' with page=users path=request.path %}
|
|
{% endblock %}
|
|
|