Bugzilla – Attachment 27740 Details for
Bug 12088
Improve date handling and sorting in holds to pull report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12088 [Revised] Improve date handling and sorting in holds to pull report
PASSED-QA-Bug-12088-Revised-Improve-date-handling-.patch (text/plain), 6.27 KB, created by
Katrin Fischer
on 2014-04-28 18:10:44 UTC
(
hide
)
Description:
[PASSED QA] Bug 12088 [Revised] Improve date handling and sorting in holds to pull report
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-04-28 18:10:44 UTC
Size:
6.27 KB
patch
obsolete
>From 83eb9451503a16314289373e6c72ac3fcb8c6f1b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 15 Apr 2014 12:15:41 -0400 >Subject: [PATCH] [PASSED QA] Bug 12088 [Revised] Improve date handling and > sorting in holds to pull report > >The holds to pull report could be improved by improving sorting on the >title and date columns. This patch adds "anti-the" sorting to the title >column and "title-string" sorting to the date column. > >Date formatting of another variable has been moved to the template for >formatting using KohaDates. > >The patch includes other corrections for HTML validity. > >To test, apply the patch and view the holds to pull report. > - Sorting by date should work correctly regardless of dateformat system > preference setting. > - Sorting of the title columns should correctly ignore articles. > - Formatting of the "Reported on" date should be correct. > >Revision incorporates the corrections made by Bug 12127 and converts >those changes to use class-based sorting. > >Signed-off-by: David Cook <dcook@prosentient.com.au> > >The patch works as described. Thanks for including and improving the >changes from Bug 12127, Owen! > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes QA script and tests. >No regressions found, works as advertised. >--- > circ/pendingreserves.pl | 4 +-- > .../prog/en/modules/circ/pendingreserves.tt | 38 ++++++++++------------ > 2 files changed, 20 insertions(+), 22 deletions(-) > >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index c34c52c..7370819 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -165,7 +165,7 @@ if ( $run_report ) { > push( > @reservedata, > { >- reservedate => format_date( $data->{l_reservedate} ), >+ reservedate => $data->{l_reservedate}, > priority => $data->{priority}, > name => $data->{l_patron}, > title => $data->{title}, >@@ -196,7 +196,7 @@ if ( $run_report ) { > } > > $template->param( >- todaysdate => format_date($todaysdate), >+ todaysdate => $todaysdate, > from => $startdate, > to => $enddate, > run_report => $run_report, >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 6a49e1c..c596ab3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -1,3 +1,4 @@ >+[% USE KohaDates %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Holds to pull</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -5,16 +6,15 @@ > <!-- Plugin datatables --> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > [% INCLUDE 'datatables.inc' %] >-<script type="text/JavaScript" language="JavaScript"> >+<script type="text/JavaScript"> > //<![CDATA[ > $(document).ready(function() { >- [% IF (dateformat == 'metric') %] >- dt_add_type_uk_date(); >- [% END %] > var holdst = $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "sType": "string", "aTargets": [ 4, 8, 9 ] } //Target columns that use <br> separators and pull-down menus. FIXME: Use class names instead of indexes. >- ] >+ "aoColumnDefs": [ >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] }, >+ { "sType": "string", "aTargets": [ "string-sort" ] } //Target columns that use <br> separators and pull-down menus. >+ ] > })); > holdst.fnAddFilters("filter"); > [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %] >@@ -83,7 +83,7 @@ $(document).ready(function() { > > <h2>Holds to pull[% IF ( run_report ) %] placed between [% from %] and [% to %][% END %]</h2> > [% IF ( run_report ) %] >-<h3>Reported on [% todaysdate %]</h3> >+<h3>Reported on [% todaysdate | $KohaDates %]</h3> > <p>The following holds have not been filled. Please retrieve them and check them in.</p> > <div class="searchresults"> > [% IF ( reserveloop ) %] >@@ -93,14 +93,14 @@ $(document).ready(function() { > <th>Pull this many items</th> > <th>Items available</th> > <th>Patrons with holds</th> >- <th>Title</th> >- <th>Libraries</th> >+ <th class="anti-the">Title</th> >+ <th class="string-sort">Libraries</th> > <th>Available call numbers</th> > <th>Available copy numbers</th> > <th>Available enumeration</th> >- <th>Available itypes</th> >- <th>Available locations</th> >- <th>Earliest hold date</th> >+ <th class="string-sort">Available itypes</th> >+ <th class="string-sort">Available locations</th> >+ <th class="title-string">Earliest hold date</th> > </tr> > </thead> > <tbody> >@@ -112,10 +112,9 @@ $(document).ready(function() { > <td>[% reserveloo.rcount %]</td> > <td> > <p> >- [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %] >- [% reserveloo.title |html %] >- </a> [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% END %] >- </p> >+ [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %] >+ [% reserveloo.title |html %]</a></p> >+ [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% END %] > </td> > [% ELSE %] > <td>"</td> >@@ -129,9 +128,8 @@ $(document).ready(function() { > <td><p>[% reserveloo.enumchron %]</p></td> > <td>[% reserveloo.itype %]</td> > <td>[% reserveloo.location %]</td> >- <td width="15%"> >- <p>[% reserveloo.reservedate %]</p> >- <p>in [% reserveloo.branch %]</p> >+ <td> >+ <span title="[% reserveloo.reservedate %]">[% reserveloo.reservedate | $KohaDates %] in [% reserveloo.branch %]</span> > [% IF ( reserveloo.statusw ) %]<p>Waiting</p>[% END %][% IF ( reserveloo.statusf ) %]<p>Fullfilled</p>[% END %] > </td> > </tr> >-- >1.8.3.2
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 12088
:
27138
|
27489
|
27504
| 27740