Bugzilla – Attachment 191659 Details for
Bug 41665
Only include Greybox in OPAC if IdRef is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41665: Only include Greybox in OPAC if IdRef is enabled
Bug-41665-Only-include-Greybox-in-OPAC-if-IdRef-is.patch (text/plain), 1.46 KB, created by
David Cook
on 2026-01-20 00:31:58 UTC
(
hide
)
Description:
Bug 41665: Only include Greybox in OPAC if IdRef is enabled
Filename:
MIME Type:
Creator:
David Cook
Created:
2026-01-20 00:31:58 UTC
Size:
1.46 KB
patch
obsolete
>From bf05403fb2860a0bbbeff13e02276d162e873f11 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 20 Jan 2026 00:29:57 +0000 >Subject: [PATCH] Bug 41665: Only include Greybox in OPAC if IdRef is enabled > >This patch wraps the Greybox include in the OPAC with a syspref >check on IdRef, so that it's only loaded when it's needed. > >Test plan: >0. Apply the patch >1. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29 >2. Search through the HTML or the Sources tab in F12 tools and note >that Greybox assets are not loaded >3. Enable the IdRef system preference >4. Note that the Greybox assets are loaded >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 63e004d0291..57067e90d32 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1624,7 +1624,9 @@ > [% Asset.js("js/modals/catalog_concern.js") | $raw %] > [% END %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE greybox.inc %] >+ [% IF ( Koha.Preference('IdRef') ) %] >+ [% INCLUDE greybox.inc %] >+ [% END %] > [% IF ( OpacStarRatings != 'disable' ) %] > [% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %] > [% Asset.js("js/ratings.js") | $raw %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41665
:
191659
|
191708