mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
Add moderation tool to Trombi
This commit is contained in:
34
trombi/templates/trombi/comment_moderation.jinja
Normal file
34
trombi/templates/trombi/comment_moderation.jinja
Normal file
@ -0,0 +1,34 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Moderate Trombi comments{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{% trans %}Moderate Trombi comments{% endtrans %}</h3>
|
||||
<h4>{{ trombi }}</h4>
|
||||
<a href="{{ url('trombi:detail', trombi_id=object.id) }}">{% trans %}Back{% endtrans %}</a>
|
||||
<hr>
|
||||
<dl>
|
||||
{% for c in comments %}
|
||||
<dt>{% trans author=c.author.user.get_display_name(),
|
||||
target=c.target.user.get_display_name() %}Author: {{ author }} - Target: {{ target }}{% endtrans %}</dt>
|
||||
<dd>
|
||||
<p>
|
||||
{{ c.content }}
|
||||
</p>
|
||||
<form action="{{ url('trombi:moderate_comment', comment_id=c.id )}}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" id="action" value="accept" />
|
||||
<p><input type="submit" value="{% trans %}Accept{% endtrans %}" /></p>
|
||||
</form>
|
||||
<form action="{{ url('trombi:moderate_comment', comment_id=c.id )}}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" id="action" value="reject" />
|
||||
<p><input type="submit" value="{% trans %}Reject{% endtrans %}" /></p>
|
||||
</form>
|
||||
</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
|
||||
{% endblock %}
|
@ -7,6 +7,7 @@
|
||||
{% block content %}
|
||||
<h2>{% trans club=object.club %}{{ club }}'s Trombi{% endtrans %}</h2>
|
||||
<a href="{{ url('trombi:edit', trombi_id=object.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||
<a href="{{ url('trombi:moderate_comments', trombi_id=object.id) }}">{% trans %}Moderate comments{% endtrans %}</a>
|
||||
<p>{% trans %}Subscription deadline: {% endtrans %}{{ object.subscription_deadline|date(DATETIME_FORMAT) }}</p>
|
||||
<p>{% trans %}Comment deadline: {% endtrans %}{{ object.comments_deadline|date(DATETIME_FORMAT) }}</p>
|
||||
<a href="#">Export</a>
|
||||
|
@ -25,9 +25,9 @@
|
||||
<img src="{{ scrub_file }}" alt="" style="max-width: 200px">
|
||||
</div>
|
||||
<dl>
|
||||
{% for c in trombi_user.received_comments.all() %}
|
||||
{% for c in trombi_user.received_comments.filter(is_moderated=True) %}
|
||||
<dt style="font-weight: bold; font-size: 110%">{{ c.author.user.get_display_name() }}</dt>
|
||||
<dd>{{ c.content}}</dd>
|
||||
<dd>{{ c.content }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user