From cbf4f490bb3db9983cdbab228f8d2ace1a1c965c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 16 Jul 2014 11:23:00 -0400 Subject: [PATCH] Bug 12587 - Improve output of filter information on patrons with the most checkouts report This patch makes some changes to the way filter information is displayed after running the patrons with the most checkouts report. Before this patch several untranslatable English strings would be displayed, and library and item type codes would be shown instead of descriptions. To test, go to Reports -> Patrons checking out the most. Enter values for all the filter options: - Checkout date from - Checkout date to - Checkin date from - Checkin date to - Library - Item type - Patron category When you submit the form and view the results you should see your date submissions formatted according to your selected dateformat system preference. The library name and item type names should be shown instead of codes. Signed-off-by: Aleisha --- .../prog/en/modules/reports/bor_issues_top.tt | 42 +++++++++++++++++-- reports/bor_issues_top.pl | 2 +- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt index 1526283..c3a1f23 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt @@ -1,3 +1,6 @@ +[% USE Branches %] +[% USE KohaDates %] +[% USE ItemTypes %] [% INCLUDE 'doc-head-open.inc' %] Koha › Reports › Patrons with the most checkouts [% INCLUDE 'doc-head-close.inc' %] @@ -57,12 +60,41 @@ function Dopop(link) { [% FOREACH mainloo IN mainloop %] -

Top [% mainloo.limit %] List patrons for checkouts

+

Patrons with the most checkouts

[% IF ( mainloo.loopfilter ) %] -

Filtered on:

- [% FOREACH loopfilte IN mainloo.loopfilter %] -

[% IF ( loopfilte.err ) %] [% END %] [% loopfilte.crit %] =[% loopfilte.filter %][% IF ( loopfilte.err ) %] [% END %]

- [% END %] + [% IF mainloo.loopfilter.size %] +

Filtered on:

+ + [% END %] [% END %] diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl index bdd58ba..f8ee8e8 100755 --- a/reports/bor_issues_top.pl +++ b/reports/bor_issues_top.pl @@ -181,7 +181,7 @@ sub calculate { $cell{err} = 1 if (@$filters[$i]<@$filters[$i-1]) ; } # format the dates filters, otherwise just fill as is - $cell{filter} .= ($i>=4) ? @$filters[$i] : format_date(@$filters[$i]); + $cell{filter} .= @$filters[$i]; defined ($cellmap[$i]) and $cell{crit} .= $cellmap[$i]; push @loopfilter, \%cell; -- 1.7.2.5