From 3a945c5eb969b78e83612c5ed6437eb4b1c2f085 Mon Sep 17 00:00:00 2001 From: hdl Date: Mon, 19 Dec 2005 09:23:39 +0000 Subject: [PATCH] Adding selection combos for branches, borcat, itemtypes, days and months. --- .../default/en/reports/cat_issues_top.tmpl | 61 +++++++++++++++++-- reports/cat_issues_top.pl | 42 ++++++++++++- 2 files changed, 97 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/default/en/reports/cat_issues_top.tmpl b/koha-tmpl/intranet-tmpl/default/en/reports/cat_issues_top.tmpl index 6d514a8ad9..1968729c48 100644 --- a/koha-tmpl/intranet-tmpl/default/en/reports/cat_issues_top.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/reports/cat_issues_top.tmpl @@ -220,31 +220,82 @@ function Dopop(link) {     Branch - + + +     Document Type - + + +     Borrower Category - + + +     Day - + + +     Month - + + +   diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl index c0e1040293..4152282589 100755 --- a/reports/cat_issues_top.pl +++ b/reports/cat_issues_top.pl @@ -133,10 +133,50 @@ if ($do_it) { -values => \@dels, -size => 1, -multiple => 0 ); + #branch + my $branches = getallbranches; + my @branchloop; + foreach my $thisbranch (keys %$branches) { +# my $selected = 1 if $thisbranch eq $branch; + my %row =(value => $thisbranch, +# selected => $selected, + branchname => $branches->{$thisbranch}->{'branchname'}, + ); + push @branchloop, \%row; + } + + #doctype + my $itemtypes = getitemtypes; + my @itemtypeloop; + foreach my $thisitemtype (keys %$itemtypes) { +# my $selected = 1 if $thisbranch eq $branch; + my %row =(value => $thisitemtype, +# selected => $selected, + description => $itemtypes->{$thisitemtype}->{'description'}, + ); + push @itemtypeloop, \%row; + } + + #borcat + my ($codes,$labels) = borrowercategories; + my @borcatloop; + foreach my $thisborcat (sort keys %$labels) { + # my $selected = 1 if $thisbranch eq $branch; + my %row =(value => $thisborcat, + # selected => $selected, + description => $labels->{$thisborcat}, + ); + push @borcatloop, \%row; + } + #Day + #Month $template->param( CGIextChoice => $CGIextChoice, - CGIsepChoice => $CGIsepChoice + CGIsepChoice => $CGIsepChoice, + branchloop =>\@branchloop, + itemtypeloop =>\@itemtypeloop, + borcatloop =>\@borcatloop, ); output_html_with_http_headers $input, $cookie, $template->output; } -- 2.39.5