[Koha-cvs] CVS: koha/admin branches.pl,1.8,1.9

David Strainchamps lavide at users.sourceforge.net
Sat Nov 9 18:37:04 CET 2002


Update of /cvsroot/koha/koha/admin
In directory usw-pr-cvs1:/tmp/cvs-serv28884

Modified Files:
	branches.pl 
Log Message:
fix problem that only one branches was on the screenbr


Index: branches.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/branches.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** branches.pl	18 Oct 2002 12:45:41 -0000	1.8
--- branches.pl	9 Nov 2002 17:37:01 -0000	1.9
***************
*** 168,171 ****
--- 168,172 ----
      }
      my $color;
+     my @loop_data =();
      foreach my $branch (@$branchinfo) {
  	($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
***************
*** 184,194 ****
  	}
  	$categories = '(no categories set)' unless ($categories);
! $template->param(color => $color);
! $template->param(branch_name => $branch->{'branchname'});
! $template->param(adress => $address);
! $template->param(categories => $categories);
! $template->param(branch_code => $branch->{'branchcode'});
! $template->param(value => $branch->{'branchcode'});
      }
  
  }
--- 185,216 ----
  	}
  	$categories = '(no categories set)' unless ($categories);
! 	my @colors = ();
! 	my @branch_name = ();
! 	my @branch_code = ();
! 	my @address = ();
! 	my @categories = ();
! 	my @value = ();
! 	my @action =();
! 	push(@colors,$color);
! 	push(@branch_name,$branch->{'branchname'});
! 	push(@branch_code,$branch->{'branchcode'});
! 	push(@address,$address);
! 	push(@categories,$categories);
! 	push(@value,$branch->{'branchcode'});
! 	push(@action,"/cgi-bin/koha/admin/branches.pl");
! 	while (@colors and @branch_name and @branch_code and @address and @categories and @value and @action) {
! 	my %row_data;
! 	$row_data{color} = shift @colors;
! 	$row_data{branch_name} = shift @branch_name;
! 	$row_data{branch_code} = shift @branch_code;
! 	$row_data{address} = shift @address;
! 	$row_data{categories} = shift @categories;
! 	$row_data{value} = shift @value;
! 	$row_data{action} = shift @action;
! 	push(@loop_data, \%row_data);
      }
+     
+     }
+     $template->param(branches => \@loop_data);
  
  }





More information about the Koha-cvs mailing list