From caa73bd1c2d89e73097ac1c42472321bc5310ad0 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Fri, 17 Nov 2023 17:08:55 +0100 Subject: [PATCH] =?UTF-8?q?On=20ajoute=20date=20de=20cr=C3=A9ation=20et=20?= =?UTF-8?q?modification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/models.py | 3 +++ src/agenda_culturel/static/style.scss | 5 +++++ .../agenda_culturel/single-event/event-single-inc.html | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 8f2c50c..0a8c720 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -153,6 +153,9 @@ class Event(models.Model): def is_trash(self): return self.status == Event.STATUS.TRASH + def modified(self): + return abs((self.modified_date - self.created_date).total_seconds()) > 1 + class EventSubmissionForm(models.Model): diff --git a/src/agenda_culturel/static/style.scss b/src/agenda_culturel/static/style.scss index f978d06..8d23d97 100644 --- a/src/agenda_culturel/static/style.scss +++ b/src/agenda_culturel/static/style.scss @@ -384,4 +384,9 @@ $red-900: #b71c1c !default; --background-color: #{$green-50}; --icon: var(--icon-valid); --color: #{$green-800}; +} + +.footer { + opacity: 0.7; + font-size: 80%; } \ No newline at end of file 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 b0fd3c7..1faaf72 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 @@ -44,6 +44,11 @@ {% else %}

Cet événement est disponible uniquement sur les nuits énimagmatiques.

{% endif %} + {% if user.is_authenticated %}