Bug 37033

Summary: Plugin intranet_js won't load in Cart popup (intranet-bottom.inc missing)
Product: Koha Reporter: Lari Strand <lmstrand>
Component: Plugin architectureAssignee: Lari Strand <lmstrand>
Status: Pushed to main --- QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: dcook
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:
Attachments: Bug 37033: Plugin intranet_js won't load in Cart popup (intranet-bottom.inc missing)
Bug 37033: Plugin intranet_js won't load in Cart popup (intranet-bottom.inc missing)

Description Lari Strand 2024-06-05 05:57:51 UTC
We need to make a modification to the cart view and tried to create a plugin that injects javascript to the cart view. It won't get applied to cgi-bin/koha/basket/basket.pl since it's template is missing it's [% INCLUDE 'intranet-bottom.inc' %] which loads the plugin subs called intranet_js to the browser. I added the code to basket.tt and now the plugin's intranet_js gets applied to the view.

This issue may occur in similar popup views elsewhere in the Koha intranet too, where we have decided not to include the intranet-bottom.inc to the browser view. Should this ticket be made a generic one dealing with all similar occurences throughout Koha intranet (Z39.50 search for example)? Is there any downside for having the bottom bar in these views?
Comment 1 David Cook 2024-06-05 06:26:49 UTC
I imagine a case by case basis is all right.
Comment 2 Lari Strand 2024-06-05 06:31:18 UTC
It seems Z39.50 search is using  [% INCLUDE 'intranet-bottom.inc' popup_window=1 %] which allows the plugin js to be loaded with the view. I'll make a patch for cart/basket view using this.
Comment 3 Lari Strand 2024-06-05 07:11:14 UTC
Created attachment 167429 [details] [review]
Bug 37033: Plugin intranet_js won't load in Cart popup (intranet-bottom.inc missing)
Comment 4 Owen Leonard 2024-06-18 13:21:44 UTC
Created attachment 167844 [details] [review]
Bug 37033: Plugin intranet_js won't load in Cart popup (intranet-bottom.inc missing)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Katrin Fischer 2024-09-02 09:45:35 UTC
QA'd by RM. One line change.
Comment 6 Katrin Fischer 2024-09-02 10:21:21 UTC
Pushed for 24.11!

Well done everyone, thank you!