Add a disclaimer when moderating weekly news

This commit is contained in:
imperosol 2025-01-26 00:10:01 +01:00
parent 266cef31cb
commit b23c322caa
2 changed files with 30 additions and 2 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">

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-20 17:35+0100\n"
"POT-Creation-Date: 2025-01-25 23:46+0100\n"
"PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
"Language-Team: AE info <ae.info@utbm.fr>\n"
@ -1263,7 +1263,7 @@ msgstr "Format : 16:9 | Résolution : 1920x1080"
msgid "Start date"
msgstr "Date de début"
#: com/forms.py
#: com/forms.py com/templates/com/macros.jinja
msgid "Weekly event"
msgstr "Événement Hebdomadaire"
@ -1422,6 +1422,16 @@ msgstr ""
"Elle sera cachée pour les autres utilisateurs tant qu'elle ne sera pas "
"modérée."
#: com/templates/com/macros.jinja
#, python-format
msgid ""
"This event will take place every week for %(nb)s weeks. If you moderate or delete "
"this event, it will also be moderated (or deleted) for the following weeks."
msgstr ""
"Cet événement se déroulera chaque semaine pendant %(nb)s semaines. Si vous "
"modérez ou supprimez cet événement, il sera également modéré (ou supprimé) "
"pour les semaines suivantes."
#: com/templates/com/macros.jinja com/templates/com/mailing_admin.jinja
#: com/templates/com/news_admin_list.jinja com/templates/com/news_detail.jinja
#: core/templates/core/file_detail.jinja