Bugzilla – Attachment 118675 Details for
Bug 27990
Replace obsolete title-string sorting: Patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27990: Replace obsolete title-string sorting: Patrons
0001-Bug-27990-Replace-obsolete-title-string-sorting-Patr.patch (text/plain), 13.79 KB, created by
Amit Gupta
on 2021-03-23 15:47:15 UTC
(
hide
)
Description:
Bug 27990: Replace obsolete title-string sorting: Patrons
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2021-03-23 15:47:15 UTC
Size:
13.79 KB
patch
obsolete
>From 6ea54f176e56612dcd1de412e396ea646abc25af Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <amitddng135@gmail.com> >--- > .../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 c98dbb8..74341d7 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 @@ > <table id="table_account_fines"> > <thead> > <tr> >- <th class="title-string">Date</th> >+ <th>Date</th> > <th>Description of charges</th> > <th>Barcode</th> > <th>Due date</th> >@@ -54,7 +54,7 @@ > <tbody> > <tr> > <td> >- <span title="[% accountline.date | html %]">[% accountline.date |$KohaDates %]</span> >+ [% accountline.date |$KohaDates %] > </td> > <td> > [%- 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 f2be33a..8fb19db 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 @@ > <table id="table_account_fines"> > <thead> > <tr> >- <th class="title-string">Date</th> >+ <th>Date</th> > <th>Credit number</th> > <th>Account type</th> > <th>Description of charges</th> >@@ -67,7 +67,7 @@ > [% FOREACH account IN accounts %] > > <tr> >- <td><span title="[% account.date | html %]">[% account.date |$KohaDates %]</span></td> >+ <td data-order="[% account.date | html %]">[% account.date |$KohaDates %]</td> > <td>[% account.credit_number | html %]</td> > <td>[% PROCESS account_type_description account=account %]</td> > <td> >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 5efdf30..ede1260 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 @@ > <th>Author</th> > <th>Barcode</th> > <th>Library</th> >- <th class="title-string">Hold date</th> >- <th class="title-string">Expiration date</th> >- <th class="title-string">Waiting date</th> >- <th class="title-string">Cancellation date</th> >+ <th>Hold date</th> >+ <th>Expiration date</th> >+ <th>Waiting date</th> >+ <th>Cancellation date</th> > [% IF show_itemtype_column %] > <th>Requested item type</th> > [% END %] >@@ -61,27 +61,15 @@ > <td>[% hold.biblio.author | html %]</td> > <td>[% hold.item.barcode | html %]</td> > <td>[% Branches.GetName( hold.branchcode ) | html %]</td> >- <td><span title="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</span></td> >- <td> >- [% IF hold.expirationdate %] >- <span title="[% hold.expirationdate | html %]">[% hold.expirationdate | $KohaDates %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >- [% END %] >+ <td data-order="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</td> >+ <td data-order="[% hold.expirationdate | html %]"> >+ [% hold.expirationdate | $KohaDates %] > </td> >- <td> >- [% IF hold.waitingdate %] >- <span title="[% hold.waitingdate | html %]">[% hold.waitingdate | $KohaDates %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >- [% END %] >+ <td data-order="[% hold.waitingdate | html %]"> >+ [% hold.waitingdate | $KohaDates %] > </td> >- <td> >- [% IF hold.cancellationdate %] >- <span title="[% hold.cancellationdate | html %]">[% hold.cancellationdate | $KohaDates %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >- [% END %] >+ <td data-order="[% hold.cancellationdate | html %]"> >+ [% hold.cancellationdate | $KohaDates %] > </td> > [% IF show_itemtype_column %] > <td> >@@ -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); > }); > </script> >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 7b7fd26..6456f91 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 deae3b2..53118d9 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 @@ > <th>Notice</th> > <th>Type</th> > <th>Status</th> >- <th class="title-string">Updated on</th> >- <th class="title-string">Time created</th> >+ <th>Updated on</th> >+ <th>Time created</th> > </tr> > </thead> > <tbody> >@@ -74,8 +74,8 @@ > </div> > [% END %] > </td> >- <td><span title="[% QUEUED_MESSAGE.updated_on | html %]">[% QUEUED_MESSAGE.updated_on | $KohaDates with_hours => 1 %]</span></td> >- <td><span title="[% QUEUED_MESSAGE.time_queued | html %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</span></td> >+ <td data-order="[% QUEUED_MESSAGE.updated_on | html %]">[% QUEUED_MESSAGE.updated_on | $KohaDates with_hours => 1 %]</td> >+ <td data-order="[% QUEUED_MESSAGE.time_queued | html %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</td> > </tr> > [% END %] > </tbody> >@@ -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 dcdc115..4c08986 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 @@ > <th class="NoSort noExport">Actions</th> > <th>Account type</th> > <th>Description</th> >- <th class="title-string">Date</th> >+ <th>Date</th> > <th>Barcode</th> > <th>Due date</th> > <th>Checkin date</th> >@@ -90,8 +90,8 @@ > [%- IF line.description %][% line.description | html %][% END %] > [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %] > </td> >- <td> >- <span title="[% line.date | html %]">[% line.date | $KohaDates %]</span> >+ <td data-order="[% line.date | html %]"> >+ [% line.date | $KohaDates %] > </td> > <td> > [% 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 ed73443..34e4a72 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 @@ > <thead> > <tr> > <th style="display:none;">Type</th> >- <th class="title-string">Date</th> >+ <th>Date</th> > <th class="anti-the">Title</th> > <th>Author</th> > <th>Call no.</th> > <th>Barcode</th> > <th>Number of renewals</th> >- <th class="title-string">Checked out on</th> >+ <th>Checked out on</th> > <th>Checked out from</th> > [% IF Koha.Preference('RecordStaffUserOnCheckout') %] > <th>Checked out by</th> > [% END %] >- <th class="title-string">Date due</th> >- <th class="title-string">Return date</th> >+ <th>Date due</th> >+ <th>Return date</th> > </tr> > </thead> > <tbody> >@@ -74,8 +74,8 @@ > [% END %] > [% issuetype | html %] > </td> >- <td> >- <span title="[% issue.issuestimestamp | html %]">[% issue.issuestimestamp | $KohaDates with_hours => 1 %]</span> >+ <td data-order="[% issue.issuestimestamp | html %]"> >+ [% issue.issuestimestamp | $KohaDates with_hours => 1 %] > </td> > <td> > [% INCLUDE 'biblio-title.inc' biblio=issue link = 1 %] >@@ -93,25 +93,22 @@ > > <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% issue.itemnumber | uri %]&biblionumber=[% issue.biblionumber | uri %]&bi=[% issue.biblioitemnumber | uri %]#item[% issue.itemnumber | uri %]">[% issue.barcode | html %]</a></td> > <td>[% issue.renewals | html %]</td> >- <td> >- <span title="[% issue.issuedate | html %]">[% issue.issuedate |$KohaDates with_hours => 1 %]</span> >+ <td data-order="[% issue.issuedate | html %]"> >+ [% issue.issuedate |$KohaDates with_hours => 1 %] > </td> > <td>[% Branches.GetName( issue.branchcode ) | html %]</td> > [% IF Koha.Preference('RecordStaffUserOnCheckout') %] > <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issue.issuer_id | uri %]">[% issue.firstname | html %] [% issue.surname | html %]</a></td> > [% END %] >- <td> >- [% IF issue.date_due %] >- <span title="[% issue.date_due | html %]">[% issue.date_due |$KohaDates with_hours => 1 %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >- [% END %] >+ <td data-order="[% issue.date_due | html %]"> >+ [% issue.date_due |$KohaDates with_hours => 1 %] > </td> >- <td> > [% IF issue.returndate %] >- <span title="[% issue.returndate | html %]">[% issue.returndate |$KohaDates with_hours => 1 %]</span> >+ <td data-order="[% issue.returndate | html %]"> >+ [% issue.returndate |$KohaDates with_hours => 1 %] > [% ELSE %] >- <span title="Checked out"><small>Checked out</small></span> >+ <td data-order="checked out"> >+ <small>Checked out</small> > [% END %] > </td> > </tr> >@@ -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.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27990
:
118507
|
118674
|
118675
|
118784
|
118906
|
118907