From a922ed326e7ba70a396c0e4f9b0252e17304733f Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Tue, 24 Sep 2024 15:16:37 +0000 Subject: [PATCH] Bug 38010: Allow external breadcrumbs This patch allows breadcrumbs to navigate to pages outside the Vue application --- .../intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc | 2 +- koha-tmpl/intranet-tmpl/prog/js/vue/modules/acquisitions.ts | 3 +++ koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc index 9614214a35d..bad05751232 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc @@ -30,7 +30,7 @@
Receive shipments
[% END %] [% ELSIF ( CAN_user_acquisition_vendors_manage ) %] -
New vendor
+
New vendor
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/acquisitions.ts b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/acquisitions.ts index 4305250a8fa..bdd1ae37330 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/acquisitions.ts +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/acquisitions.ts @@ -62,4 +62,7 @@ const { removeMessages } = mainStore; router.beforeEach((to, from) => { navigationStore.$patch({ current: to.matched, params: to.params || {} }); removeMessages(); // This will actually flag the messages as displayed already + if (to.external || to.meta.self.parent.external) { + window.location.href = to.path; + } }); diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js b/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js index 33a9daf18be..f21f6381356 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js @@ -9,7 +9,8 @@ import { $__ } from "../i18n"; export const routes = [ { - path: "/cgi-bin/koha/acqui/booksellers.pl", + path: "/cgi-bin/koha/acqui/acqui-home.pl", + external: true, is_default: true, is_base: true, title: $__("Acquisitions"), -- 2.39.3 (Apple Git-146)