Bugzilla – Attachment 174582 Details for
Bug 33736
Add bookings to collect circulation report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33736: (follow-up) Cleanup and consistency
Bug-33736-follow-up-Cleanup-and-consistency.patch (text/plain), 5.46 KB, created by
Martin Renvoize (ashimema)
on 2024-11-15 13:37:38 UTC
(
hide
)
Description:
Bug 33736: (follow-up) Cleanup and consistency
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-11-15 13:37:38 UTC
Size:
5.46 KB
patch
obsolete
>From 2593b36e0ce573229a25f960268d3d4e5d631cc3 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 15 Nov 2024 13:34:23 +0000 >Subject: [PATCH] Bug 33736: (follow-up) Cleanup and consistency > >Given Jonathans comments, this patch performs the requested cleanups. > >* We use the new select option for kohaTables for the pickup library >search. >* We add pickup library to the aside filters. >* We remove the empty placeholder 'actions' column. >* We drop the filtering on 'waiting' which will be reintroduced by the > next but in the tree. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/circ/pendingbookings.tt | 51 +++++++++++++------ > 1 file changed, 36 insertions(+), 15 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 eb549fa8c68..593d7e190ca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingbookings.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingbookings.tt >@@ -4,6 +4,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE TablesSettings %] >+[% USE To %] > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -57,8 +58,24 @@ > <h4>Refine results</h4> > <ol> > <li> >- <label for="library">Holding library:</label> >- <select name="library" id="library"> >+ <label for="holding_library">Holding library:</label> >+ <select name="holding_library" id="holding_library"> >+ [% SET libraries = Branches.all( only_from_group => 1 ) %] >+ [% IF libraries.size != 1 %] >+ <option value="">Any</option> >+ [% END %] >+ [% FOREACH l IN libraries %] >+ [% IF (l.branchcode == branchcode) %] >+ <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option> >+ [% ELSE %] >+ <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> >+ <li> >+ <label for="pickup_library">Pickup library:</label> >+ <select name="pickup_library" id="pickup_library"> > [% SET libraries = Branches.all( only_from_group => 1 ) %] > [% IF libraries.size != 1 %] > <option value="">Any</option> >@@ -130,10 +147,23 @@ > } > }, > 'item.holding_library_id': function() { >- let library = $("#library").find(":selected").val(); >+ let library = $("#holding_library").find(":selected").val(); > return library; > }, >- status: { '!=': 'waiting' }, >+ 'pickup_library_id': function() { >+ let library = $("#pickup_library").find(":selected").val(); >+ return library; >+ } >+ }; >+ >+ [% SET libraries = Branches.all %] >+ let all_libraries = [% To.json(libraries) | $raw %].map(e => { >+ e['_id'] = e.branchcode; >+ e['_str'] = e.branchname; >+ return e; >+ }); >+ let filters_options = { >+ [1] : () => all_libraries, > }; > > var bookings_table_url = '/api/v1/bookings?'; >@@ -155,7 +185,7 @@ > "visible": false > }, > { >- "data": "pickup_library.name", >+ "data": "pickup_library.name:me.pickup_library_id", > "title": _("Pickup library"), > "searchable": true, > "orderable": true, >@@ -237,17 +267,8 @@ > "render": function(data, type, row, meta) { > return $date(row.start_date) + ' - ' + $date(row.end_date); > } >- }, >- { >- "name": "actions", >- "title": _("Actions"), >- "searchable": false, >- "orderable": false, >- "render": function(data,type,row,meta){ >- return ""; >- } > }] >- }, table_settings, 1, additional_filters); >+ }, table_settings, 1, additional_filters, filters_options); > > /** Date filtering */ > $("#bookingsf").on("submit", function(e){ >-- >2.47.0
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 33736
:
158356
|
161044
|
165014
|
165144
|
165277
|
165278
|
165279
|
165280
|
170398
|
170399
|
170400
|
172716
|
172717
|
172718
|
172719
|
172720
|
172721
|
172765
|
172807
|
172808
|
172810
|
172823
|
172836
|
172837
|
172838
|
172839
|
172840
|
172841
|
172842
|
172843
|
172844
|
172845
|
173291
|
173292
|
173293
|
173294
|
173295
|
173296
|
173297
|
173298
|
173299
|
173300
|
173301
|
173302
|
173303
| 174582