From f70ac266c3024cdce470db4fafd885eedc1231b4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Dec 2025 12:24:32 +0100 Subject: [PATCH] Bug 41457: Fix column visibility on the holds history table We must use bKohaColumnsUseNames to correctly deal with the column visibility if some columns are shown/hidden depending on sysprefs. On the holds history table we have "item type" that is hidden if AllowHoldItemTypeSelection is disabled. Test plan: 1. Create a hold and select an item type Note: I think there is a bug if you select it from "Hold next available item", use "Hold details". Please confirm? 2. Go to the holds history view 3. Hide some columns 4. Modify the value of AllowHoldItemTypeSelection 5. Reload the page and notice that the state of the table is restored correctly, however the "item type" column is shown or hidden depending on the syspref's value. --- .../prog/en/modules/members/holdshistory.tt | 87 ++++++++++--------- 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt index 3145bc14241..6b3f96fea6e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -49,9 +49,6 @@ [% ELSIF patron.is_anonymous %]
This is the anonymous patron, so no holds history is displayed.
[% ELSE %] - - [% SET show_itemtype_column = Koha.Preference('AllowHoldItemTypeSelection') %] -

Current holds

- Title - Author - Barcode - Call number - Library - Hold date - Expiration date - Waiting date - Cancellation date - [% IF show_itemtype_column %] - Requested item type - [% END %] - Status - Notes + Title + Author + Barcode + Call number + Library + Hold date + Expiration date + Waiting date + Cancellation date + Requested item type + Status + Notes @@ -130,20 +125,18 @@ - - - - - - - - - - [% IF show_itemtype_column %] - - [% END %] - - + + + + + + + + + + + +
TitleAuthorBarcodeCall numberLibraryHold dateExpiration dateWaiting dateCancellation dateRequested item typeStatusNotesTitleAuthorBarcodeCall numberLibraryHold dateExpiration dateWaiting dateCancellation dateRequested item typeStatusNotes
@@ -181,14 +174,21 @@ item_types: all_item_types, libraries: all_libraries, }; + + const show_itemtype_column = [% Koha.Preference('AllowHoldItemTypeSelection') ? 1 : 0 %];