From 2ea68db08f05f09b78424521f3b05ea06214fab2 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 19 Mar 2021 10:33:55 +0000 Subject: [PATCH] Bug 27990: Replace obsolete title-string sorting: Patrons This patch modifies several patron 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 a patron record in the staff interface. Check the following pages to confirm that columns containing dates sort correctly when using any setting of the "dateformat" system preference: - Details: DataTables initialization removed because it is obsolete. Confirm that table of holds in the holds tab is still a working DataTable. - Accounting - Accounting -> Transactions, - Accounting -> Transactions -> Details of a fee (DataTables-related markup removed because there are no DataTables). - Circulation history - Holds history - Notices Signed-off-by: Amit Gupta Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../en/modules/members/accountline-details.tt | 4 +- .../prog/en/modules/members/boraccount.tt | 4 +- .../prog/en/modules/members/holdshistory.tt | 37 ++++++------------- .../prog/en/modules/members/moremember.tt | 11 ------ .../prog/en/modules/members/notices.tt | 9 ++--- .../prog/en/modules/members/pay.tt | 6 +-- .../prog/en/modules/members/readingrec.tt | 34 ++++++++--------- 7 files changed, 38 insertions(+), 67 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt index 2339ad103b..dc2e8550a0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt @@ -69,7 +69,7 @@ - + @@ -83,7 +83,7 @@
DateDate Description of charges Barcode Due date
- [% accountline.date |$KohaDates %] + [% accountline.date |$KohaDates %] [%- PROCESS account_type_description account=accountline -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index 3824133902..58682f35d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -60,7 +60,7 @@ - + @@ -81,7 +81,7 @@ [% FOREACH account IN accounts %] - + - - - - + + + + [% IF show_itemtype_column %] [% END %] @@ -75,27 +75,15 @@ - - + - - [% IF show_itemtype_column %] - - + + @@ -88,8 +88,8 @@ [% END %] - - + + [% END %] @@ -114,7 +114,6 @@ $(document).ready(function() { $("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, { "aaSorting": [[ 3, "desc" ]], - "aoColumns": [ null,null,null, { "sType": "title-string" } ,{ "sType": "title-string" } ], "sPaginationType": "full" })); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt index 120e98b8de..4bd00a3f08 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -62,7 +62,7 @@ - + @@ -104,8 +104,8 @@ [%- IF line.description %][% line.description | html %][% END %] [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %] - - + - + [% IF Koha.Preference('RecordStaffUserOnCheckout') %] [% END %] - - + + @@ -88,8 +88,8 @@ [% END %] [% issuetype | html %] - - [% IF Koha.Preference('RecordStaffUserOnCheckout') %] [% END %] - - @@ -156,8 +153,7 @@ var columns_settings = [% TablesSettings.GetColumns('members', 'checkouthistory', 'checkouthistory-table', 'json') %]; var table = KohaTable("table_readingrec", { "sPaginationType": "full", - "aaSorting": [[10, 'desc']], - "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', + "aaSorting": [[10, 'desc']] }, columns_settings); var tabs = $("#tabs").tabs({ -- 2.39.5
DateDate Credit number Account type Description of charges
[% account.date |$KohaDates %][% account.date |$KohaDates %] [% account.credit_number | html %] [% PROCESS account_type_description account=account %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt index 4faa3f9bc9..bd2aad334f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -58,10 +58,10 @@ Author Barcode LibraryHold dateExpiration dateWaiting dateCancellation dateHold dateExpiration dateWaiting dateCancellation dateRequested item type[% hold.biblio.author | html %] [% hold.item.barcode | html %] [% Branches.GetName( hold.branchcode ) | html %][% hold.reservedate | $KohaDates %] - [% IF hold.expirationdate %] - [% hold.expirationdate | $KohaDates %] - [% ELSE %] - - [% END %] + [% hold.reservedate | $KohaDates %] + [% hold.expirationdate | $KohaDates %] - [% IF hold.waitingdate %] - [% hold.waitingdate | $KohaDates %] - [% ELSE %] - - [% END %] + + [% hold.waitingdate | $KohaDates %] - [% IF hold.cancellationdate %] - [% hold.cancellationdate | $KohaDates %] - [% ELSE %] - - [% END %] + + [% hold.cancellationdate | $KohaDates %] @@ -156,8 +144,7 @@ [% END %] var table = KohaTable("table_holdshistory", { "sPaginationType": "full", - "aaSorting": [[4, 'desc']], - "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', + "aaSorting": [[4, 'desc']] }, columns_settings); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index fbcca2948b..3e86766aff 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -987,17 +987,6 @@ $('#'+ui.newTab.context.id).click(); } } ); - $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, { - "sDom": 't', - "aoColumnDefs": [ - { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false } - ], - "aoColumns": [ - { "sType": "title-string" },{ "sType": "anti-the" },null,null,null,null,null,null - ], - "bPaginate": false - })); - $("#view_restrictions").on("click",function(){ $('#debarments-tab-link').click(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt index e396f69958..0b7bdffd15 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -49,8 +49,8 @@ Notice Type StatusUpdated onTime createdUpdated onTime created
[% QUEUED_MESSAGE.updated_on | $KohaDates with_hours => 1 %][% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %][% QUEUED_MESSAGE.updated_on | $KohaDates with_hours => 1 %][% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]
Actions Account type DescriptionDateDate Barcode Due date Checkin date - [% line.date | $KohaDates %] + + [% line.date | $KohaDates %] [% IF line.itemnumber %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index 8534cb0ea1..80116c7f58 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -64,19 +64,19 @@
TypeDateDate Title Author Call no. Barcode Number of renewalsChecked out onChecked out on Checked out fromChecked out byDate dueReturn dateDate dueReturn date
- [% issue.issuestimestamp | $KohaDates with_hours => 1 %] + + [% issue.issuestimestamp | $KohaDates with_hours => 1 %] [% INCLUDE 'biblio-title.inc' biblio=issue link = 1 %] @@ -107,25 +107,22 @@ [% issue.barcode | html %] [% issue.renewals | html %] - [% issue.issuedate |$KohaDates with_hours => 1 %] + + [% issue.issuedate |$KohaDates with_hours => 1 %] [% Branches.GetName( issue.branchcode ) | html %][% issue.firstname | html %] [% issue.surname | html %] - [% IF issue.date_due %] - [% issue.date_due |$KohaDates with_hours => 1 %] - [% ELSE %] - - [% END %] + + [% issue.date_due |$KohaDates with_hours => 1 %] [% IF issue.returndate %] - [% issue.returndate |$KohaDates with_hours => 1 %] + + [% issue.returndate |$KohaDates with_hours => 1 %] [% ELSE %] - Checked out + + Checked out [% END %]