From e64c760059b53818b38c9e9786e7b303b7a9abec Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 17 Mar 2021 18:01:17 +0000 Subject: [PATCH] Bug 27974: Replace obsolete title-string sorting: Circulation templates This patch modifies several circulation templates to replace the use of the "title-string" DataTables sorting method with the newer "data-order" attribute. To test, apply the patch and view the following pages to confirm that columns containing dates sort correctly when using any setting of the "dateformat" system preference: - Circulation -> Checkout notes - To populate the table, enable the "AllowCheckoutNotes" system preference enabled, log in to the OPAC as a user with checkouts. From the "Your summary" page use the "Report a problem" fields to submit notes. - Circulation -> On-site checkouts - Requires the "OnSiteCheckouts" system preference to be enabled and and for some items to be checked out as on-site checkouts. - Circulation -> Overdues - Circulation -> Holds to pull - Circulation -> Transfers to send - Requires the "StockRotation" preference to be enabled, some rotas to be set up, and for the stockrotation cron job to be executed. - Circulation -> Transfers to receive - Circulation -> Holds queue Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../prog/en/modules/circ/checkout-notes.tt | 5 ++--- .../prog/en/modules/circ/on-site_checkouts.tt | 19 +++---------------- .../prog/en/modules/circ/overdue.tt | 4 ++-- .../prog/en/modules/circ/pendingreserves.tt | 6 +++--- .../prog/en/modules/circ/transfers_to_send.tt | 9 +++++---- .../en/modules/circ/transferstoreceive.tt | 7 +++---- .../prog/en/modules/circ/view_holdsqueue.tt | 4 ++-- 7 files changed, 20 insertions(+), 34 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt index 49381da500..1484b9cc7b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt @@ -78,7 +78,7 @@   Title Note - Date + Date Set by Status Actions @@ -90,7 +90,7 @@ [% note.item.biblio.title | html %] - [% note.item.biblio.author | html %] ([% note.item.barcode | html %]) [% note.note | html %] - [% note.notedate | $KohaDates %] + [% note.notedate | $KohaDates %] [% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %] [% IF ( note.noteseen == 0 ) %] @@ -142,7 +142,6 @@ "order": [[ 1, "asc" ]], "aoColumnDefs": [ { "orderable": false, "searchable": false, 'targets': [ 'NoSort' ] }, - { "type": "title-string", "targets" : [ "title-string" ] }, { "type": "anti-the", "targets": [ "anti-the" ] } ], "pagingType": "full" diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt index 924d43b6e7..fa43a2fc01 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt @@ -53,9 +53,9 @@ [% FOREACH item IN pending_onsite_checkouts %] - + [% IF item.is_overdue %][% END %] - [% item.date_due | $KohaDates %] + [% item.date_due | $KohaDates %] [% IF item.is_overdue %][% END %] @@ -97,20 +97,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 2a754ac24a..2ee9d47a32 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -65,7 +65,7 @@ - + @@ -83,7 +83,7 @@ [% FOREACH overdueloo IN overdueloop %] - + - + @@ -174,8 +174,8 @@ [% END %] - - + @@ -65,7 +65,9 @@ [% FOREACH transfer IN library.inbound_transfers %] [% UNLESS transfer.datesent %] - +
Due dateDue date Patron Patron category Patron library
[% overdueloo.duedate | $KohaDates %][% overdueloo.duedate | $KohaDates %] [% INCLUDE 'patron-title.inc' patron=overdueloo.patron hide_patron_infos_if_needed=1 %] [% IF logged_in_user.can_see_patron_infos( overdueloo.patron ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 77367bd3b0..49945b996e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -77,7 +77,7 @@ Available enumeration Available item types Available locationsEarliest hold dateEarliest hold date Action
- [% hold.reservedate | $KohaDates %] in [% Branches.GetName ( hold.branchcode ) | html %] + + [% hold.reservedate | $KohaDates %] in [% Branches.GetName ( hold.branchcode ) | html %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt index 7f9472bdea..c2b7763d68 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt @@ -52,7 +52,7 @@
Sending to [% library.branchname | html %]
Date of requestDate of request Title Reason On loan

[% transfer.daterequested | $KohaDates %]

+ [% transfer.daterequested | $KohaDates %] + [% INCLUDE 'biblio-title.inc' biblio = transfer.item.biblio link = 1 %][% IF ( transfer.item.biblio.author ) %] by [% transfer.item.biblio.author | html %][% END %] [% IF ( transfer.item.effective_itemtype ) %] ([% ItemTypes.GetDescription( transfer.item.effective_itemtype ) | html %])[% END %] @@ -115,8 +117,7 @@ $("#transferst[% library.branchcode | html %]").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, - { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, - { "sType": "title-string", "aTargets" : [ "title-string" ] } + { "sType": "anti-the", "aTargets" : [ "anti-the" ] } ], "sDom": 't', "bPaginate": false diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt index cfa8bf00d4..ed7f228cfa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt @@ -51,7 +51,7 @@ - + @@ -64,7 +64,7 @@ [% ELSE %] [% END %] - + - + @@ -191,7 +191,7 @@ [% END %] - + [% END %] -- 2.39.5
Coming from [% branchesloo.branchname | html %]
Date of transferDate of transfer Title On hold for Home library

[% reser.datetransfer | $KohaDates %]

[% IF ( reser.messcompa ) %]Transfer is [% reser.diff | html %] days late[% END %]

[% reser.datetransfer | $KohaDates %]

[% IF ( reser.messcompa ) %]Transfer is [% reser.diff | html %] days late[% END %]
[% INCLUDE 'biblio-title.inc' biblio=reser link = 1 %] [% IF ( reser.author ) %]by [% reser.author | html %][% END %] [% IF ( reser.itemtype ) %] ([% reser.itemtype | html %])[% END %] @@ -121,8 +121,7 @@ $("#transferst[% branchesloo.branchcode | html %]").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, - { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, - { "sType": "title-string", "aTargets" : [ "title-string" ] } + { "sType": "anti-the", "aTargets" : [ "anti-the" ] } ], "sDom": 't', "bPaginate": false diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index 12605d6858..10c36a1e9d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -82,7 +82,7 @@ Barcode Patron Send toDateDate Notes
[% Branches.GetName( itemsloo.pickbranch ) | html %][% itemsloo.reservedate | $KohaDates %][% itemsloo.reservedate | $KohaDates %] [% itemsloo.notes | html %]