From fc98d228c2a4ddc6e7df5dbb4041877ff04bf2f3 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Sun, 1 Jun 2008 09:56:49 -0500 Subject: [PATCH] Sort dropdowns for libraries by name instead of branchcode in several staff-side interfaces. Signed-off-by: Joshua Ferraro --- admin/issuingrules.pl | 2 +- admin/smart-rules.pl | 2 +- catalogue/search.pl | 2 +- circ/selectbranchprinter.pl | 2 +- .../prog/en/modules/tools/holidays.tmpl | 12 +++- members/memberentry.pl | 2 +- serials/subscription-add.pl | 2 +- tools/holidays.pl | 58 ++++++++----------- 8 files changed, 40 insertions(+), 42 deletions(-) diff --git a/admin/issuingrules.pl b/admin/issuingrules.pl index 54d6b79b69..26cec089c3 100755 --- a/admin/issuingrules.pl +++ b/admin/issuingrules.pl @@ -76,7 +76,7 @@ if ($op eq 'save') { } my $branches = GetBranches; my @branchloop; -foreach my $thisbranch (keys %$branches) { +for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { my $selected = 1 if $thisbranch eq $branch; my %row =(value => $thisbranch, selected => $selected, diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index fed2edd8f6..01dbb60d55 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -78,7 +78,7 @@ elsif ($op eq 'add') { } my $branches = GetBranches(); my @branchloop; -foreach my $thisbranch (keys %$branches) { +for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { my $selected = 1 if $thisbranch eq $branch; my %row =(value => $thisbranch, selected => $selected, diff --git a/catalogue/search.pl b/catalogue/search.pl index b6c09134cc..10ec0e39a6 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -208,7 +208,7 @@ if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { my $branches = GetBranches(); my @branch_loop; -for my $branch_hash (sort keys %$branches) { +for my $branch_hash (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { push @branch_loop, {value => "$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, }; } diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl index 17a89efb32..f7173a1148 100755 --- a/circ/selectbranchprinter.pl +++ b/circ/selectbranchprinter.pl @@ -67,7 +67,7 @@ my $oldprinter = $printer; my $branchcount = 0; my $printercount = 0; my @branchloop; -foreach my $br ( sort keys %$branches ) { +for my $br (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { next unless $br =~ /\S/; # next unless $br is not blank. $branchcount++; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl index c0c9d2449f..b1d0b9c097 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl @@ -153,7 +153,17 @@ h1 select { width: 20em; } -

Define the holidays for branch

+

Define the holidays for :

+ +