From 33e5d7de9e6fec375395e606bf396aaca0330948 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. --- admin/columns_settings.yml | 29 ++++++++++++++++ .../prog/en/modules/reserve/request.tt | 33 ++++++++++--------- 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index f482000815..6f53c99749 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -2237,6 +2237,35 @@ modules: - columnname: booking_dates + requests: + requestspecific_table: + default_sort_order: 1 + columns: + - + columnname: hold + - + columnname: allowed_pickup_locations + - + 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 1a949d3c4b..93b1377561 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.30.2
HoldAllowed pickup locationsHoldAllowed pickup locationsItem typeItem typeBarcodeBarcodeItem groupItem groupHome libraryLast locationHome libraryLast locationCollectionCollectionCall numberCopy numberCall numberCopy numberVol no.Vol no.InformationInformation