From fdf490c47271af0429e1d47c19f7d598c7580e72 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 15 Apr 2014 12:15:41 -0400 Subject: [PATCH] Bug 12088 - Improve date handling and sorting in holds to pull report Content-Type: text/plain; charset="utf-8" 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. --- circ/pendingreserves.pl | 4 +-- .../prog/en/modules/circ/pendingreserves.tt | 28 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 0110deb..c6c9b82 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -166,7 +166,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}, @@ -198,7 +198,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 78df0e4..9166cac 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' %] Koha › Circulation › Holds to pull [% INCLUDE 'doc-head-close.inc' %] @@ -5,13 +6,14 @@ [% INCLUDE 'datatables.inc' %] -