From 7c12a9dfc9f8592227611394a9c679cc61ac7dd7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 26 Apr 2025 12:00:28 +0100 Subject: [PATCH] Append address to calendar events if it is available --- webapp_calendar.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webapp_calendar.py b/webapp_calendar.py index b53601082..2f8a48b47 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -191,6 +191,7 @@ def _html_calendar_day(person_cache: {}, translate: {}, event_description = None event_language = system_language event_place = None + event_address = None post_id = None sender_name = '' sender_actor = None @@ -234,6 +235,8 @@ def _html_calendar_day(person_cache: {}, translate: {}, if evnt.get('name'): event_description = evnt['name'].strip() elif evnt['type'] == 'Place': + if evnt.get('address'): + event_address = remove_html(evnt['address']) if evnt.get('name'): event_place = remove_html(evnt['name']) if '://' in event_place: @@ -304,6 +307,10 @@ def _html_calendar_day(person_cache: {}, translate: {}, event_time_markup + ' - ' + \ '' + # if an address is given then append it to the description + if event_address and event_description: + event_description += \ + '

' + event_address + '

' if event_time and event_description and event_place: calendar_str += \ '' + \