From a767e15c74bd63f4eed51beee982fc5ddd468a02 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 1 Feb 2024 15:39:49 +0100 Subject: [PATCH] Bug 33568: Fix columns shift when pref are off MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit From comment 66: If StaffDetailItemSelection and/or LocalCoverImages is turned off, the alignment of the drop-down filters for the other columns is offset by 1 for each of the two sysprefs that is disabled Signed-off-by: Laurence Rault Signed-off-by: Emily Lamancusa Signed-off-by: Tomás Cohen Arazi Signed-off-by: Katrin Fischer --- .../html_helpers/tables/items/catalogue_detail.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index f444a04981..5526d903fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -277,11 +277,15 @@ } [% END %] + let offset = 2; + [% UNLESS Koha.Preference('LocalCoverImages') %]offset--;[% END %] + [% UNLESS Koha.Preference('StaffDetailItemSelection') %]offset--;[% END %] let filters_options = { - 2: () => all_item_types, - 3: () => all_libraries, - 4: () => all_libraries, + [offset] : () => all_item_types, + [offset+1] : () => all_libraries, + [offset+2] : () => all_libraries, }; + var items_table = $("#" + tab_id + '_table').kohaTable({ ajax: { url: item_table_url }, order: [], -- 2.39.5