From a89c3085cfc9d8124a49c1cf1137bf2ced367c54 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 14 May 2009 18:46:56 +1200 Subject: [PATCH] Bug 1542, fixing filter by area in reports dictionary Signed-off-by: Galen Charlton --- .../prog/en/modules/reports/dictionary.tmpl | 11 +++++++---- reports/dictionary.pl | 6 ++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl index 9e217327f3..11d8dcea26 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl @@ -21,16 +21,17 @@

Use the dictionary to define custom criteria for reporting.

- +

Current Terms

+ Filter by area - +

@@ -41,6 +42,7 @@ Filter by area + @@ -54,7 +56,8 @@ Filter by area -
Definition  
  +  + diff --git a/reports/dictionary.pl b/reports/dictionary.pl index 09104c3ed5..2c87a496a3 100755 --- a/reports/dictionary.pl +++ b/reports/dictionary.pl @@ -18,6 +18,7 @@ # Suite 330, Boston, MA 02111-1307 USA use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use strict; +use warnings; use C4::Auth; use CGI; use C4::Output; @@ -38,7 +39,8 @@ Script to control the guided report creation my $input = new CGI; my $referer = $input->referer(); -my $phase = $input->param('phase'); +my $phase = $input->param('phase') || 'View Dictionary'; +my $area = $input->param('areas') || ''; my $no_html = 0; # this will be set if we dont want to print out an html::template my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -54,7 +56,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( if ($phase eq 'View Dictionary'){ # view the dictionary we use to set up abstract variables such as all borrowers over fifty who live in a certain town my $areas = get_report_areas(); - my $definitions = get_from_dictionary(); + my $definitions = get_from_dictionary($area); $template->param( 'areas' => $areas , 'start_dictionary' => 1, 'definitions' => $definitions, -- 2.39.5