From 125c9bd64a879067c0b5e07bc050ab5f0ed3be18 Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 10 Feb 2026 11:55:09 +0000 Subject: [PATCH] refactor: make calendar header and nav cross-service (events_url) Co-Authored-By: Claude Opus 4.6 --- .../templates/_types/calendar/_nav.html | 17 ++++++----------- .../_types/calendar/header/_header.html | 4 ++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/suma_browser/templates/_types/calendar/_nav.html b/suma_browser/templates/_types/calendar/_nav.html index fc7d0b6..cd972d2 100644 --- a/suma_browser/templates/_types/calendar/_nav.html +++ b/suma_browser/templates/_types/calendar/_nav.html @@ -1,17 +1,12 @@ {% import 'macros/links.html' as links %} -{% call links.link( - url_for('blog.post.calendars.calendar.slots.get', slug=post.slug, calendar_slug=calendar.slug), - hx_select_search, - select_colours, - aclass=styles.nav_button -) %} + -
- Slots -
-{% endcall %} +
Slots
+
{% if g.rights.admin %} {% from 'macros/admin_nav.html' import admin_nav_item %} - {{admin_nav_item(url_for('blog.post.calendars.calendar.admin.admin', slug=post.slug, calendar_slug=calendar.slug))}} + + + {% endif %} \ No newline at end of file diff --git a/suma_browser/templates/_types/calendar/header/_header.html b/suma_browser/templates/_types/calendar/header/_header.html index f62b039..73fe115 100644 --- a/suma_browser/templates/_types/calendar/header/_header.html +++ b/suma_browser/templates/_types/calendar/header/_header.html @@ -1,7 +1,7 @@ {% import 'macros/links.html' as links %} {% macro header_row(oob=False) %} {% call links.menu_row(id='calendar-row', oob=oob) %} - {% call links.link(url_for('blog.post.calendars.calendar.get', slug=post.slug, calendar_slug= calendar.slug), hx_select_search) %} +
@@ -12,7 +12,7 @@ {% from '_types/calendar/_description.html' import description %} {{description(calendar)}}
- {% endcall %} +
{% call links.desktop_nav() %} {% include '_types/calendar/_nav.html' %} {% endcall %}