From 87b5ff12c58cf5f4db7e58207fc5e9a8c6729444 Mon Sep 17 00:00:00 2001 From: Julien Constant Date: Tue, 14 Mar 2023 12:15:35 +0100 Subject: [PATCH] Implements #520 --- com/models.py | 2 ++ core/static/core/style.scss | 5 +++++ core/templates/core/base.jinja | 32 ++++++++++++++++++-------------- core/utils.py | 6 ++++++ locale/fr/LC_MESSAGES/django.po | 4 ++++ 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/com/models.py b/com/models.py index c3061ed0..c61fe7b4 100644 --- a/com/models.py +++ b/com/models.py @@ -36,6 +36,7 @@ from django.core.exceptions import ValidationError from django.utils import timezone +from core import utils from core.models import User, Preferences, RealGroup, Notification, SithFile from club.models import Club @@ -46,6 +47,7 @@ class Sith(models.Model): alert_msg = models.TextField(_("alert message"), default="", blank=True) info_msg = models.TextField(_("info message"), default="", blank=True) weekmail_destinations = models.TextField(_("weekmail destinations"), default="") + version = utils.get_git_revision_short_hash() def is_owned_by(self, user): return user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) diff --git a/core/static/core/style.scss b/core/static/core/style.scss index 189682ea..218f636c 100644 --- a/core/static/core/style.scss +++ b/core/static/core/style.scss @@ -1730,6 +1730,11 @@ footer { } } } + + > .version { + margin-top: 3px; + color: rgba(0, 0, 0, .3) + } } /*---------------------------------FORMS-------------------------------*/ diff --git a/core/templates/core/base.jinja b/core/templates/core/base.jinja index 3e31d280..15000ee1 100644 --- a/core/templates/core/base.jinja +++ b/core/templates/core/base.jinja @@ -269,20 +269,24 @@ {% if not popup %} - + {% endif %}