From a117ee1b1a5eab3866794802a729e7f64b3729ca Mon Sep 17 00:00:00 2001 From: raeeceip Date: Sat, 16 Mar 2024 01:50:12 -0400 Subject: [PATCH] Ensure consistent event summary presentation via modal and direct access - Modify the statfile function in main.py to correctly generate summary URLs, including proper handling of the date in meetname. This change ensures that the URL for event summaries is correctly formed, both for direct access and when loaded in a modal. - Update statfile.html.j2 and event_summary.html.j2 templates to support redirection from '/smry' paths to canonical event pages. This ensures users experience consistent styling and functionality, regardless of access method. - Implement a redirection mechanism in main.py for '/smry' URLs to redirect to the styled event summary pages, enhancing the consistency of user experience across the platform. These changes address user feedback regarding discrepancies in content presentation between modal-loaded summaries and their directly accessed counterparts, streamlining the user interface and reinforcing intuitive navigation. --- mote/main.py | 3 +++ mote/templates/event_summary.html.j2 | 2 ++ mote/templates/statfile.html.j2 | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/mote/main.py b/mote/main.py index cce321ac..3b047a7b 100644 --- a/mote/main.py +++ b/mote/main.py @@ -124,6 +124,8 @@ def statfile(channame, cldrdate, meetname, typecont): abort(404) else: meeting_title = re.search(main.config["RECOGNIITION_PATTERN"], meetname) + # Generate URL for the summary page + summary_url = url_for('evtsmry', channame=channame, cldrdate=cldrdate, meetname=meetname) return render_template( "statfile.html.j2", @@ -133,6 +135,7 @@ def statfile(channame, cldrdate, meetname, typecont): timetext=meeting_title.group(3), typecont=typecont, meetcont=meetcont[1], + summary_url=summary_url, # URL for the summary page ) diff --git a/mote/templates/event_summary.html.j2 b/mote/templates/event_summary.html.j2 index 0798abf3..a607c677 100644 --- a/mote/templates/event_summary.html.j2 +++ b/mote/templates/event_summary.html.j2 @@ -63,6 +63,8 @@ {% endfor %} + View Full Logs +

Action Items ({{ meet['actions']|length }})

diff --git a/mote/templates/statfile.html.j2 b/mote/templates/statfile.html.j2 index 06e2081d..9b4788df 100644 --- a/mote/templates/statfile.html.j2 +++ b/mote/templates/statfile.html.j2 @@ -32,6 +32,11 @@
{{ meetcont | safe }} + + {% if summary_url %} + Back to Event Summary + {% endif %} +