mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
pedagogy: moderation interface
This commit is contained in:
36
pedagogy/templates/pedagogy/moderation.jinja
Normal file
36
pedagogy/templates/pedagogy/moderation.jinja
Normal file
@ -0,0 +1,36 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
{% from 'core/macros.jinja' import select_all_checkbox %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}UV comment moderation{% endtrans %}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{{ url('pedagogy:moderation') }}", id="moderation_form" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<p style="margin-bottom: 1em;">{{ select_all_checkbox("moderation_form") }}</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{% trans %}UV{% endtrans %}</td>
|
||||
<td>{% trans %}Comment{% endtrans %}</td>
|
||||
<td>{% trans %}Reason{% endtrans %}</td>
|
||||
<td>{% trans %}Delete{% endtrans %}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set queryset = form.reports.field.queryset %}
|
||||
{% for widget in form.reports.subwidgets %}
|
||||
{% set report = queryset.get(id=widget.data.value) %}
|
||||
<tr>
|
||||
<td>{{ report.comment.uv }}</td>
|
||||
<td>{{ report.comment.comment|markdown }}</td>
|
||||
<td>{{ report.reason|markdown }}</td>
|
||||
<td>{{ widget.tag() }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<p><input type="submit" value="{% trans %}Delete comments{% endtrans %}"></p>
|
||||
</form>
|
||||
{% endblock content %}
|
Reference in New Issue
Block a user