- $row{'category_list'} = \@categories;
- $row{'no-categories-p'} = $no_categories_p;
- $row{'branch_name'} = $branch->{'branchname'};
- $row{'branch_code'} = $branch->{'branchcode'};
- $row{'value'} = $branch->{'branchcode'};
-
- push @loop_data, \%row;
- }
- my @branchcategories = ();
- for my $ctype ( GetCategoryTypes() ) {
- my $catinfo = GetBranchCategories($ctype);
- my @categories;
- foreach my $cat (@$catinfo) {
- push @categories, {
- categoryname => $cat->{'categoryname'},
- categorycode => $cat->{'categorycode'},
- codedescription => $cat->{'codedescription'},
- categorytype => $cat->{'categorytype'},
- };
- }
- push @branchcategories, { categorytype => $ctype , $ctype => 1 , catloop => ( @categories ? \@categories : undef) };
- }
- $innertemplate->param(
- branches => \@loop_data,
- branchcategories => \@branchcategories
- );
-
-}
-
-sub _branch_to_template {
- my ($data, $template) = @_;
- $template->param(
- branchcode => $data->{'branchcode'},
- branch_name => $data->{'branchname'},
- branchaddress1 => $data->{'branchaddress1'},
- branchaddress2 => $data->{'branchaddress2'},
- branchaddress3 => $data->{'branchaddress3'},
- branchzip => $data->{'branchzip'},
- branchcity => $data->{'branchcity'},
- branchstate => $data->{'branchstate'},
- branchcountry => $data->{'branchcountry'},
- branchphone => $data->{'branchphone'},
- branchfax => $data->{'branchfax'},
- branchemail => $data->{'branchemail'},
- branchurl => $data->{'branchurl'},
- opac_info => $data->{'opac_info'},
- branchip => $data->{'branchip'},
- branchnotes => $data->{'branchnotes'},
- );
-}