From defe0b1792d96db1cd535f9e43f3d67535eaf1c5 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Fri, 24 Jan 2025 17:08:49 +0100 Subject: [PATCH] =?UTF-8?q?Modification=20des=20interactions=20de=20mod?= =?UTF-8?q?=C3=A9ration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #287 --- src/agenda_culturel/static/style.scss | 14 +- .../agenda_culturel/administration.html | 2 +- .../agenda_culturel/edit-buttons-inc.html | 30 ++-- .../templates/agenda_culturel/recent.html | 2 +- .../templates/agenda_culturel/search.html | 4 +- .../single-event/event-elegant-inc.html | 2 +- .../single-event/event-in-flat-list-inc.html | 132 +++++++++--------- .../single-event/event-single-inc.html | 4 +- src/agenda_culturel/views.py | 19 ++- 9 files changed, 116 insertions(+), 93 deletions(-) diff --git a/src/agenda_culturel/static/style.scss b/src/agenda_culturel/static/style.scss index 19b5ba3..f189cef 100644 --- a/src/agenda_culturel/static/style.scss +++ b/src/agenda_culturel/static/style.scss @@ -1820,4 +1820,16 @@ dialog { height: 1.3em; vertical-align: middle; margin-bottom: .2em; -} \ No newline at end of file +} + +.status_trash header, .status_trash footer, +.status_draft header, .status_draft footer { + background: repeating-linear-gradient( + 45deg, + rgba(80, 80, 80, 0.1), + rgba(80, 80, 80, 0.1) 10px, + rgba(80, 80, 80, 0.25) 10px, + rgba(80, 80, 80, 0.25) 20px + ), + +} diff --git a/src/agenda_culturel/templates/agenda_culturel/administration.html b/src/agenda_culturel/templates/agenda_culturel/administration.html index 795c496..ab9325b 100644 --- a/src/agenda_culturel/templates/agenda_culturel/administration.html +++ b/src/agenda_culturel/templates/agenda_culturel/administration.html @@ -86,7 +86,7 @@

Derniers événements soumis

{% for e in events %} -
{% include "agenda_culturel/single-event/event-in-flat-list-inc.html" with event=e %}
+ {% include "agenda_culturel/single-event/event-in-flat-list-inc.html" with event=e %} {% endfor %} diff --git a/src/agenda_culturel/templates/agenda_culturel/edit-buttons-inc.html b/src/agenda_culturel/templates/agenda_culturel/edit-buttons-inc.html index be737e6..fc15cad 100644 --- a/src/agenda_culturel/templates/agenda_culturel/edit-buttons-inc.html +++ b/src/agenda_culturel/templates/agenda_culturel/edit-buttons-inc.html @@ -2,38 +2,36 @@ {% load utils_extra %} {% if event.moderated_date %} -Modérer de nouveau {% picto_from_name "check-square" %} +modérer de nouveau {% picto_from_name "check-square" %} {% else %} -Modérer {% picto_from_name "check-square" %} +modérer {% picto_from_name "check-square" %} {% endif %} {% if event.pure_import %} {% with event.get_local_version as local %} {% if local %} - voir la version locale {% picto_from_name "eye" %} + Voir la version locale {% picto_from_name "eye" %} {% else %} - modifier {% picto_from_name "edit-3" %} + modifier & modérer {% picto_from_name "edit-3" %} {% endif %} {% endwith %} {% else %} -modifier {% picto_from_name "edit-3" %} +modifier & modérer {% picto_from_name "edit-3" %} {% endif %} {% if event.is_updateable %} -Réimporter {% picto_from_name "download-cloud" %} +réimporter {% picto_from_name "download-cloud" %} {% endif %} -{% if event.status != "published" %} +{% if event.status == "draft" and details == 1 %} publier {% picto_from_name "eye" %} {% endif %} -{% if event.status == "published" %} -dépublier {% picto_from_name "eye-off" %} -{% elif event.status == "trash" %} -restaurer {% picto_from_name "eye-off" %} -{% endif %} - -{% if event.status != "trash" %} +{% if event.status == "trash" %} + {% if details == 1 %} + restaurer {% picto_from_name "eye-off" %} + {% endif %} +{% else %} supprimer {% picto_from_name "trash-2" %} {% endif %} @@ -41,6 +39,6 @@ supprimer définitivement {% picto_from_name "x-circle" %} {% endif %} -{% if with_clone %} -Dupliquer {% picto_from_name "copy" %} +{% if details == 1 %} +dupliquer {% picto_from_name "copy" %} {% endif %} diff --git a/src/agenda_culturel/templates/agenda_culturel/recent.html b/src/agenda_culturel/templates/agenda_culturel/recent.html index fe0001a..5ef791c 100644 --- a/src/agenda_culturel/templates/agenda_culturel/recent.html +++ b/src/agenda_culturel/templates/agenda_culturel/recent.html @@ -40,7 +40,7 @@
{% for obj in paginator_filter %} -
{% include "agenda_culturel/single-event/event-in-flat-list-inc.html" with event=obj %}
+ {% include "agenda_culturel/single-event/event-in-flat-list-inc.html" with event=obj %} {% endfor %}