From ac9d97d78d89fac5d36e9b1252a1ec62f4c86d22 Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 10 Feb 2026 23:51:40 +0000 Subject: [PATCH] fix: preserve post admin nav bar across events app pages - Add post-admin-header-child row to calendars, calendar, markets, and payments index templates so the admin nav bar persists - Create events-app-specific post/admin nav and header templates using coop_url() for blog endpoints instead of url_for() Co-Authored-By: Claude Opus 4.6 --- templates/_types/calendar/index.html | 8 +++-- templates/_types/calendars/index.html | 8 +++-- templates/_types/markets/index.html | 8 +++-- templates/_types/payments/index.html | 8 +++-- templates/_types/post/admin/_nav.html | 36 +++++++++++++++++++ .../_types/post/admin/header/_header.html | 12 +++++++ 6 files changed, 68 insertions(+), 12 deletions(-) create mode 100644 templates/_types/post/admin/_nav.html create mode 100644 templates/_types/post/admin/header/_header.html diff --git a/templates/_types/calendar/index.html b/templates/_types/calendar/index.html index 4652897..bdd0b49 100644 --- a/templates/_types/calendar/index.html +++ b/templates/_types/calendar/index.html @@ -5,9 +5,11 @@ {% block root_header_child %} {% from '_types/root/_n/macros.html' import index_row with context %} {% call index_row('post-header-child', '_types/post/header/_header.html') %} - {% call index_row('calendar-header-child', '_types/calendar/header/_header.html') %} - {% block calendar_header_child %} - {% endblock %} + {% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %} + {% call index_row('calendar-header-child', '_types/calendar/header/_header.html') %} + {% block calendar_header_child %} + {% endblock %} + {% endcall %} {% endcall %} {% endcall %} {% endblock %} diff --git a/templates/_types/calendars/index.html b/templates/_types/calendars/index.html index e685a6e..d958a0c 100644 --- a/templates/_types/calendars/index.html +++ b/templates/_types/calendars/index.html @@ -5,9 +5,11 @@ {% block root_header_child %} {% from '_types/root/_n/macros.html' import index_row with context %} {% call index_row('post-header-child', '_types/post/header/_header.html') %} - {% call index_row('calendars-header-child', '_types/calendars/header/_header.html') %} - {% block calendars_header_child %} - {% endblock %} + {% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %} + {% call index_row('calendars-header-child', '_types/calendars/header/_header.html') %} + {% block calendars_header_child %} + {% endblock %} + {% endcall %} {% endcall %} {% endcall %} {% endblock %} diff --git a/templates/_types/markets/index.html b/templates/_types/markets/index.html index d81e3d5..cb05b12 100644 --- a/templates/_types/markets/index.html +++ b/templates/_types/markets/index.html @@ -5,9 +5,11 @@ {% block root_header_child %} {% from '_types/root/_n/macros.html' import index_row with context %} {% call index_row('post-header-child', '_types/post/header/_header.html') %} - {% call index_row('markets-header-child', '_types/markets/header/_header.html') %} - {% block markets_header_child %} - {% endblock %} + {% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %} + {% call index_row('markets-header-child', '_types/markets/header/_header.html') %} + {% block markets_header_child %} + {% endblock %} + {% endcall %} {% endcall %} {% endcall %} {% endblock %} diff --git a/templates/_types/payments/index.html b/templates/_types/payments/index.html index 31a1002..721145c 100644 --- a/templates/_types/payments/index.html +++ b/templates/_types/payments/index.html @@ -5,9 +5,11 @@ {% block root_header_child %} {% from '_types/root/_n/macros.html' import index_row with context %} {% call index_row('post-header-child', '_types/post/header/_header.html') %} - {% call index_row('payments-header-child', '_types/payments/header/_header.html') %} - {% block payments_header_child %} - {% endblock %} + {% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %} + {% call index_row('payments-header-child', '_types/payments/header/_header.html') %} + {% block payments_header_child %} + {% endblock %} + {% endcall %} {% endcall %} {% endcall %} {% endblock %} diff --git a/templates/_types/post/admin/_nav.html b/templates/_types/post/admin/_nav.html new file mode 100644 index 0000000..2af0123 --- /dev/null +++ b/templates/_types/post/admin/_nav.html @@ -0,0 +1,36 @@ +{% import 'macros/links.html' as links %} + + + + + + + diff --git a/templates/_types/post/admin/header/_header.html b/templates/_types/post/admin/header/_header.html new file mode 100644 index 0000000..80cb91a --- /dev/null +++ b/templates/_types/post/admin/header/_header.html @@ -0,0 +1,12 @@ +{% import 'macros/links.html' as links %} +{% macro header_row(oob=False) %} + {% call links.menu_row(id='post-admin-row', oob=oob) %} + + {{ links.admin() }} + + {% call links.desktop_nav() %} + {% include '_types/post/admin/_nav.html' %} + {% endcall %} + {% endcall %} +{% endmacro %}