Sith/com/templates/com/mailing_admin.jinja

46 lines
1.5 KiB
Django/Jinja
Raw Normal View History

2017-08-17 18:55:20 +00:00
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Mailing lists administration{% endtrans %}
{% endblock %}
2017-08-21 17:53:17 +00:00
{% macro display_mailings(list) %}
2017-08-17 18:55:20 +00:00
<table>
<tr>
<th>{% trans %}Email{% endtrans %}</th>
<th>{% trans %}Club{%endtrans%}</th>
2017-08-21 17:53:17 +00:00
<th>{% trans %}Actions{% endtrans %}</th>
2017-08-17 18:55:20 +00:00
</tr>
2017-08-21 17:53:17 +00:00
{% for mailing in list %}
2017-08-17 18:55:20 +00:00
<tr>
2017-08-22 20:39:12 +00:00
<td>{{ mailing.email_full }}</td>
2017-08-21 17:53:17 +00:00
<td><a href="{{ url('club:mailing', club_id=mailing.club.id) }}">{{ mailing.club }}</a></td>
<td>
<a href="{{ url('com:mailing_delete', mailing_id=mailing.id) }}">{% trans %}Delete{% endtrans %}</a> - {% if not mailing.is_moderated %}<a href="{{ url('com:mailing_moderate', mailing_id=mailing.id) }}">{% trans %}Moderate{% endtrans %}</a>{% else %}{% trans user=mailing.moderator %}Moderated by {{ user }}{% endtrans %}{% endif %}
</td>
2017-08-17 18:55:20 +00:00
</tr>
{% endfor %}
</table>
2017-08-21 17:53:17 +00:00
{% endmacro %}
{% block content %}
<h1>{% trans %}This page lists all mailing lists{% endtrans %}</h1>
{% if has_unmoderated %}
<h2>{% trans %}Not moderated mailing lists{% endtrans %}</h2>
{{ display_mailings(unmoderated) }}
{% endif %}
2017-08-17 18:55:20 +00:00
2017-08-21 17:53:17 +00:00
<h2>{% trans %}Moderated mailing lists{% endtrans %}</h2>
{% if has_moderated %}
{{ display_mailings(moderated) }}
2017-08-17 18:55:20 +00:00
{% else %}
2017-08-19 14:13:53 +00:00
<p>{% trans %}No mailing list existing{% endtrans %}</p>
2017-08-17 18:55:20 +00:00
{% endif %}
{% endblock %}