From 40fd536a8a78a5f97d821e04db283550cd91e1f3 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 --- .../prog/en/modules/circ/checkout-notes.tt | 5 ++--- .../prog/en/modules/circ/on-site_checkouts.tt | 19 +++---------------- .../intranet-tmpl/prog/en/modules/circ/overdue.tt | 4 ++-- .../prog/en/modules/circ/pendingreserves.tt | 6 +++--- .../prog/en/modules/circ/transfers_to_send.tt | 9 +++++---- .../prog/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 693b752540..c693f0db79 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 @@ -67,7 +67,7 @@   Title Note - Date + Date Set by Status Actions @@ -79,7 +79,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 ) %] @@ -131,7 +131,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 38f387a6a8..1f0e6ba259 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 @@ -39,9 +39,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 %] @@ -83,20 +83,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 d4c90e5700..23b8320fbf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -52,7 +52,7 @@ - + @@ -70,7 +70,7 @@ [% FOREACH overdueloo IN overdueloop %] - + - + @@ -160,8 +160,8 @@ [% END %] - - + @@ -53,7 +53,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 a06981896d..02e28ecf65 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -63,7 +63,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 744a311aea..8ba5141f34 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 @@ -40,7 +40,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 %] @@ -103,8 +105,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 0d9360f4ea..aef12fe4d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt @@ -37,7 +37,7 @@ - + @@ -50,7 +50,7 @@ [% ELSE %] [% END %] - + - + @@ -168,7 +168,7 @@ [% END %] - + [% END %] -- 2.11.0
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 %] @@ -107,8 +107,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 8c0eb4e561..bd8145c0ca 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 @@ -59,7 +59,7 @@ Barcode Patron Send toDateDate Notes
[% Branches.GetName( itemsloo.pickbranch ) | html %][% itemsloo.reservedate | $KohaDates %][% itemsloo.reservedate | $KohaDates %] [% itemsloo.notes | html %]