From 565591f649835da69d7f05032cd3064ed8266890 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 22 Mar 2021 16:55:13 +0000 Subject: [PATCH] Bug 28016: Replace obsolete title-string sorting: Assorted templates This patch modifies various 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: - Cataloging -> Edit items - Easiest to test with an title with many items. You can follow the "Edit items" link from search results. - Tools -> Patron lists - View the contents of a patron list - Catalog -> Place hold - Locate a title with multiple items and check out each item with a different due date. - Start the process of placing a hold on that title for a patron. - On the "Place hold" screen, check the table of "specific" items and test sorting of the "Information" column by date due. - Tools -> Tags Signed-off-by: Amit Gupta Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../prog/en/modules/patron_lists/list.tt | 4 +-- .../prog/en/modules/reserve/request.tt | 28 ++++++++----------- .../prog/en/modules/tags/review.tt | 6 ++-- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt index 1744ec3f6b..152d64077b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt @@ -147,7 +147,7 @@ Address Category Library - Expires on + Expires on Circ notes @@ -175,7 +175,7 @@ [% p.borrowernumber.categorycode.description | html %] ([% p.borrowernumber.categorycode.categorycode | html %]) [% p.borrowernumber.branchcode.branchname | html %] - [% p.borrowernumber.dateexpiry | $KohaDates %] + [% p.borrowernumber.dateexpiry | $KohaDates %] [% p.borrowernumber.borrowernotes | html %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index b9a39864a8..60fb888ee6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -563,8 +563,8 @@ [% IF itemdata_enumchron %] Vol no. [% END %] - Information - Allowed pickup locations + Information + Allowed pickup locations @@ -649,17 +649,16 @@ [% itemloo.enumchron | html %] [% END %] - - [% IF ( itemloo.onloan ) %] - Due [% itemloo.date_due | $KohaDates as_due_date => 1 %] - [% ELSE %] - - [% IF ( itemloo.transfertwhen ) %] - In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %], - to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %] - [% END %] - - [% END %] + [% IF ( itemloo.onloan ) %] + + Due [% itemloo.date_due | $KohaDates as_due_date => 1 %] + [% ELSE %] + + [% IF ( itemloo.transfertwhen ) %] + In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %], + to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %] + [% END %] + [% END %] [% IF ( itemloo.reservedate ) %] [% IF ( itemloo.nocancel ) %] @@ -1100,9 +1099,6 @@ var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, { 'bPaginate': false, "sDom": '<"top pager"ilf>t', - "aoColumnDefs": [ - { "sType": "title-string", "aTargets" : [ "title-string" ] } - ] })); //Override fieldset styling for dataTables search box diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index 487e022fbe..e955e60a1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -96,7 +96,7 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Weight Actions [% UNLESS ( filter_approved_pending ) %]Reviewer[% END %] - Date + Date @@ -151,8 +151,8 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% UNLESS ( filter_approved_pending ) %] [% END %] [% END %] - - [% tagloo.date_approved | $KohaDates %] + + [% tagloo.date_approved | $KohaDates %] [% END %] -- 2.39.5