mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-29 20:44:24 +00:00
38 lines
1.4 KiB
Django/Jinja
38 lines
1.4 KiB
Django/Jinja
{% extends "core/base.jinja" %}
|
|
|
|
{% block title %}
|
|
{% trans %}UV comment moderation{% endtrans %}
|
|
{% endblock title %}
|
|
|
|
{% block content %}
|
|
{{ form.errors }}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td>{% trans %}UV{% endtrans %}</td>
|
|
<td>{% trans %}Comment{% endtrans %}</td>
|
|
<td>{% trans %}Reason{% endtrans %}</td>
|
|
<td>{% trans %}Action{% endtrans %}</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% set queryset = form.accepted_reports.field.queryset %}
|
|
{% for widget in form.accepted_reports.subwidgets %}
|
|
{% set report = queryset.get(id=widget.data.value.value) %}
|
|
<form action="{{ url('pedagogy:moderation') }}" method="post" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
<tr>
|
|
<td><a href="{{ url('pedagogy:uv_detail', uv_id=report.comment.uv.id) }}#{{ report.comment.uv.id }}">{{ report.comment.uv }}</a></td>
|
|
<td>{{ report.comment.comment|markdown }}</td>
|
|
<td>{{ report.reason|markdown }}</td>
|
|
<td>
|
|
<button name="accepted_reports" type="submit" value="{{ report.id }}">{% trans %}Delete comment{% endtrans %}</button>
|
|
<button name="denied_reports" type="submit" value="{{ report.id }}">{% trans %}Delete report{% endtrans %}</button>
|
|
</td>
|
|
</tr>
|
|
</form>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock content %}
|