From 894316d3ffe5d2da13a4e30cfdb324c1bb2d0722 Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 10 Feb 2026 09:48:09 +0000 Subject: [PATCH] fix: replace blog.post.calendars url_for with events_url Calendar routes no longer exist in blog service. Post nav, entry items, blog cards, and header templates now link to events service via events_url() helper. Co-Authored-By: Claude Opus 4.6 --- suma_browser/templates/_types/blog/_card.html | 9 ++------- .../templates/_types/calendars/header/_header.html | 2 +- suma_browser/templates/_types/post/_entry_items.html | 9 ++------- suma_browser/templates/_types/post/admin/_nav.html | 2 +- .../templates/_types/post_data/header/_header.html | 2 +- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/suma_browser/templates/_types/blog/_card.html b/suma_browser/templates/_types/blog/_card.html index 1011676..ecb4858 100644 --- a/suma_browser/templates/_types/blog/_card.html +++ b/suma_browser/templates/_types/blog/_card.html @@ -76,14 +76,9 @@
{% for entry in post.associated_entries %} + {% set _entry_path = '/calendars/' + entry.calendar.slug + '/' + entry.start_at.year|string + '/' + entry.start_at.month|string + '/' + entry.start_at.day|string + '/entries/' + entry.id|string + '/' %}
{{ entry.name }}
diff --git a/suma_browser/templates/_types/calendars/header/_header.html b/suma_browser/templates/_types/calendars/header/_header.html index d645a5e..5c69931 100644 --- a/suma_browser/templates/_types/calendars/header/_header.html +++ b/suma_browser/templates/_types/calendars/header/_header.html @@ -1,7 +1,7 @@ {% import 'macros/links.html' as links %} {% macro header_row(oob=False) %} {% call links.menu_row(id='calendars-row', oob=oob) %} - {% call links.link(url_for('blog.post.calendars.home', slug=post.slug), hx_select_search) %} + {% call links.link(events_url('/calendars/'), hx_select_search) %}
Calendars diff --git a/suma_browser/templates/_types/post/_entry_items.html b/suma_browser/templates/_types/post/_entry_items.html index d913fe3..57bd2ad 100644 --- a/suma_browser/templates/_types/post/_entry_items.html +++ b/suma_browser/templates/_types/post/_entry_items.html @@ -4,14 +4,9 @@ {% set has_more_entries = has_more if has_more is defined else (associated_entries.has_more if associated_entries is defined else False) %} {% for entry in entry_list %} + {% set _entry_path = '/calendars/' + entry.calendar.slug + '/' + entry.start_at.year|string + '/' + entry.start_at.month|string + '/' + entry.start_at.day|string + '/entries/' + entry.id|string + '/' %} {% if entry.calendar.post.feature_image %} diff --git a/suma_browser/templates/_types/post/admin/_nav.html b/suma_browser/templates/_types/post/admin/_nav.html index fc206fe..93b8813 100644 --- a/suma_browser/templates/_types/post/admin/_nav.html +++ b/suma_browser/templates/_types/post/admin/_nav.html @@ -1,5 +1,5 @@ {% import 'macros/links.html' as links %} -{% call links.link(url_for('blog.post.calendars.home', slug=post.slug), hx_select_search, select_colours, True, aclass=styles.nav_button) %} +{% call links.link(events_url('/calendars/'), hx_select_search, select_colours, True, aclass=styles.nav_button) %} calendars {% endcall %} {% call links.link(url_for('blog.post.admin.entries', slug=post.slug), hx_select_search, select_colours, True, aclass=styles.nav_button) %} diff --git a/suma_browser/templates/_types/post_data/header/_header.html b/suma_browser/templates/_types/post_data/header/_header.html index 9450200..4754eb8 100644 --- a/suma_browser/templates/_types/post_data/header/_header.html +++ b/suma_browser/templates/_types/post_data/header/_header.html @@ -1,7 +1,7 @@ {% import 'macros/links.html' as links %} {% macro header_row(oob=False) %} {% call links.menu_row(id='post_data-row', oob=oob) %} - {% call links.link(url_for('blog.post.calendars.home', slug=post.slug), hx_select_search) %} + {% call links.link(events_url('/calendars/'), hx_select_search) %}
data