From ec9e9b75e1df7111c9e363410f471ddb242e3a5a 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 --- .../prog/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 +++--- .../intranet-tmpl/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 c98dbb8ca0..74341d7bbc 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 @@ -40,7 +40,7 @@ - + @@ -54,7 +54,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 f2be33ab51..8fb19dbe5c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -46,7 +46,7 @@ - + @@ -67,7 +67,7 @@ [% FOREACH account IN accounts %] - + - - - - + + + + [% IF show_itemtype_column %] [% END %] @@ -61,27 +61,15 @@ - - + - - [% IF show_itemtype_column %] - - + + @@ -74,8 +74,8 @@ [% END %] - - + + [% END %] @@ -100,7 +100,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 dcdc115517..4c08986a6b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -48,7 +48,7 @@ - + @@ -90,8 +90,8 @@ [%- IF line.description %][% line.description | html %][% END %] [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %] - - + - + [% IF Koha.Preference('RecordStaffUserOnCheckout') %] [% END %] - - + + @@ -74,8 +74,8 @@ [% END %] [% issuetype | html %] - - [% IF Koha.Preference('RecordStaffUserOnCheckout') %] [% END %] - - @@ -142,8 +139,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.11.0
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 5efdf309d6..ede1260dd8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -44,10 +44,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 %] @@ -142,8 +130,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 7b7fd26e67..6456f91475 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -968,17 +968,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 deae3b25f3..53118d9b2e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -35,8 +35,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 ed734436a7..34e4a7210d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -50,19 +50,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 %] @@ -93,25 +93,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 %]