Bug 33568: Fix columns shift when pref are off

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 <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-02-01 15:39:49 +01:00 committed by Katrin Fischer
parent 13947b9554
commit a767e15c74
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -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: [],