From 67401f37b4c3701d213b6fc9532a865676daa185 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 29 Oct 2007 13:19:51 -0500 Subject: [PATCH] More work on the dictionary, nearly have all the interface done Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- .../modules/reports/guided_reports_start.tmpl | 1 + reports/guided_reports.pl | 91 ++++++++++++++++++- 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl index 82a10c3024..2db2d778e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl @@ -24,6 +24,7 @@ + diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 0c01539199..fe5bc03049 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -22,7 +22,7 @@ use C4::Auth; use CGI; use C4::Output; use C4::Reports; - +use CGI::Carp qw(fatalsToBrowser); =head1 NAME Script to control the guided report creation @@ -341,6 +341,95 @@ elsif ($phase eq 'Save Compound'){ ); } +elsif ($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 + ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "reports/dictionary.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { editcatalogue => 1 }, + debug => 1, + } + ); + my $areas = C4::Reports::get_report_areas(); + $template->param( 'areas' => $areas , + 'start_dictionary' => 1, + ); +} +elsif ($phase eq 'Add New Definition'){ + # display form allowing them to add a new definition + ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "reports/dictionary.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { editcatalogue => 1 }, + debug => 1, + } + ); + $template->param( 'new_dictionary' => 1, + ); +} + +elsif ($phase eq 'New Term step 2'){ + # Choosing the area + ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "reports/dictionary.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { editcatalogue => 1 }, + debug => 1, + } + ); + my $areas = C4::Reports::get_report_areas(); + $template->param( 'step_2' => 1, + 'areas' => $areas, + ); + my $definition_name=$input->param('definition_name'); + my $definition_description=$input->param('definition_description'); +} + +elsif ($phase eq 'New Term step 3'){ + # Choosing the columns + ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "reports/dictionary.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { editcatalogue => 1 }, + debug => 1, + } + ); + my $area = $input->param('areas'); + my $columns = get_columns($area); + $template->param( 'step_3' => 1, + 'area' => $area, + 'columns' => $columns, + ); +} + +elsif ($phase eq 'New Term step 4'){ + # Choosing the columns + ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "reports/dictionary.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { editcatalogue => 1 }, + debug => 1, + } + ); + $template->param( 'step_4' => 1, + ); +} + if (!$no_html){ output_html_with_http_headers $input, $cookie, $template->output; -- 2.39.5