Bugzilla – Attachment 118911 Details for
Bug 28016
Replace obsolete title-string sorting: Assorted templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28016: Replace obsolete title-string sorting: Assorted templates
Bug-28016-Replace-obsolete-title-string-sorting-As.patch (text/plain), 9.33 KB, created by
Katrin Fischer
on 2021-03-27 16:14:23 UTC
(
hide
)
Description:
Bug 28016: Replace obsolete title-string sorting: Assorted templates
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-03-27 16:14:23 UTC
Size:
9.33 KB
patch
obsolete
>From bd698a64ff9738e121f6107daa00f8181fd855a6 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 22 Mar 2021 16:55:13 +0000 >Subject: [PATCH] Bug 28016: Replace obsolete title-string sorting: Assorted > templates > >This patch modifies various 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: > >- Cataloging -> Edit items > - Easiest to test with an title with many items. You can follow the > "Edit items" link from search results. >- Tools -> Patron lists > - View the contents of a patron list >- Catalog -> Place hold > - Locate a title with multiple items and check out each item with a > different due date. > - Start the process of placing a hold on that title for a patron. > - On the "Place hold" screen, check the table of "specific" items and > test sorting of the "Information" column by date due. >- Tools -> Tags > >Signed-off-by: Amit Gupta <amitddng135@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/cataloguing/additem.tt | 8 ++----- > .../prog/en/modules/patron_lists/list.tt | 4 ++-- > .../prog/en/modules/reserve/request.tt | 28 ++++++++++------------ > .../intranet-tmpl/prog/en/modules/tags/review.tt | 6 ++--- > 4 files changed, 19 insertions(+), 27 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index d4581936da..c6c83c0fab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -56,11 +56,7 @@ > <th class="NoSort"> </th> > [% FOREACH item_header IN item_header_loop %] > [% IF item_header.column_name %] >- [% IF date_fields.grep(item_header.column_name).size %] >- <th class="title-string" data-colname="[% item_header.column_name | html %]"> >- [% ELSE %] >- <th data-colname="[% item_header.column_name | html %]"> >- [% END %] >+ <th data-colname="[% item_header.column_name | html %]"> > [% ELSE %] > <th> > [% END %] >@@ -115,7 +111,7 @@ > [% END %] > [% FOREACH item_valu IN item_loo.item_value %] > [% IF item_valu.datatype == 'date' %] >- <td><span title="[% item_valu.field | html %]">[% item_valu.field | $KohaDates %]</span></td> >+ <td data-order="[% item_valu.field | html %]">[% item_valu.field | $KohaDates %]</td> > [% ELSE %] > <td>[% item_valu.field | html %]</td> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >index 3a691aeb62..d2abaad8cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >@@ -126,7 +126,7 @@ > <th>Address</th> > <th>Category</th> > <th>Library</th> >- <th class="title-string">Expires on</th> >+ <th>Expires on</th> > <th>Circ notes</th> > </tr> > </thead> >@@ -154,7 +154,7 @@ > </td> > <td>[% p.borrowernumber.categorycode.description | html %] ([% p.borrowernumber.categorycode.categorycode | html %])</td> > <td>[% p.borrowernumber.branchcode.branchname | html %]</td> >- <td><span title="[% p.borrowernumber.dateexpiry | html %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</span></td> >+ <td data-order="[% p.borrowernumber.dateexpiry | html %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</td> > <td>[% p.borrowernumber.borrowernotes | html %]</td> > </tr> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 5dfff18595..3e85c168f1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -541,8 +541,8 @@ > [% IF itemdata_enumchron %] > <th>Vol no.</th> > [% END %] >- <th class="title-string">Information</th> >- <th class="title-string">Allowed pickup locations</th> >+ <th>Information</th> >+ <th>Allowed pickup locations</th> > </tr> > </thead> > <tbody> >@@ -627,17 +627,16 @@ > [% itemloo.enumchron | html %] > </td> > [% END %] >- <td> >- [% IF ( itemloo.onloan ) %] >- <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span> >- [% ELSE %] >- <span title="0000-00-00"> >- [% IF ( itemloo.transfertwhen ) %] >- In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %], >- to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %] >- [% END %] >- </span> >- [% END %] >+ [% IF ( itemloo.onloan ) %] >+ <td data-order="[% itemloo.date_due | html %]"> >+ <span class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span> >+ [% ELSE %] >+ <td> >+ [% IF ( itemloo.transfertwhen ) %] >+ In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %], >+ to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %] >+ [% END %] >+ [% END %] > > [% IF ( itemloo.reservedate ) %] > [% IF ( itemloo.nocancel ) %] >@@ -1074,9 +1073,6 @@ > var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, { > 'bPaginate': false, > "sDom": '<"top pager"ilf>t', >- "aoColumnDefs": [ >- { "sType": "title-string", "aTargets" : [ "title-string" ] } >- ] > })); > > //Override fieldset styling for dataTables search box >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt >index 224cd0bb42..9820e8a5f9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt >@@ -82,7 +82,7 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > <th>Weight</th> > <th class="NoSort noExport">Actions</th> > [% UNLESS ( filter_approved_pending ) %]<th>Reviewer</th>[% END %] >- <th class="title-string">Date</th> >+ <th>Date</th> > </tr> > </thead> > <tbody> >@@ -137,8 +137,8 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > </td> > [% UNLESS ( filter_approved_pending ) %]<td> </td>[% END %] > [% END %] >- <td> >- <span title="[% tagloo.date_approved | html %]">[% tagloo.date_approved | $KohaDates %]</span> >+ <td data-order="[% tagloo.date_approved | html %]"> >+ [% tagloo.date_approved | $KohaDates %] > </td> > </tr> > [% END %] >-- >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 28016
:
118619
|
118672
| 118911