From c7ebbda560bbc48e848e86576431e237c40e1765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Fuxj=C3=A4ger?= Date: Sat, 8 Jul 2023 22:53:27 +0200 Subject: [PATCH] Implement location display in calendar view --- cal/views.py | 4 +++- static/stylesheets/cal.css | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/cal/views.py b/cal/views.py index 677eeee..b990380 100644 --- a/cal/views.py +++ b/cal/views.py @@ -42,7 +42,9 @@ def formatday(self, day, weekday): if self.admin: body.append(u'✏️' % event.get_absolute_url()) body.append('' % event.wikiPage) - body.append('' + event.startDate.strftime('%H:%M') + ' ' + esc(event.name)) + body.append('' + event.startDate.strftime('%H:%M') + '') + body.append('' + esc(event.name) + '') + body.append('' + esc(event.location) + '') body.append('') body.append('') body.append('') diff --git a/static/stylesheets/cal.css b/static/stylesheets/cal.css index 46f31de..570cb1a 100644 --- a/static/stylesheets/cal.css +++ b/static/stylesheets/cal.css @@ -129,6 +129,23 @@ table.month .event-time { font-weight: bold; } +.event .event-name::before { + display: inline; + content: " "; +} + +.event .event-location { + display: none; +} + +.event .event-location::before { + content: " | "; +} + +.event:hover .event-location { + display: inline; +} + #calendar-year-list { text-align: right; }