Bugzilla – Attachment 188924 Details for
Bug 38311
DataTables - Simplify the building of the dropdown list filters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38311: Fix 'Bookings to collect'/pendingbookings
Bug-38311-Fix-Bookings-to-collectpendingbookings.patch (text/plain), 2.54 KB, created by
Jonathan Druart
on 2025-11-03 10:45:18 UTC
(
hide
)
Description:
Bug 38311: Fix 'Bookings to collect'/pendingbookings
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-11-03 10:45:18 UTC
Size:
2.54 KB
patch
obsolete
>From 2795222abe9c626752690d112d95be4a0811cdf7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 3 Nov 2025 11:44:18 +0100 >Subject: [PATCH] Bug 38311: Fix 'Bookings to collect'/pendingbookings > >it was missing the dataFilter. Also needs coded_values to work correctly >(which needs to be defined outside of document.ready). >--- > .../prog/en/modules/circ/pendingbookings.tt | 27 ++++++++++++------- > 1 file changed, 17 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingbookings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingbookings.tt >index fb310001a5f..2fceb2ae90e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingbookings.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingbookings.tt >@@ -117,6 +117,20 @@ > [% INCLUDE 'js-date-format.inc' %] > <script> > let table_settings = [% TablesSettings.GetTableSettings( 'circ', 'bookings', 'bookings-to-collect', 'json' ) | $raw %]; >+ >+ let all_libraries = [% To.json(Branches.all) | $raw %].map(e => { >+ e['_id'] = e.branchcode; >+ e['_str'] = e.branchname; >+ return e; >+ }); >+ >+ var coded_values = { >+ library: new Map(all_libraries.map( l => [l.branchname, l.branchcode] )), >+ }; >+ >+ let filters_options = { >+ libraries: all_libraries, >+ }; > $(document).ready(function() { > > let additional_filters = { >@@ -153,15 +167,6 @@ > } > }; > >- let all_libraries = [% To.json(Branches.all) | $raw %].map(e => { >- e['_id'] = e.branchcode; >- e['_str'] = e.branchname; >- return e; >- }); >- let filters_options = { >- libraries: all_libraries, >- }; >- > var bookings_table_url = '/api/v1/bookings?'; > var bookings_table = $("#bookingst").kohaTable({ > "ajax": { >@@ -181,8 +186,10 @@ > "visible": false > }, > { >- "data": "pickup_library.name:me.pickup_library_id", >+ "data": "me.pickup_library_id", > "title": _("Pickup library"), >+ datatype: "coded_value:library", >+ dataFilter: "libraries", > "searchable": true, > "orderable": true, > "render": function( data, type, row, meta ) { >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38311
:
184926
|
184927
|
186209
|
187376
|
187377
|
188314
|
188468
|
188469
|
188924
|
189184
|
189185
|
189186
|
190071