Option to deactivate reported users

This commit is contained in:
Mouse Reeve
2021-03-12 11:13:53 -08:00
parent 422cd2da73
commit 677a49fee3
6 changed files with 52 additions and 6 deletions

View File

@ -15,9 +15,18 @@
<div class="block content">
<h3>{% trans "Actions" %}</h3>
<div class="field is-grouped">
<a class="button" href="{% url 'direct-messages-user' report.user.username %}">{% trans "Send direct message" %}</a>
<button class="button">Suspend</button>
<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>
</div>
{% for comment in report.reportcomment_set.all %}

View File

@ -8,8 +8,11 @@
{% endblock %}
{% block card-content %}
<div class="block">
{% if report.note %}{{ report.note }}{% else %}<em>{% trans "No notes provided" %}</em>{% endif %}
<div class="block content">
<p>
{% if report.note %}{{ report.note }}{% else %}<em>{% trans "No notes provided" %}</em>{% endif %}
</p>
<p><a href="{{ report.user.local_path }}">{% trans "View user profile" %}</a></p>
</div>
{% endblock %}