First pass at views for reporting
This commit is contained in:
@ -114,8 +114,8 @@
|
||||
{% endif %}
|
||||
{% if perms.bookwyrm.edit_instance_settings %}
|
||||
<li>
|
||||
<a href="{% url 'settings-site' %}" class="navbar-item">
|
||||
{% trans 'Site Configuration' %}
|
||||
<a href="{% url 'settings-reports' %}" class="navbar-item">
|
||||
{% trans 'Admin' %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
@ -18,6 +18,10 @@
|
||||
{% url 'settings-invites' as url %}
|
||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Invites" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
{% url 'settings-reports' as url %}
|
||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Reports" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
{% url 'settings-federation' as url %}
|
||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Federated Servers" %}</a>
|
||||
|
14
bookwyrm/templates/settings/report_preview.html
Normal file
14
bookwyrm/templates/settings/report_preview.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends 'components/card.html' %}
|
||||
{% load i18n %}
|
||||
{% block card-header %}
|
||||
<h2 class="title is-4">
|
||||
<a href="{% url settings-report report.id %}">report title</a></h2>
|
||||
{% endblock %}
|
||||
|
||||
{% block card-content %}
|
||||
about this report
|
||||
{% endblock %}
|
||||
|
||||
{% block card-footer %}
|
||||
footer
|
||||
{% endblock
|
27
bookwyrm/templates/settings/reports.html
Normal file
27
bookwyrm/templates/settings/reports.html
Normal file
@ -0,0 +1,27 @@
|
||||
{% extends 'settings/admin_layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block header %}{% trans "Reports" %}{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li class="{% if filter == 'open' %}is-active{% endif %}"{% if filter == 'open' %} aria-current="page"{% endif %}>
|
||||
<a href="{% url 'settings-reports' %}?status=open">{% trans "Open" %}</a>
|
||||
</li>
|
||||
<li class="{% if filter == 'resolved' %}is-active{% endif %}"{% if filter == 'resolved' %} aria-current="page"{% endif %}>
|
||||
<a href="{% url 'settings-reports' %}?status=closed">{% trans "Resolved" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
{% for report in reports %}
|
||||
<li class="card">
|
||||
{% include 'settings/report_preview.html' with report=report %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
{% block dropdown-list %}
|
||||
{% if status.user == request.user %}
|
||||
{# things you can do to your own statuses #}
|
||||
<li role="menuitem">
|
||||
<form class="dropdown-item pt-0 pb-0" name="delete-{{status.id}}" action="/delete-status/{{ status.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
@ -19,9 +20,13 @@
|
||||
</form>
|
||||
</li>
|
||||
{% else %}
|
||||
{# things you can do to other people's statuses #}
|
||||
<li role="menuitem">
|
||||
<a href="/direct-messages/{{ status.user|username }}" class="button is-fullwidth is-small">{% trans "Send direct message" %}</a>
|
||||
</li>
|
||||
<li role="menuitem">
|
||||
<a href="{{ status.local_path }}/report" class="button is-fullwidth is-small">{% trans "Report status" %}</a>
|
||||
</li>
|
||||
<li role="menuitem">
|
||||
{% include 'snippets/block_button.html' with user=status.user class="is-fullwidth" %}
|
||||
</li>
|
||||
|
@ -12,6 +12,9 @@
|
||||
<li role="menuitem">
|
||||
<a href="/direct-messages/{{ user|username }}" class="button is-fullwidth is-small">{% trans "Send direct message" %}</a>
|
||||
</li>
|
||||
<li role="menuitem">
|
||||
<a href="{{ user.local_path }}/report" class="button is-fullwidth is-small">{% trans "Report user" %}</a>
|
||||
</li>
|
||||
<li role="menuitem">
|
||||
{% include 'snippets/block_button.html' with user=user class="is-fullwidth" %}
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user