From 3c6700111861c9c0532bf44d94c1620ce5552125 Mon Sep 17 00:00:00 2001 From: Eric Garcia Date: Thu, 12 Jun 2025 16:44:52 +0000 Subject: [PATCH] Bug 39592: Make requestspecific table into a kohaTable Test plan: 1. Apply patch, restart_all 2. Search the catalog, click place hold and enter a patron 3. Notice the table under "Hold a specific item" can now be configured. 4. Click configure and select any option for default sort order. 5. Go back to the table and notice it is sorted by the option you chose. System preferences: 6. Change item-level_itypes to bibliographic record and enable EnableItemGroupHolds, save. 7. Go back to the table and confirm the columns appear. Signed-off-by: Lucas Gass --- admin/columns_settings.yml | 31 +++++++++++++++++ .../prog/en/modules/reserve/request.tt | 33 ++++++++++--------- 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index f4820008150..babfad9a508 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -2237,6 +2237,37 @@ modules: - columnname: booking_dates + requests: + requestspecific_table: + default_sort_order: 1 + columns: + - + columnname: hold + cannot_be_toggled: 1 + - + columnname: allowed_pickup_locations + cannot_be_toggled: 1 + - + columnname: item_type + - + columnname: barcode + - + columnname: item_group + - + columnname: home_library + - + columnname: last_location + - + columnname: collection + - + columnname: call_number + - + columnname: copy_number + - + columnname: volume_number + - + columnname: information + opac: biblio-detail: holdingst: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 1a949d3c4b8..93b1377561c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -813,26 +813,26 @@ - - + + [% IF Koha.Preference('item-level_itypes') %] - + [% END %] - + [% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %] - + [% END %] - - + + [% IF itemdata_ccode %] - + [% END %] - - + + [% IF itemdata_enumchron %] - + [% END %] - + @@ -1509,9 +1509,12 @@ }); [% END %] - var my_table = $("#requestspecific").kohaTable({ - paging: false, - dom: '<"top pager"ilf>t', + $(document).ready(function () { + requestspecific_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'requests', 'requestspecific_table', 'json' ) | $raw %]; + $("#requestspecific").kohaTable({ + "bPaginate":false, + "bKohaColumnsUseNames": true, + }, requestspecific_table_settings); }); $("#club-request-form").on("submit", function() { -- 2.39.5
HoldAllowed pickup locationsHoldAllowed pickup locationsItem typeItem typeBarcodeBarcodeItem groupItem groupHome libraryLast locationHome libraryLast locationCollectionCollectionCall numberCopy numberCall numberCopy numberVol no.Vol no.InformationInformation