From 3bf91a73dcc80d9554f025b045d330fefde778a4 Mon Sep 17 00:00:00 2001 From: Jan Kissig Date: Thu, 4 Jun 2026 08:42:03 +0000 Subject: [PATCH] Bug 42282: (QA follow-up): Fix call of HTML5MediaEnabled and HTML5MediaSets.size This switches the assignment of Koha.prefs.HTML5MediaEnabled from a non existant template param HTML5MediaEnabled to Koha.Preference('HTML5MediaEnabled'). Also a straying template param HTML5MediaSets.size was left in a JS block. Signed-off-by: Pedro Amorim --- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 7307d4986c..45c2edc7aa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1297,7 +1297,8 @@ const activetab = "[% activetab | html %]"; const has_component_parts = [% ComponentParts && ComponentParts.size ? 1 : 0 | html %]; - const show_holdings_panel = [% items_to_display_count - ( other_holdings_count || 0 ) ? 1 : 0 | html %] + const show_holdings_panel = [% items_to_display_count - ( other_holdings_count || 0 ) ? 1 : 0 | html %]; + const HTML5MediaSetsSize = [% HTML5MediaEnabled && HTML5MediaSets.size ? HTML5MediaSets.size : 0 | html %]; const normalized_isbn = "[% normalized_isbn | html %]"; const normalized_upc = "[% normalized_upc | html %]"; @@ -1323,8 +1324,8 @@ BundleLostValue: "[% Koha.Preference('BundleLostValue') | html %]", CoceHost: "[% Koha.Preference('CoceHost') | html %]", CoceProviders: "[% Koha.Preference('CoceProviders') | html %]", - HTML5MediaEnabled: "[% HTML5MediaEnabled | html %]", - KohaAdminEmailAddress: "[% KohaAdminEmailAddress | uri %]", + HTML5MediaEnabled: "[% Koha.Preference('HTML5MediaEnabled') | html %]", + KohaAdminEmailAddress: "[% Koha.Preference('KohaAdminEmailAddress') | uri %]", IntranetCoce: [% Koha.Preference('IntranetCoce') ? 1 : 0 | html %], NovelistSelectStaffEnabled: [% Koha.Preference('NovelistSelectStaffEnabled') ? 1 : 0 | html %], NovelistSelectStaffProfile: "[% Koha.Preference('NovelistSelectStaffProfile') | html %]", @@ -1684,7 +1685,7 @@ if (activetab == "comments") { $("#bibliodetails a[href='#comments_panel']").tab("show"); } else if (all_items_count == 0) { - if ((Koha.prefs.HTML5MediaEnabled == "staff" || Koha.prefs.HTML5MediaEnabled == "both") && HTML5MediaSets.size) { + if ((Koha.prefs.HTML5MediaEnabled == "staff" || Koha.prefs.HTML5MediaEnabled == "both") && HTML5MediaSetsSize) { $("#bibliodetails a[href='#html5media_panel']").tab("show"); } else if (has_component_parts) { $("#bibliodetails a[href='#components_panel']").tab("show");