Sorting Branches by Branchcode on display.
authorPaul POULAIN <paul@koha-fr.org>
Tue, 9 Oct 2007 21:46:34 +0000 (16:46 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 11 Oct 2007 17:32:04 +0000 (12:32 -0500)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
opac/opac-main.pl
opac/opac-search.pl
opac/opac-topissues.pl
opac/opac-user.pl
reports/bor_issues_top.pl
reports/borrowers_stats.pl

index 8ec0eb0..0a548a9 100755 (executable)
@@ -57,7 +57,7 @@ if ( C4::Context->preference("SearchMyLibraryFirst") ) {
         my $branches = GetBranches();
         my @branchloop;
 
-        foreach my $thisbranch ( keys %$branches ) {
+        foreach my $thisbranch (sort keys %$branches ) {
             my $selected = 1
               if ( C4::Context->userenv
                 && ( $thisbranch eq C4::Context->userenv->{branch} ) );
index 320336f..90ed8c3 100755 (executable)
@@ -220,7 +220,7 @@ query parser.
 # load the branches
 my $branches = GetBranches();
 my @branch_loop;
-for my $branch_hash ( keys %$branches ) {
+for my $branch_hash (sort keys %$branches ) {
     my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst'));
     push @branch_loop,
       {
index 1e8b195..53ee77b 100755 (executable)
@@ -96,7 +96,7 @@ $template->param(do_it => 1,
 # load the branches
 my $branches = GetBranches();
 my @branch_loop;
-for my $branch_hash ( keys %$branches ) {
+for my $branch_hash (sort keys %$branches ) {
     my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst'));
     push @branch_loop,
       {
index 3639525..a6f385f 100755 (executable)
@@ -141,7 +141,7 @@ $template->param( overdues_count => $overdues_count );
 # load the branches
 my $branches = GetBranches();
 my @branch_loop;
-for my $branch_hash ( keys %$branches ) {
+for my $branch_hash (sort keys %$branches ) {
     my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst'));
     push @branch_loop,
       {
index 0f7dc0e..01df738 100755 (executable)
@@ -122,28 +122,25 @@ if ($do_it) {
 #      foreach my $mime (@mime){
 #              warn "".$mime;
 #      }
-    
-    my $CGIextChoice=CGI::scrolling_list(
-                -name     => 'MIME',
-                -id       => 'MIME',
-                -values   => \@mime,
-                -size     => 1,
-                -multiple => 0 );
-    
-    my @dels = ( C4::Context->preference("delimiter") );
-    my $CGIsepChoice=CGI::scrolling_list(
-                -name     => 'sep',
-                -id       => 'sep',
-                -values   => \@dels,
-                -size     => 1,
-                -multiple => 0 );
-    #branch
-    my $branches = GetBranches;
-    my @branchloop;
-    foreach my $thisbranch (keys %$branches) {
-#                      my $selected = 1 if $thisbranch eq $branch;
+        my $CGIextChoice=CGI::scrolling_list(
+                                -name     => 'MIME',
+                                -id       => 'MIME',
+                                -values   => \@mime,
+                                -size     => 1,
+                                -multiple => 0 );
+        
+        my @dels = ( C4::Context->preference("delimiter") );
+        my $CGIsepChoice=CGI::scrolling_list(
+                                -name     => 'sep',
+                                -id       => 'sep',
+                                -values   => \@dels,
+                                -size     => 1,
+                                -multiple => 0 );
+        #branch
+        my $branches = GetBranches;
+       my @branchloop;
+       foreach my $thisbranch (sort keys %$branches) {
             my %row =(value => $thisbranch,
-#                                                                      selected => $selected,
                                     branchname => $branches->{$thisbranch}->{'branchname'},
                             );
             push @branchloop, \%row;
index eef4676..84654f8 100755 (executable)
@@ -133,7 +133,7 @@ my @select_branch;
 #my %select_branches;
 push @select_branch,"";
 #$select_branches{""}="";
-foreach my $thisbranch (keys %$branches) {
+foreach my $thisbranch (sort keys %$branches) {
        push @select_branch,$thisbranch;
    # my $selected = 1 if $thisbranch eq $branch;
     my %row =(value => $thisbranch,