moviewyrm/bookwyrm/templates/moderation/report.html

131 lines
4.8 KiB
HTML
Raw Normal View History

2021-03-09 02:36:34 +00:00
{% extends 'settings/admin_layout.html' %}
{% load i18n %}
{% load bookwyrm_tags %}
2021-03-12 23:56:54 +00:00
{% load humanize %}
2021-03-09 20:35:07 +00:00
{% block title %}{% blocktrans with report_id=report.id username=report.user.username %}Report #{{ report_id }}: {{ username }}{% endblocktrans %}{% endblock %}
{% block header %}{% blocktrans with report_id=report.id username=report.user.username %}Report #{{ report_id }}: {{ username }}{% endblocktrans %}{% endblock %}
2021-03-09 20:35:07 +00:00
{% block panel %}
<div class="block">
<a href="{% url 'settings-reports' %}">{% trans "Back to reports" %}</a>
</div>
<div class="block">
{% include 'moderation/report_preview.html' with report=report %}
2021-03-09 20:35:07 +00:00
</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 is-flex-grow-1">
{% include 'user/user_preview.html' with user=report.user %}
{% if report.user.summary %}
<div class="box content has-background-white-ter is-shadowless">
{{ report.user.summary | to_markdown | safe }}
</div>
{% endif %}
<p class="mt-2"><a href="{{ report.user.local_path }}">{% trans "View user profile" %}</a></p>
</div>
</div>
{% if not report.user.local %}
{% with server=report.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>
<div class="is-flex">
<dt>{% trans "Software:" %}</dt>
<dd>{{ server.application_type }}</dd>
</div>
<div class="is-flex">
<dt>{% trans "Version:" %}</dt>
<dd>{{ server.application_version }}</dd>
</div>
<div class="is-flex">
<dt>{% trans "Status:" %}</dt>
<dd>{{ server.status }}</dd>
</div>
</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>
2021-03-09 20:35:07 +00:00
<div class="block content">
<h3>{% trans "Actions" %}</h3>
2021-03-12 19:13:53 +00:00
<div class="is-flex">
<p class="mr-1">
<a class="button" href="{% url 'direct-messages-user' report.user.username %}">{% trans "Send direct message" %}</a>
</p>
<form name="deactivate" method="post" action="{% url 'settings-report-deactivate' report.id %}">
{% csrf_token %}
{% if report.user.is_active %}
<button type="submit" class="button is-danger is-light">{% trans "Deactivate user" %}</button>
{% else %}
<button class="button">{% trans "Reactivate user" %}</button>
{% endif %}
</form>
2021-03-09 20:35:07 +00:00
</div>
2021-03-12 23:56:54 +00:00
</div>
2021-03-09 20:35:07 +00:00
2021-03-12 23:56:54 +00:00
<div class="block">
<h3 class="title is-4">{% trans "Moderator Comments" %}</h3>
2021-03-09 20:35:07 +00:00
{% for comment in report.reportcomment_set.all %}
2021-03-12 23:56:54 +00:00
<div class="card block">
<p class="card-content">{{ comment.note }}</p>
<div class="card-footer">
<div class="card-footer-item">
<a href="{{ comment.user.local_path }}">{{ comment.user.display_name }}</a>
</div>
<div class="card-footer-item">
{{ comment.created_date | naturaltime }}
</div>
</div>
2021-03-09 20:35:07 +00:00
</div>
{% endfor %}
2021-03-12 23:56:54 +00:00
<form class="block" name="report-comment" method="post" action="{% url 'settings-report' report.id %}">
{% csrf_token %}
2021-03-09 20:35:07 +00:00
<label for="report_comment" class="label">Comment on report</label>
2021-03-12 23:56:54 +00:00
<textarea name="note" id="report_comment" class="textarea"></textarea>
2021-03-09 20:35:07 +00:00
<button class="button">{% trans "Comment" %}</button>
2021-03-12 23:56:54 +00:00
</form>
2021-03-09 20:35:07 +00:00
</div>
2021-03-12 01:38:21 +00:00
<div class="block">
<h3 class="title is-4">{% trans "Reported statuses" %}</h3>
{% if not report.statuses.exists %}
<em>{% trans "No statuses reported" %}</em>
{% else %}
2021-03-09 20:35:07 +00:00
<ul>
2021-03-12 01:38:21 +00:00
{% for status in report.statuses.select_subclasses.all %}
<li>
{% if status.deleted %}
<em>{% trans "Statuses has been deleted" %}</em>
{% else %}
2021-03-12 01:38:21 +00:00
{% include 'snippets/status/status.html' with status=status moderation_mode=True %}
{% endif %}
2021-03-12 01:38:21 +00:00
</li>
2021-03-09 20:35:07 +00:00
{% endfor %}
</ul>
{% endif %}
2021-03-09 20:35:07 +00:00
</div>
{% endblock %}