moviewyrm/bookwyrm/templates/settings/users/user_info.html

128 lines
4.7 KiB
HTML
Raw Normal View History

{% load i18n %}
2021-05-11 22:14:42 +00:00
{% load markdown %}
2021-09-06 16:35:25 +00:00
{% load humanize %}
<div class="block columns">
<div class="column is-flex is-flex-direction-column">
2021-09-06 16:35:25 +00:00
<h4 class="title is-4">{% trans "Profile" %}</h4>
<div class="box is-flex-grow-1">
{% include 'user/user_preview.html' with user=user %}
{% if user.summary %}
<div class="box content has-background-white-ter is-shadowless">
2021-05-11 22:14:42 +00:00
{{ user.summary|to_markdown|safe }}
</div>
{% endif %}
<p class="mt-2"><a href="{{ user.local_path }}">{% trans "View user profile" %}</a></p>
</div>
</div>
2021-09-06 16:35:25 +00:00
<div class="column is-flex is-flex-direction-column is-4">
<h4 class="title is-4">{% trans "Status" %}</h4>
<div class="box is-flex-grow-1 has-text-weight-bold">
{% if user.is_active %}
<p class="notification is-success">
{% trans "Active" %}
</p>
{% else %}
<p class="notification is-warning">
{% trans "Inactive" %}
{% if user.deactivation_reason %}
<span class="help">({% trans user.get_deactivation_reason_display %})</span>
2021-09-06 16:35:25 +00:00
{% endif %}
</p>
{% endif %}
<p class="notification">
{% if user.local %}
{% trans "Local" %}
{% else %}
{% trans "Remote" %}
{% endif %}
</p>
</div>
</div>
</div>
<div class="block columns">
<div class="column is-flex is-flex-direction-column">
<h4 class="title is-4">{% trans "User details" %}</h4>
<div class="box content is-flex-grow-1">
<dl>
{% if user.local %}
<dt class="is-pulled-left mr-5">{% trans "Email:" %}</dt>
<dd>{{ user.email }}</dd>
2021-09-06 16:35:25 +00:00
{% endif %}
{% with report_count=user.report_set.count %}
<dt class="is-pulled-left mr-5">{% trans "Reports:" %}</dt>
<dd>
{{ report_count|intcomma }}
{% if report_count > 0 %}
<a href="{% url 'settings-reports' %}?username={{ user.username }}">
{% trans "(View reports)" %}
</a>
{% endif %}
</dd>
2021-09-06 16:35:25 +00:00
{% endwith %}
<dt class="is-pulled-left mr-5">{% trans "Blocked by count:" %}</dt>
<dd>{{ user.blocked_by.count }}</dd>
2021-09-06 16:35:25 +00:00
<dt class="is-pulled-left mr-5">{% trans "Last active date:" %}</dt>
<dd>{{ user.last_active_date }}</dd>
2021-09-06 16:35:25 +00:00
<dt class="is-pulled-left mr-5">{% trans "Manually approved followers:" %}</dt>
<dd>{{ user.manually_approves_followers }}</dd>
2021-09-06 16:35:25 +00:00
<dt class="is-pulled-left mr-5">{% trans "Discoverable:" %}</dt>
<dd>{{ user.discoverable }}</dd>
2021-09-06 16:35:25 +00:00
{% if not user.is_active %}
<dt class="is-pulled-left mr-5">{% trans "Deactivation reason:" %}</dt>
<dd>{{ user.deactivation_reason }}</dd>
2021-09-06 16:35:25 +00:00
{% endif %}
{% if not user.is_active and user.deactivation_reason == "pending" %}
<dt class="is-pulled-left mr-5">{% trans "Confirmation code:" %}</dt>
<dd>{{ user.confirmation_code }}</dd>
2021-09-06 16:35:25 +00:00
{% endif %}
</dl>
</div>
</div>
{% if not user.local %}
{% with server=user.federated_server %}
<div class="column is-half is-flex is-flex-direction-column">
<h4 class="title is-4">{% trans "Instance details" %}</h4>
<div class="box content is-flex-grow-1">
{% if server %}
<h5>{{ server.server_name }}</h5>
<dl>
<dt class="is-pulled-left mr-5">{% trans "Software:" %}</dt>
<dd>{{ server.application_type }}</dd>
<dt class="is-pulled-left mr-5">{% trans "Version:" %}</dt>
<dd>{{ server.application_version }}</dd>
<dt class="is-pulled-left mr-5">{% trans "Status:" %}</dt>
<dd>{{ server.status }}</dd>
</dl>
{% if server.notes %}
<h5>{% trans "Notes" %}</h5>
<div class="box content has-background-white-ter is-shadowless">
{{ server.notes }}
</div>
{% endif %}
<p>
<a href="{% url 'settings-federated-server' server.id %}">{% trans "View instance" %}</a>
</p>
{% else %}
<em>{% trans "Not set" %}</em>
{% endif %}
</div>
</div>
{% endwith %}
{% endif %}
</div>