From 71fcfa95218b96df1b62272bea05898977811789 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 18 Mar 2021 15:38:14 +0000 Subject: [PATCH] Bug 27983: Replace obsolete title-string sorting: Acquisitions templates part 2 This patch modifies several acquisitions 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: - Acquisitions -> Late orders - Acquisitions -> Vendor -> Basket -> Add to basket -> From a subscription - Acquisitions -> "All available funds" table -> Click an "Ordered" value -> Click a "Spent" value - Acquisitions -> Vendor -> Receive shipments - Acquisitions -> Vendor -> test sorting of contracts in the "Contracts" table Signed-off-by: Amit Gupta Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- .../prog/en/modules/acqui/lateorders.tt | 22 +++++++++---------- .../en/modules/acqui/newordersubscription.tt | 13 ++++------- .../prog/en/modules/acqui/ordered.tt | 6 ++--- .../prog/en/modules/acqui/parcels.tt | 11 ++++------ .../prog/en/modules/acqui/spent.tt | 12 +++++----- .../prog/en/modules/acqui/supplier.tt | 8 +++---- 6 files changed, 31 insertions(+), 41 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index 9313023109..40ff1d1352 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -72,8 +72,8 @@ Order line - Order date - Estimated delivery date + Order date + Estimated delivery date Vendor Information Quantity @@ -84,7 +84,7 @@ Budget Fund Claims count - Claimed date + Claimed date Internal note Vendor note ISBN @@ -99,14 +99,12 @@ [% lateorder.ordernumber | $raw %] - - [% lateorder.basket.closedate | $KohaDates %] ([% lateorder.basket.late_since_days | html %] days) + + [% lateorder.basket.closedate | $KohaDates %] ([% lateorder.basket.late_since_days | html %] days) - - [% SET estimated_delivery_date = lateorder.get_column('estimated_delivery_date') %] - [% IF estimated_delivery_date %] - [% estimated_delivery_date | $KohaDates %] - [% END %] + [% SET estimated_delivery_date = lateorder.get_column('estimated_delivery_date') %] + + [% estimated_delivery_date | $KohaDates %] [% lateorder.basket.bookseller.name | html %] @@ -152,9 +150,9 @@ [% lateorder.fund.budget.budget_period_description | html %] [% lateorder.fund.budget_name | html %] [% lateorder.claims.count | html %] - + [% FOR claim IN lateorder.claims %] - [% claim.claimed_on | $KohaDates %] + [% claim.claimed_on | $KohaDates %] [% UNLESS loop.last %]
[% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt index 1aaa9cc12b..74b1ac576f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt @@ -57,7 +57,7 @@ Vendor Library Call number - Expiration date + Expiration date @@ -81,12 +81,8 @@ [% IF (sub.callnumber) %][% sub.callnumber | html %][% END %] - - [% IF (sub.enddate) %] - [% sub.enddate | $KohaDates %] - [% ELSE %] - - [% END %] + + [% sub.enddate | $KohaDates %] [% IF (sub.alreadyOnOrder) %] @@ -138,8 +134,7 @@ $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, - { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, - { "sType": "title-string", "aTargets" : [ "title-string" ] } + { "sType": "anti-the", "aTargets" : [ "anti-the" ] } ], "sPaginationType": "full" })); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt index 81b1720b0c..25c26b0481 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -48,7 +48,7 @@ Item types Left on order Estimated cost per unit - Date ordered + Date ordered Subtotal @@ -82,8 +82,8 @@ [% order.ecost_tax_included | $Price %] - - [% order.entrydate | $KohaDates %] + + [% order.entrydate | $KohaDates %] [% order.subtotal | $Price %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt index 9d56bf2c7c..4d333b8351 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt @@ -83,7 +83,7 @@ Line - Date received + Date received Invoice number Item count Biblio count @@ -97,8 +97,8 @@ [% searchresult.number | html %] - - [% searchresult.datereceived | $KohaDates %] + + [% searchresult.datereceived | $KohaDates %] [% IF ( searchresult.code ) %] @@ -233,10 +233,7 @@