Bugzilla – Attachment 118456 Details for
Bug 27974
Replace obsolete title-string sorting: Circulation templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27974: Replace obsolete title-string sorting: Circulation templates
Bug-27974-Replace-obsolete-title-string-sorting-Ci.patch (text/plain), 13.65 KB, created by
Martin Renvoize (ashimema)
on 2021-03-18 10:46:11 UTC
(
hide
)
Description:
Bug 27974: Replace obsolete title-string sorting: Circulation templates
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-18 10:46:11 UTC
Size:
13.65 KB
patch
obsolete
>From b2bb9cc78f48a48be557af657574a0aa99cb794a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 17 Mar 2021 18:01:17 +0000 >Subject: [PATCH] Bug 27974: Replace obsolete title-string sorting: Circulation > templates > >This patch modifies several circulation 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: > >- Circulation -> Checkout notes > - To populate the table, enable the "AllowCheckoutNotes" system > preference enabled, log in to the OPAC as a user with checkouts. > From the "Your summary" page use the "Report a problem" fields to > submit notes. >- Circulation -> On-site checkouts > - Requires the "OnSiteCheckouts" system preference to be enabled and > and for some items to be checked out as on-site checkouts. >- Circulation -> Overdues >- Circulation -> Holds to pull >- Circulation -> Transfers to send > - Requires the "StockRotation" preference to be enabled, some rotas > to be set up, and for the stockrotation cron job to be executed. >- Circulation -> Transfers to receive >- Circulation -> Holds queue > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/circ/checkout-notes.tt | 5 ++--- > .../prog/en/modules/circ/on-site_checkouts.tt | 19 +++---------------- > .../prog/en/modules/circ/overdue.tt | 4 ++-- > .../prog/en/modules/circ/pendingreserves.tt | 6 +++--- > .../prog/en/modules/circ/transfers_to_send.tt | 9 +++++---- > .../en/modules/circ/transferstoreceive.tt | 7 +++---- > .../prog/en/modules/circ/view_holdsqueue.tt | 4 ++-- > 7 files changed, 20 insertions(+), 34 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt >index 693b752540..c693f0db79 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt >@@ -67,7 +67,7 @@ > <th class="NoSort"> </th> > <th class="anti-the">Title</th> > <th>Note</th> >- <th class="title-string">Date</th> >+ <th>Date</th> > <th>Set by</th> > <th>Status</th> > <th class="NoSort noExport">Actions</th> >@@ -79,7 +79,7 @@ > <td><input type="checkbox" name="issue_ids" value="[% note.issue_id | html %]"></td> > <td>[% note.item.biblio.title | html %] - [% note.item.biblio.author | html %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber | uri %]">[% note.item.barcode | html %]</a>)</td> > <td>[% note.note | html %]</td> >- <td><span title="[% note.notedate | html %]">[% note.notedate | $KohaDates %]</span></td> >+ <td data-order="[% note.notedate | html %]">[% note.notedate | $KohaDates %]</td> > <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td> > <td class="seen[% note.noteseen | html %]"> > [% IF ( note.noteseen == 0 ) %] >@@ -131,7 +131,6 @@ > "order": [[ 1, "asc" ]], > "aoColumnDefs": [ > { "orderable": false, "searchable": false, 'targets': [ 'NoSort' ] }, >- { "type": "title-string", "targets" : [ "title-string" ] }, > { "type": "anti-the", "targets": [ "anti-the" ] } > ], > "pagingType": "full" >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt >index 38f387a6a8..1f0e6ba259 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt >@@ -39,9 +39,9 @@ > <tbody> > [% FOREACH item IN pending_onsite_checkouts %] > <tr> >- <td> >+ <td data-order="[% item.date_due | html %]"> > [% IF item.is_overdue %]<span class="overdue">[% END %] >- <span title="[% item.date_due | html %]">[% item.date_due | $KohaDates %]</span> >+ [% item.date_due | $KohaDates %] > [% IF item.is_overdue %]</span>[% END %] > </td> > <td> >@@ -83,20 +83,7 @@ > <script> > $(document).ready(function(){ > if ( $("#pending_onsite_checkout").length ) { >- $("#pending_onsite_checkout").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], >- "aoColumns": [ >- { "sType": "title-string" }, >- { "sType": "html" }, >- { "sType": "html" }, >- null, >- { "sType": "html" }, >- null, >- null, >- ], >- 'bAutoWidth': false, >- "sPaginationType": "full" >- })); >+ $("#pending_onsite_checkout").dataTable($.extend(true, {}, dataTablesDefaults)); > } > }); > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >index d4c90e5700..23b8320fbf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -52,7 +52,7 @@ > <table id="overduest"> > <thead> > <tr> >- <th class="title-string">Due date</th> >+ <th>Due date</th> > <th>Patron</th> > <th>Patron category</th> > <th>Patron library</th> >@@ -70,7 +70,7 @@ > <tbody> > [% FOREACH overdueloo IN overdueloop %] > <tr> >- <td><span title="[% overdueloo.duedate | html %]">[% overdueloo.duedate | $KohaDates %]</span></td> >+ <td data-order="[% overdueloo.duedate | html %]">[% overdueloo.duedate | $KohaDates %]</td> > <td> > [% INCLUDE 'patron-title.inc' patron=overdueloo.patron hide_patron_infos_if_needed=1 %] > [% IF logged_in_user.can_see_patron_infos( overdueloo.patron ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index a06981896d..02e28ecf65 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -63,7 +63,7 @@ > <th>Available enumeration</th> > <th class="string-sort">Available item types</th> > <th class="string-sort">Available locations</th> >- <th class="title-string">Earliest hold date</th> >+ <th>Earliest hold date</th> > <th>Action</th> > </tr> > </thead> >@@ -160,8 +160,8 @@ > [% END %] > </ul> > </td> >- <td> >- <span title="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %] in [% Branches.GetName ( hold.branchcode ) | html %]</span> >+ <td data-order="[% hold.reservedate | html %]"> >+ [% hold.reservedate | $KohaDates %] in [% Branches.GetName ( hold.branchcode ) | html %] > </td> > <td> > <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt >index 744a311aea..8ba5141f34 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt >@@ -40,7 +40,7 @@ > <caption>Sending to [% library.branchname | html %]</caption> > <thead> > <tr> >- <th class="title-string">Date of request</th> >+ <th>Date of request</th> > <th class="anti-the">Title</th> > <th>Reason</th> > <th>On loan</th> >@@ -53,7 +53,9 @@ > [% FOREACH transfer IN library.inbound_transfers %] > [% UNLESS transfer.datesent %] > <tr> >- <td><p><span title="[% transfer.daterequested | html %]">[% transfer.daterequested | $KohaDates %]</span></p></td> >+ <td data-order="[% transfer.daterequested | html %]"> >+ [% transfer.daterequested | $KohaDates %] >+ </td> > <td> > [% INCLUDE 'biblio-title.inc' biblio = transfer.item.biblio link = 1 %][% IF ( transfer.item.biblio.author ) %] by [% transfer.item.biblio.author | html %][% END %] > [% IF ( transfer.item.effective_itemtype ) %] (<b>[% ItemTypes.GetDescription( transfer.item.effective_itemtype ) | html %]</b>)[% END %] >@@ -103,8 +105,7 @@ > $("#transferst[% library.branchcode | html %]").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ > { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >- { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] } >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] } > ], > "sDom": 't', > "bPaginate": false >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >index 0d9360f4ea..aef12fe4d6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >@@ -37,7 +37,7 @@ > <table style="width: 100%" id="transferst[% branchesloo.branchcode | html %]"> > <caption>Coming from [% branchesloo.branchname | html %]</caption> > <thead><tr> >- <th class="title-string">Date of transfer</th> >+ <th>Date of transfer</th> > <th class="anti-the">Title</th> > <th>On hold for</th> > <th>Home library</th> >@@ -50,7 +50,7 @@ > [% ELSE %] > <tr> > [% END %] >- <td><p><span title="[% reser.datetransfer | html %]">[% reser.datetransfer | $KohaDates %]</span></p> [% IF ( reser.messcompa ) %]<span class="error">Transfer is [% reser.diff | html %] days late</span>[% END %]</td> >+ <td data-order="[% reser.datetransfer | html %]"><p>[% reser.datetransfer | $KohaDates %]</p> [% IF ( reser.messcompa ) %]<span class="error">Transfer is [% reser.diff | html %] days late</span>[% END %]</td> > <td> > [% INCLUDE 'biblio-title.inc' biblio=reser link = 1 %] [% IF ( reser.author ) %]by [% reser.author | html %][% END %] > [% IF ( reser.itemtype ) %] (<strong>[% reser.itemtype | html %]</strong>)[% END %] >@@ -107,8 +107,7 @@ > $("#transferst[% branchesloo.branchcode | html %]").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ > { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >- { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] } >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] } > ], > "sDom": 't', > "bPaginate": false >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >index 8c0eb4e561..bd8145c0ca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >@@ -59,7 +59,7 @@ > <th class="hq-barcode">Barcode</th> > <th class="hq-patron">Patron</th> > <th class="hq-sendto">Send to</th> >- <th class="hq-date title-string">Date</th> >+ <th class="hq-date">Date</th> > <th class="hq-notes">Notes</th> > </tr> > <tr> >@@ -168,7 +168,7 @@ > [% END %] > </td> > <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) | html %]</td> >- <td class="hq-date"><span title="[% itemsloo.reservedate | html %]">[% itemsloo.reservedate | $KohaDates %]</span></td> >+ <td class="hq-date" data-order="[% itemsloo.reservedate | html %]">[% itemsloo.reservedate | $KohaDates %]</td> > <td class="hq-notes">[% itemsloo.notes | html %]</td> > </tr> > [% END %]</tbody> >-- >2.20.1
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 27974
:
118427
|
118437
|
118456
|
118798
|
118895
|
118896