From 57268bc9c2cf0732a5f32f5ebab497d488309e38 Mon Sep 17 00:00:00 2001 From: Nicolas Margulies Date: Thu, 11 Jan 2024 19:48:41 +0100 Subject: [PATCH] Styling and catching late registrations as old --- apps/activity/tables.py | 4 ++-- note_kfet/static/css/custom.css | 4 ++++ note_kfet/static/js/base.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/activity/tables.py b/apps/activity/tables.py index 24fedcd6..6485952a 100644 --- a/apps/activity/tables.py +++ b/apps/activity/tables.py @@ -78,8 +78,8 @@ def get_row_class(record): elif record.note.balance < 0: c += " table-danger" # MODE VIEUXCON=ON - if (datetime.datetime.utcnow().timestamp() - record.note.created_at.timestamp()) > 3600 * 24 * 365 * 3: - c += " font-weight-bold" + if (datetime.datetime.utcnow().timestamp() - record.note.created_at.timestamp()) > 3600 * 24 * 365 * 2.5: + c += " font-weight-bold underline" return c diff --git a/note_kfet/static/css/custom.css b/note_kfet/static/css/custom.css index 57bb1f16..4f184af8 100755 --- a/note_kfet/static/css/custom.css +++ b/note_kfet/static/css/custom.css @@ -3,6 +3,10 @@ text-decoration: underline; } +.underline { + text-decoration: underline; +} + /* Opaque tooltip with white background */ .tooltip.show { opacity: 1; diff --git a/note_kfet/static/js/base.js b/note_kfet/static/js/base.js index add93cb8..4a34a911 100644 --- a/note_kfet/static/js/base.js +++ b/note_kfet/static/js/base.js @@ -102,7 +102,7 @@ function displayStyle (note) { else if (balance < 0) { css += ' text-warning' } if (!note.email_confirmed) { css += ' bg-primary' } else if (!note.is_active || (note.membership && note.membership.date_end < new Date().toISOString())) { css += ' bg-info' } - if (((Date.now() - Date.parse(note.created_at))/ms_per_year) > 3) { css += 'font-weight-bold' } + if (((Date.now() - Date.parse(note.created_at))/ms_per_year) > 2.5) { css += ' font-weight-bold underline' } return css }