From a458e16027e235245a88d9f7ee05b082de04dd9c 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 --- .../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 58955f8ba4..539c7ae451 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -59,8 +59,8 @@ Order line - Order date - Estimated delivery date + Order date + Estimated delivery date Vendor Information Quantity @@ -71,7 +71,7 @@ Budget Fund Claims count - Claimed date + Claimed date Internal note Vendor note ISBN @@ -86,14 +86,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 %] @@ -139,9 +137,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 dba4e4d814..a0f120acd9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt @@ -37,7 +37,7 @@ Vendor Library Call number - Expiration date + Expiration date @@ -61,12 +61,8 @@ [% IF (sub.callnumber) %][% sub.callnumber | html %][% END %] - - [% IF (sub.enddate) %] - [% sub.enddate | $KohaDates %] - [% ELSE %] - - [% END %] + + [% sub.enddate | $KohaDates %] [% IF (sub.alreadyOnOrder) %] @@ -118,8 +114,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 1637752879..ec75acdf95 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -33,7 +33,7 @@ Item types Left on order Estimated cost per unit - Date ordered + Date ordered Subtotal @@ -67,8 +67,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 3ee304e6b1..ef9aba43fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt @@ -66,7 +66,7 @@ Line - Date received + Date received Invoice number Item count Biblio count @@ -80,8 +80,8 @@ [% searchresult.number | html %] - - [% searchresult.datereceived | $KohaDates %] + + [% searchresult.datereceived | $KohaDates %] [% IF ( searchresult.code ) %] @@ -216,10 +216,7 @@