First pass at views for reporting

This commit is contained in:
Mouse Reeve
2021-03-08 15:49:44 -08:00
parent bf255bd51d
commit ab57b5b906
9 changed files with 102 additions and 3 deletions

View File

@ -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>

View 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

View 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 %}