From d027fb385516c21fcd369549a0aa105475cf6a4b Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Tue, 21 Jul 2009 21:11:29 -0400 Subject: [PATCH] Bug 2553: Alphabetization of branches in the Serials Stats form. Content-Type: text/plain; charset="utf-8" Improvement on the previous patch through the use of GetBranchesLoop. Added code so that the logged in location will be the location that is selected by default. Fixed a couple of minor xhtml errors. --- .../prog/en/modules/reports/serials_stats.tmpl | 6 +++--- reports/serials_stats.pl | 14 +------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tmpl index fca21c8..7f694ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tmpl @@ -73,20 +73,20 @@
  • -
  • - +
  • diff --git a/reports/serials_stats.pl b/reports/serials_stats.pl index ff98f34..299c661 100755 --- a/reports/serials_stats.pl +++ b/reports/serials_stats.pl @@ -142,18 +142,6 @@ if($do_it){ push(@booksellers,$row) } - ## We generate branchlist - my $branches=GetBranches(); - my @branchloop; - foreach (sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches) { - my $thisbranch = ''; # FIXME: populate $thisbranch to preselect one - my %row = (branchcode => $_, - selected => ($thisbranch eq $_ ? 1 : 0), - branchname => $branches->{$_}->{'branchname'}, - ); - push @branchloop, \%row; - } - my @mime = ( C4::Context->preference("MIME") ); # warn 'MIME(s): ' . join ' ', @mime; my $CGIextChoice=CGI::scrolling_list( @@ -167,7 +155,7 @@ if($do_it){ CGIextChoice => $CGIextChoice, CGIsepChoice => $CGIsepChoice, booksellers => \@booksellers, - branches => \@branchloop); + branches => GetBranchesLoop(C4::Context->userenv->{'branch'})); } output_html_with_http_headers $input, $cookie, $template->output; -- 1.5.6.5