Bugzilla – Attachment 118618 Details for
Bug 28007
Replace obsolete title-string sorting: Tools templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28007: Replace obsolete title-string sorting: Tools templates
Bug-28007-Replace-obsolete-title-string-sorting-To.patch (text/plain), 16.40 KB, created by
Owen Leonard
on 2021-03-22 16:32:18 UTC
(
hide
)
Description:
Bug 28007: Replace obsolete title-string sorting: Tools templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-03-22 16:32:18 UTC
Size:
16.40 KB
patch
obsolete
>From e91cfa7f2e68731ac044b3013ba8e3d2ef798822 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 22 Mar 2021 10:41:33 +0000 >Subject: [PATCH] Bug 28007: Replace obsolete title-string sorting: Tools > templates > >This patch modifies several tools 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: > >- Tools -> Access files > - You must modify koha-conf.xml to uncomment and populate the > access_dirs section with a path to a directory containing some > files. >- Tools -> Calendar > - Test the date sorting in the "Exceptions," "Yearly - Repeating > holidays," and "Unique holidays" tables. >- Tools -> Inventory (I wasn't able to test this because of Bug 28015). >- Tools -> News >- Tools -> Notices >- Tools -> Batch patron modification >- Tools -> OPAC problem reports > - You must enable the "OPACReportProblem" system preference and submit > some problem reports from the OPAC. >--- > .../prog/en/modules/tools/access_files.tt | 4 ++-- > .../intranet-tmpl/prog/en/modules/tools/holidays.tt | 19 +++++++++++++------ > .../intranet-tmpl/prog/en/modules/tools/inventory.tt | 15 +++++++-------- > .../intranet-tmpl/prog/en/modules/tools/koha-news.tt | 11 +++++------ > .../intranet-tmpl/prog/en/modules/tools/letter.tt | 4 ++-- > .../prog/en/modules/tools/modborrowers.tt | 10 +++++----- > .../prog/en/modules/tools/problem-reports.tt | 4 ++-- > 7 files changed, 36 insertions(+), 31 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt >index c7c1d7c51e..037f60d523 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt >@@ -28,7 +28,7 @@ > <tr> > <th>Name</th> > <th>Size (bytes)</th> >- <th class="title-string">Date last modified</th> >+ <th>Date last modified</th> > </tr> > </thead> > <tbody> >@@ -36,7 +36,7 @@ > <tr> > <td><a href="/cgi-bin/koha/tools/access_files.pl?id=[% file.id |url %]">[% file.name | html %]</a></td> > <td align="right">[% file.size | html %]</td> >- <td><span title="[% file.date | html %]">[% file.date | $KohaDates %]</span></td> >+ <td data-order="[% file.date | html %]">[% file.date | $KohaDates %]</td> > </tr> > [% END %] > </tbody> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt >index 8aefa2458f..753799a84e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt >@@ -256,7 +256,11 @@ td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl > <tbody> > [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %] > <tr> >- <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE | uri %]"><span title="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">[% EXCEPTION_HOLIDAYS_LOO.DATE | html %]</span></a></td> >+ <td data-order="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]"> >+ <a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE | uri %]"> >+ [% EXCEPTION_HOLIDAYS_LOO.DATE | html %] >+ </a> >+ </td> > <td>[% EXCEPTION_HOLIDAYS_LOO.TITLE | html %]</td> > <td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | html %]</td> > </tr> >@@ -305,7 +309,9 @@ td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl > <tbody> > [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %] > <tr> >- <td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.DATE | html %]</span></td> >+ <td data-order="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]"> >+ [% DAY_MONTH_HOLIDAYS_LOO.DATE | html %] >+ </td> > <td>[% DAY_MONTH_HOLIDAYS_LOO.TITLE | html %]</td> > <td>[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION | html %]</td> > </tr> >@@ -327,7 +333,11 @@ td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl > <tbody> > [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %] > <tr> >- <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&calendardate=[% HOLIDAYS_LOO.DATE | uri %]"><span title="[% HOLIDAYS_LOO.DATE_SORT | html %]">[% HOLIDAYS_LOO.DATE | html %]</span></a></td> >+ <td data-order="[% HOLIDAYS_LOO.DATE_SORT | html %]"> >+ <a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&calendardate=[% HOLIDAYS_LOO.DATE | uri %]"> >+ [% HOLIDAYS_LOO.DATE | html %] >+ </a> >+ </td> > <td>[% HOLIDAYS_LOO.TITLE | html %]</td> > <td>[% HOLIDAYS_LOO.DESCRIPTION.replace('\\\r\\\n', '<br />') | html %]</td> > </tr> >@@ -514,9 +524,6 @@ td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl > })); > $("#holidayexceptions,#holidaysyearlyrepeatable,#holidaysunique").dataTable($.extend(true, {}, dataTablesDefaults, { > "sDom": 't', >- "aoColumns": [ >- { "sType": "title-string" },null,null >- ], > "bPaginate": false > })); > $("a.helptext").click(function(){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >index 4faa432eda..1653b96cf4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -213,14 +213,14 @@ > <tr> > [% UNLESS uploadedbarcodesflag %]<th>Seen</th>[% END %] > <th>Barcode</th> >- <th class="title-string">Call number</th> >+ <th>Call number</th> > <th>Library</th> > <th class="anti-the">Title</th> > <th>Not for loan</th> > <th>Lost</th> > <th>Damaged</th> > <th>Withdrawn</th> >- <th class="title-string">Last seen</th> >+ <th>Last seen</th> > <th>Problems</th> > </tr> > </thead> >@@ -235,8 +235,8 @@ > <td> > [% result.barcode | html %] > </td> >- <td> >- <span title="[% result.cn_sort | html %]">[% result.itemcallnumber | html %]</span> >+ <td data-order="[% result.cn_sort | html %]"> >+ [% result.itemcallnumber | html %] > </td> > <td> > [% Branches.GetName( result.homebranch ) | html %] >@@ -260,8 +260,8 @@ > <td> > [% result.withdrawn | html %] > </td> >- <td> >- <span title="[% result.datelastseen | html %]">[% result.datelastseen | $KohaDates%]</span> >+ <td data-order="[% result.datelastseen | html %]"> >+ [% result.datelastseen | $KohaDates%] > </td> > <td> > [% FOREACH problem IN result.problems %] >@@ -371,8 +371,7 @@ > // first column contains checkboxes > "aoColumnDefs": [ > { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >- { "bSortable": false, "bSearchable": false, "aTargets": [ 0 ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] }, >+ { "bSortable": false, "bSearchable": false, "aTargets": [ 0 ] } > ], > // 3rd column is callnumber > "aaSorting": [[ 2, "asc" ]], >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >index d609997a40..b414052d7c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >@@ -119,8 +119,8 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > <th>Location</th> > <th>Library</th> > <th>Number</th> >- <th class="title-string">Publication date</th> >- <th class="title-string">Expiration date</th> >+ <th>Publication date</th> >+ <th>Expiration date</th> > <th class="anti-the">Title</th> > <th>Author</th> > <th class="anti-the">News</th> >@@ -151,8 +151,8 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > [% ELSE %][% opac_new.branchname | html %] > [% END %]</td> > <td>[% opac_new.number | html %]</td> >- <td><span title="[% opac_new.newdate | html %]">[% opac_new.newdate | $KohaDates %]</span></td> >- <td><span title="[% opac_new.expirationdate | html %]">[% opac_new.expirationdate | $KohaDates %] [% IF ( opac_new.expired ) %](<span class="expired">expired</span>)[% END %]</span></td> >+ <td data-order="[% opac_new.newdate | html %]">[% opac_new.newdate | $KohaDates %]</td> >+ <td data-order="[% opac_new.expirationdate | html %]">[% opac_new.expirationdate | $KohaDates %] [% IF ( opac_new.expired ) %](<span class="expired">expired</span>)[% END %]</td> > <td>[% opac_new.title | html %]</td> > <td>[% opac_new.author_title | html %] [% opac_new.author_firstname | html %] [% opac_new.author_surname | html %]</td> > <td> >@@ -315,8 +315,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > "order": [[ 4, "desc" ]], > "aoColumnDefs": [ > { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] }, >- { "type": "anti-the", "targets": [ "anti-the" ] }, >- { "type": "title-string", "targets" : [ "title-string"] } >+ { "type": "anti-the", "targets": [ "anti-the" ] } > ], > "sPaginationType": "full_numbers" > })); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >index 9bc75fc4ef..312494bec9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -144,7 +144,7 @@ > <th>Module</th> > <th>Code</th> > <th>Name</th> >- <th class="title-string">Last updated</th> >+ <th>Last updated</th> > <th class="NoSort noExport">Copy notice</th> > <th class="NoSort noExport">Actions</th> > </tr> >@@ -179,7 +179,7 @@ > </td> > <td>[% lette.code | html %]</td> > <td>[% lette.name | html %]</td> >- <td><span title="[% lette.updated_on | $KohaDates with_hours = 1 %]">[% lette.updated_on | $KohaDates with_hours = 1 %]</span></td> >+ <td data-order="[% lette.updated_on | html %]">[% lette.updated_on | $KohaDates with_hours = 1 %]</td> > <td class="actions"> > [% IF !independant_branch || !lette.branchcode %] > <form method="post" action="/cgi-bin/koha/tools/letter.pl"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >index 9147d522f9..7d9ea672c8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -151,8 +151,8 @@ > <th>Primary email</th> > <th>Phone</th> > <th>Mobile</th> >- <th class="title-string">Registration date</th> >- <th class="title-string">Expiry date</th> >+ <th>Registration date</th> >+ <th>Expiry date</th> > <th>Circulation note</th> > <th>OPAC note</th> > <th>Restriction expiration</th> >@@ -183,11 +183,11 @@ > <td>[% borrower.email | html %]</td> > <td>[% borrower.phone | html %]</td> > <td>[% borrower.mobile | html %]</td> >- <td><span title="[% borrower.dateenrolled | html %]">[% borrower.dateenrolled | $KohaDates %]</span></td> >- <td><span title="[% borrower.dateexpiry | html %]">[% borrower.dateexpiry | $KohaDates %]</span></td> >+ <td data-order="[% borrower.dateenrolled | html %]">[% borrower.dateenrolled | $KohaDates %]</td> >+ <td data-order="[% borrower.dateexpiry | html %]">[% borrower.dateexpiry | $KohaDates %]</td> > <td>[% borrower.borrowernotes | html %]</td> > <td>[% borrower.opacnote | html %]</td> >- <td><span title="[% borrower.debarred | html %]">[% borrower.debarred | $KohaDates %]</span></td> >+ <td data-order="[% borrower.debarred | html %]">[% borrower.debarred | $KohaDates %]</td> > <td>[% borrower.debarredcomment | html %]</td> > [% FOREACH pa IN borrower.patron_attributes %] > [% IF ( pa.code ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt >index bda67c2b47..14a67e81d3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt >@@ -65,7 +65,7 @@ > <th class="anti-the">Message</th> > <th>Problem page</th> > <th>Sent to</th> >- <th class="title-string">Created on</th> >+ <th>Created on</th> > <th>Set by</th> > <th>Status</th> > <th class="NoSort noExport">Actions</th> >@@ -86,7 +86,7 @@ > [% CASE 'library' %]A librarian > [% END %] > </td> >- <td><span title="[% report.created_on | html %]">[% report.created_on | $KohaDates with_hours => 1 %]</span></td> >+ <td data-order="[% report.created_on | html %]">[% report.created_on | $KohaDates with_hours => 1 %]</td> > <td>[% INCLUDE 'patron-title.inc' patron => report.patron hide_patron_infos_if_needed=1 %]</td> > <td class="status[% report.status | html %]" name="status"> > <span id="status_[% report.reportid | html %]"> >-- >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 28007
:
118618
|
118671
|
118791
|
118897
|
118898