From 5e55e64d1e9436412de7212c0c88570f3aaa64f1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 20 Feb 2026 12:35:44 +0000 Subject: [PATCH] Bug 41367: add AdminMenu island and integrate into Record sources - Replace static TT admin-menu sidebar with AdminMenu.vue island web component registered in the islands componentRegistry - Fix NavigationItem to conditionally apply breadcrumb-item class via isBreadcrumb prop, fixing incorrect class on left-menu items - Update record_sources.tt to use sub-header/main-container wrappers with aside='admin-menu', rendering the admin sidebar and breadcrumbs - Update RecordSources/Main.vue to use Teleport for breadcrumbs into the sub-header container and remove self-contained layout Test plan: 1. Go to Administration > Additional parameters > Record sources 2. Confirm the administration sidebar menu appears on the left side of the page, with all sections visible according to your permissions (System preferences, Basic parameters, Catalog, etc.) 3. Confirm the breadcrumb trail at the top reads: Koha > Administration > Record sources 4. Confirm the "Additional parameters" section of the sidebar is expanded and "Record sources" is not highlighted as current (it lives in the main content area, not the sidebar) 5. Click another link in the sidebar (e.g. "System preferences") and confirm navigation works normally 6. Return to Record sources and add, edit, and delete a record source to confirm the sidebar does not interfere with the SPA behaviour 7. Navigate to any other admin page (e.g. Libraries, Item types) and confirm the sidebar still renders correctly on those pages Sponsored-by: OpenFifth --- .../prog/en/includes/admin-menu.inc | 250 ++----- .../prog/en/modules/admin/record_sources.tt | 10 +- .../components/Admin/RecordSources/Main.vue | 23 +- .../prog/js/vue/components/Breadcrumbs.vue | 2 + .../js/vue/components/Islands/AdminMenu.vue | 635 ++++++++++++++++++ .../prog/js/vue/components/NavigationItem.vue | 12 +- .../prog/js/vue/modules/islands.ts | 15 + 7 files changed, 730 insertions(+), 217 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AdminMenu.vue diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc index 16b05c407ee..4488545dcd5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -1,195 +1,57 @@ [% USE Koha %] - - - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/record_sources.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/record_sources.tt index 5ff0b0a6e13..66b2f03a520 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/record_sources.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/record_sources.tt @@ -21,14 +21,20 @@ [% INCLUDE 'prefs-admin-search.inc' %] [% END %] -
+[% WRAPPER 'sub-header.inc' %] +
+[% END #/ WRAPPER sub-header.inc %] + +[% WRAPPER 'main-container.inc' aside='admin-menu' %] +
+[% END #/ WRAPPER main-container.inc %] [% MACRO jsinclude BLOCK %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'js-date-format.inc' %] - + [% Asset.js("js/admin-menu.js") | $raw %] [% Asset.js("js/vue/dist/admin/record_sources.js") | $raw %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/Main.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/Main.vue index 615745c00e8..7332cddce71 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/Main.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/Main.vue @@ -1,34 +1,21 @@ - - diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Breadcrumbs.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Breadcrumbs.vue index c05f829999a..17b1a362a71 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Breadcrumbs.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Breadcrumbs.vue @@ -6,6 +6,7 @@ v-if="idx < breadcrumbs.length - 1 || item.breadcrumbFormat" :item="item" :params="params" + :isBreadcrumb="true" > diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AdminMenu.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AdminMenu.vue new file mode 100644 index 00000000000..bc806611f19 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AdminMenu.vue @@ -0,0 +1,635 @@ + + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/NavigationItem.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/NavigationItem.vue index 59597e49974..3275ed73937 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/NavigationItem.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/NavigationItem.vue @@ -1,5 +1,5 @@