From c3570feb69b284a57ed61e1585f975f3dab30b62 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 18 Mar 2021 14:18:07 +0000 Subject: [PATCH] Bug 27982: Replace obsolete title-string sorting: Acquisitions templates part 1 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 -> Vendor search - Acquisitions -> Vendor -> Basket -> Add to basket -> From a staged file -> From existing orders (copy) - Acquisitions -> EDIFACT messages - Acquisitions -> Order search - With AcqEnableFiles enabled, attach some files to an invoice: - Acquisitions -> Invoices Acquisitions -> Invoices -> Manage invoice files --- .../prog/en/modules/acqui/addorderiso2709.tt | 4 +- .../prog/en/modules/acqui/booksellers.tt | 42 ++++++++----------- .../prog/en/modules/acqui/duplicate_orders.tt | 18 ++++---- .../prog/en/modules/acqui/edifactmsgs.tt | 7 ++-- .../prog/en/modules/acqui/histsearch.tt | 14 +++---- .../prog/en/modules/acqui/invoice-files.tt | 7 ++-- .../prog/en/modules/acqui/invoice.tt | 4 +- .../prog/en/modules/acqui/invoices.tt | 20 +++------ 8 files changed, 45 insertions(+), 71 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index c730d3e1b2..1bbafd90eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -398,7 +398,7 @@ File name Comments Status - Staged + Staged # Bibliographic records   @@ -425,7 +425,7 @@ [% batch_lis.import_status | html %] [% END %] - [% batch_lis.staged_date | $KohaDates with_hours => 1 %] + [% batch_lis.staged_date | $KohaDates with_hours => 1 %] [% batch_lis.num_records | html %] Add orders diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt index 1adb7f0be9..d275e23745 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -85,13 +85,13 @@ No. Name - Item count - Bibliographic record count + Item count + Bibliographic record count Items expected [% tp('basket created by', 'Created by') | html %] - Date + Date Basket group - Closed + Closed Actions @@ -104,19 +104,17 @@ [% END %] [% basket.basketno | html %] [% basket.basketname | html %] - - [% basket.total_items | html %] - [% IF basket.total_items_cancelled %] - ([% basket.total_items_cancelled | html %] cancelled) - [% END %] - + + [% basket.total_items | html %] + [% IF basket.total_items_cancelled %] + ([% basket.total_items_cancelled | html %] cancelled) + [% END %] - - [% basket.total_biblios | html %] - [% IF basket.total_biblios_cancelled %] - ([% basket.total_biblios_cancelled | html %] cancelled) - [% END %] - + + [% basket.total_biblios | html %] + [% IF basket.total_biblios_cancelled %] + ([% basket.total_biblios_cancelled | html %] cancelled) + [% END %] [% basket.expected_items | html %] @@ -125,7 +123,7 @@ [% basket.authorisedby.surname | html %] [% END %] - [% basket.creationdate | $KohaDates %] + [% basket.creationdate | $KohaDates %] [% IF basket.basketgroup %] [% basketgroup = basket.basketgroup %] @@ -136,12 +134,8 @@ [% END %] [% END %] - - [% IF ( basket.closedate ) %] - [% basket.closedate | $KohaDates %] - [% ELSE %] - - [% END %] + + [% basket.closedate | $KohaDates %] [% IF not basket.closedate and supplier.active %] @@ -215,8 +209,6 @@ 'bInfo': false, "aaSorting": [[ 1, "asc" ]], "aoColumnDefs": [ - { "sType": "title-string", "aTargets" : [ "title-string" ] }, - { "sType": "title-numeric", "aTargets" : [ "title-numeric" ] }, { 'aTargets': [-1], 'bSortable': false } ] })); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt index 1ed05775ef..f233c2f316 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt @@ -110,13 +110,9 @@ Basket [% basket.basketno | html %] › Duplicate existing orders
[% order.author | html %]
[% order.isbn | html %] [% order.name | html %] - [% order.creationdate | $KohaDates %] - - [% IF order.datereceived %] - [% order.datereceived | $KohaDates %] - [% ELSE %] - - [% END %] + [% order.creationdate | $KohaDates %] + + [% order.datereceived | $KohaDates %] [% order.quantityreceived | html %] [% order.quantity | html %] @@ -145,8 +141,8 @@ Basket [% basket.basketno | html %] › Duplicate existing orders Invoice number Summary Vendor - Placed on - Received on + Placed on + Received on Quantity received Quantity ordered Unit cost @@ -266,8 +262,8 @@ Basket [% basket.basketno | html %] › Duplicate existing orders Invoice number Summary Vendor - Placed on - Received on + Placed on + Received on Quantity received Quantity ordered Unit cost diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt index 12797d7d97..0376b7b731 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt @@ -33,7 +33,7 @@ Type -Transferred +Transferred Status Vendor Details @@ -45,7 +45,7 @@ [% FOREACH msg IN messages %] [% msg.message_type | html %] -[% msg.transfer_date | $KohaDates %] +[% msg.transfer_date | $KohaDates %] [% msg.status | html %] @@ -124,8 +124,7 @@ 'aaSorting': [[1, "desc" ]], 'sPaginationType': "full", "aoColumnDefs": [ - { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, - { "sType": "title-string", "aTargets" : [ "title-string" ] } + { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false } ] })); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt index e43000df35..f9f2625198 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -44,8 +44,8 @@ Invoice number Summary Vendor - Placed on - Received on + Placed on + Received on Quantity received Quantity ordered Unit cost @@ -90,13 +90,9 @@
[% order.author | html %]
[% order.isbn | html %]
[% order.name | html %] - [% order.creationdate | $KohaDates %] - - [% IF order.datereceived %] - [% order.datereceived | $KohaDates %] - [% ELSE %] - - [% END %] + [% order.creationdate | $KohaDates %] + + [% order.datereceived | $KohaDates %] [% order.quantityreceived | html %] [% order.quantity | html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt index f28cfd6c17..aad2223b6d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt @@ -47,8 +47,8 @@ [% f.file_name | html %] [% f.file_type | html %] [% f.file_description | html %] - - [% f.date_uploaded | $KohaDates %] + + [% f.date_uploaded | $KohaDates %] [% f.file_size | html %] Delete @@ -95,8 +95,7 @@ $(document).ready(function() { $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ - { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, - { "aTargets": [ "title-string" ], "sType": "title-string" } + { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false } ], bInfo: false, bPaginate: false, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index 6638449a4b..b37d64c3f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -435,8 +435,8 @@ [% f.file_name | html %] [% f.file_type | html %] [% f.file_description | html %] - - [% f.date_uploaded | $KohaDates %] + + [% f.date_uploaded | $KohaDates %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt index 4536842f41..08889f2727 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -38,8 +38,8 @@   Invoice no. Vendor - Shipment date - Billing date + Shipment date + Billing date Received bibliographic records Received items Status @@ -55,19 +55,11 @@ [% invoice.invoicenumber | html %] [% invoice.suppliername | html %] - - [% IF invoice.shipmentdate %] - [% invoice.shipmentdate | $KohaDates %] - [% ELSE %] - - [% END %] + + [% invoice.shipmentdate | $KohaDates %] - - [% IF invoice.billingdate %] - [% invoice.billingdate | $KohaDates %] - [% ELSE %] - - [% END %] + + [% invoice.billingdate | $KohaDates %] [% invoice.receivedbiblios | html %] [% invoice.receiveditems | html %] -- 2.20.1