From 9700de054f73e9afa286ee7d18bfd7391fcb125d Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Fri, 10 Jan 2025 13:38:58 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20de=20l'affichage=20des=20ve?= =?UTF-8?q?rsions=20d'=C3=A9v=C3=A9nements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #268 --- .../single-event/event-single-inc.html | 65 +++++++++++-------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html b/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html index ab90f75..8c3480a 100644 --- a/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html +++ b/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html @@ -4,6 +4,36 @@ {% load event_extra %} {% load tag_extra %} + +{% if user.is_authenticated %} + +{% if event.other_versions %} + {% with poss_dup=event.get_other_versions %} + {% if poss_dup|length > 0 and event.masked %} +
+ {% if event.other_versions.representative %} + {% if event.pure_import %}Cette version de l'événement est fidèle à la source, mais l'événement existe en{% else %} + Cette version de l'événement existe en + {% endif %} + en plusieurs versions.
+ Tu peux consulter la version mise en avant. + {% else %} + Cet événement existe en plusieurs versions, et aucune n'a encore été choisie pour être mise en avant. + {% endif %} +
+ {% endif %} + {% endwith %} + {% if event.get_other_not_trash_versions|length == 0 %}

Aucune autre version n'est accessible publiquement

{% endif %} +{% endif %} +{% else %} +{% if event.other_versions.representative and event.masked %} +
+ Cette version de l'événement n'est pas dans sa forme la plus avantageuse. + L'équipe de modération a préparé pour toi une version à jour. +
+{% endif %} +{% endif %} +
{% include "agenda_culturel/ephemeris-inc.html" with event=event filter=filter %} @@ -48,34 +78,15 @@ {% endwith %} {% if user.is_authenticated %} - - {% if event.other_versions %} - {% with poss_dup=event.get_other_versions %} - {% if poss_dup|length > 0 %} -

- {% if event.other_versions.representative %} - Cet événement existe en plusieurs versions, - {% if event.masked %} - vous pouvez consulter la version mise en avant - {% else %} - et vous consultez la version mise en avant. - {% endif %} - {% else %} - cet événement existe probablement en plusieurs versions. - {% endif %} -

- {% endif %} - {% endwith %} - {% if event.get_other_not_trash_versions|length == 0 %}

Aucune autre version n'est accessible publiquement

{% endif %} - {% endif %} - {% else %} - {% if event.other_versions.representative and event.masked %} -

- Vous consultez l'événement dans une version non consolidée. Nous vous invitons - à consulter sa version représentative. -

- {% endif %} + {% if event.other_versions %} + {% with poss_dup=event.get_other_versions %} + {% if poss_dup|length > 0 and event.other_versions.representative and not event.masked %} +

Cette version est celle mise en avant, cependant il en existe en plusieurs versions.

+ {% endif %} + {% endwith %} {% endif %} + {% endif %} + {% if perms.agenda_culturel.change_message %} {% if event.message_set.all.count > 0 %}

Cet événement a été l'objet {% if event.message_set.all.count == 1 %}d'un message{% else %}de messages{% endif %}