Bugzilla – Attachment 118514 Details for
Bug 27994
Replace obsolete title-string sorting: Reports templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27994: Replace obsolete title-string sorting: Reports templates
Bug-27994-Replace-obsolete-title-string-sorting-Re.patch (text/plain), 10.80 KB, created by
Owen Leonard
on 2021-03-19 11:51:19 UTC
(
hide
)
Description:
Bug 27994: Replace obsolete title-string sorting: Reports templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-03-19 11:51:19 UTC
Size:
10.80 KB
patch
obsolete
>From 922552ff1977f3730a8d2efca2863982a0dd8bad Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 19 Mar 2021 11:38:54 +0000 >Subject: [PATCH] Bug 27994: Replace obsolete title-string sorting: Reports > templates > >This patch modifies several reports 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: > >- Guided reports -> Saved SQL reports >- Guided reports -> Saved SQL reports -> New SQL from Mana -> Search > results. >- Reports -> Items lost >- Reports -> Serials >--- > .../en/includes/mana/mana-report-search-result.inc | 10 ++++------ > .../prog/en/modules/reports/guided_reports_start.tt | 21 +++++++++------------ > .../prog/en/modules/reports/itemslost.tt | 8 ++++---- > .../prog/en/modules/reports/serials_stats.tt | 10 +++------- > 4 files changed, 20 insertions(+), 29 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc >index 49920699f4..054bd2c66b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc >@@ -38,7 +38,7 @@ > <th class="anti-the">Notes</th> > <th>Type</th> > <th title="Number of libraries using this pattern"># of users</th> >- <th class="title-string" title="Last time a library used this pattern">Last import</th> >+ <th title="Last time a library used this pattern">Last import</th> > <th> Comments </th> > [% UNLESS search_only %] > <th class="NoSort noExport">Actions</th> >@@ -82,10 +82,8 @@ > [% report.nbofusers | html %] > [% END %] > </td> >- <td> >- <span title="[% report.lastimport | html %]"> >- [% report.lastimport | $KohaDates %] >- </span> >+ <td data-order="[% report.lastimport | html %]"> >+ [% report.lastimport | $KohaDates %] > </td> > <td> > [% FOREACH comment IN report.comments %] >@@ -124,4 +122,4 @@ > </div> <!-- /.col-sm-2.col-sm-pull-10 --> > </div> <!-- /.row --> > >-[% INCLUDE 'intranet-bottom.inc' %] >\ No newline at end of file >+[% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index c2c3138d94..6482caf36b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -228,9 +228,9 @@ > <th>Subgroup</th> > <th>Notes</th> > <th>Author</th> >- <th class="title-string">Creation date</th> >- <th class="title-string">Last edit</th> >- <th class="title-string">Last run</th> >+ <th>Creation date</th> >+ <th>Last edit</th> >+ <th>Last run</th> > <th class="report_public">Public</th> > <th class="report_json_url">JSON URL</th> > [% IF (usecache) %] >@@ -285,14 +285,14 @@ > [% END %] > ([% savedreport.borrowernumber | html %]) > </td> >- <td> >- <span title="[% savedreport.date_created | html %]">[% savedreport.date_created | $KohaDates %]</span> >+ <td data-order="[% savedreport.date_created | html %]"> >+ [% savedreport.date_created | $KohaDates %] > </td> >- <td> >- <span title="[% savedreport.last_modified | html %]">[% savedreport.last_modified | $KohaDates with_hours => 1 %]</span> >+ <td data-order="[% savedreport.last_modified | html %]"> >+ [% savedreport.last_modified | $KohaDates with_hours => 1 %] > </td> >- <td> >- <span title="[% savedreport.last_run | html %]">[% savedreport.last_run | $KohaDates with_hours => 1 %]</span> >+ <td data-order="[% savedreport.last_run | html %]"> >+ [% savedreport.last_run | $KohaDates with_hours => 1 %] > </td> > <td class="report_public"> > [% IF (savedreport.public) %] >@@ -1605,8 +1605,6 @@ > 'sPaginationType': 'full', > 'aaSorting': [[ 1, "asc" ]], > 'aoColumnDefs': [ >- { 'bSearchable': false, 'aTargets': [3] }, >- { "aTargets": [ 1, 2 ], "sType": "natural" }, > { "visible": false, "aTargets" : [ "hidden" ] } > ], > 'oLanguage': { >@@ -1931,7 +1929,6 @@ > ], > "aoColumnDefs": [ > { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] }, > { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] } > ] > })); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >index 6b1abc4436..dc46709a9e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >@@ -67,10 +67,10 @@ > <th>Title</th> > <th>Author</th> > <th>Lost status</th> >- <th class="title-string">Lost on</th> >+ <th>Lost on</th> > <th>Barcode</th> > <th>Call number</th> >- <th class="title-string">Date last seen</th> >+ <th>Date last seen</th> > <th>Price</th> > <th>Rep.price</th> > <th>Library</th> >@@ -95,12 +95,12 @@ > </td> > <td>[% item.biblio.author | html %]</td> > <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) | html %] >- <td><span title="[% item.itemlost_on | html %]">[% item.itemlost_on | $KohaDates %]</span></td> >+ <td data-order="[% item.itemlost_on | html %]">[% item.itemlost_on | $KohaDates %]</td> > <td> > <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]">[% item.barcode | html %]</a> > </td> > <td>[% item.itemcallnumber | html %]</td> >- <td><span title="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</span></td> >+ <td data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td> > <td>[% item.price | $Price %]</td> > <td>[% item.replacementprice | $Price %]</td> > <td>[% Branches.GetName(item.homebranch) | html %]</td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt >index 91cb513b34..e938a055cc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt >@@ -28,7 +28,7 @@ > <thead> > <tr> > <th>Vendor</th> >- <th>Title</th> >+ <th class="anti-the">Title</th> > <th>Subscription ID</th> > <th>Library</th> > <th>Call number</th> >@@ -45,8 +45,8 @@ > <td>[% data.subscriptionid | html %]</td> > <td>[% Branches.GetName( data.branchcode ) | html %]</td> > <td>[% data.callnumber | html %]</td> >- <td><span title="[% data.startdate | html %]">[% data.startdate | $KohaDates %]</span></td> >- <td><span title="[% data.enddate | html %]">[% data.enddate | $KohaDates %]</span></td> >+ <td data-order="[% data.startdate | html %]">[% data.startdate | $KohaDates %]</td> >+ <td data-order="[% data.enddate | html %]">[% data.enddate | $KohaDates %]</td> > <td> > [% IF data.closed %] > Closed >@@ -145,11 +145,7 @@ > <script> > $(document).ready(function() { > $("#resulttable").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sDom": 't', > "bPaginate": false, >- "aoColumns": [ >- null,{ "sType": "anti-the" },null,null,null,{ "sType": "title-string" },{ "sType": "title-string" },null >- ], > })); > }); > </script> >-- >2.11.0
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 27994
:
118514
|
118673
|
118785
|
118909
|
118910