Add a disclaimer when moderating weekly news

This commit is contained in:
imperosol
2025-01-26 00:10:01 +01:00
parent bf388e68f0
commit b43b531c3b
2 changed files with 29 additions and 1 deletions

View File

@ -44,6 +44,24 @@
It will stay hidden for other users until it has been moderated.
{% endtrans %}
</p>
{% if user.has_perm("com.moderate_news") %}
{# This is an additional query for each non-moderated news,
but it will be executed only for admin users, and only one time
(if they do their job and moderated news as soon as they see them),
so it's still reasonable #}
{% set nb_event=news.dates.count() %}
{% if nb_event > 1 %}
<br>
<strong>{% trans %}Weekly event{% endtrans %}</strong>
<p>
{% trans trimmed nb=nb_event %}
This event will take place every week for {{ nb }} weeks.
If you moderate or delete this event,
it will also be moderated (or deleted) for the following weeks.
{% endtrans %}
</p>
{% endif %}
{% endif %}
</div>
{% if user.has_perm("com.moderate_news") %}
<span class="alert-aside" :aria-busy="loading">