From a2a6402354f2b9da6a5a85c50d4d6fa5245a2e41 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 17 Oct 2025 14:59:04 +0200 Subject: [PATCH] Bug 30633: Default to 'Current library' if item_level_itypes is off We cannot set the default value in the yaml file dynamically. This is not ideal but we are going to modify the default "Item type" if item-level_itypes is off. Signed-off-by: Michaela Sieber --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 7 +++++++ 1 file changed, 7 insertions(+) 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 93144bf5bf..964f333539 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1914,6 +1914,13 @@ [% END # /IF OpacBrowseResults %] var holdingst_table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %]; + [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %] + // The default in the yaml file is 1 "Item type". + // If item-level_itypes is off the column will not appear, then select column 2 "Current library" + if (holdingst_table_settings.default_sort_order == 1) { + holdingst_table_settings.default_sort_order = 2; + } + [% END %] var otherholdingst_table_settings = JSON.parse(JSON.stringify(holdingst_table_settings)); // Clone let column; -- 2.39.5