Lines 94-117
$template->param(do_it => 1,
Link Here
|
94 |
results_loop => \@results, |
94 |
results_loop => \@results, |
95 |
); |
95 |
); |
96 |
|
96 |
|
97 |
# load the branches ## again?? |
97 |
$template->param( branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'})); |
98 |
$branches = GetBranches(); |
|
|
99 |
my @branch_loop; |
100 |
for my $branch_hash (sort keys %$branches ) { |
101 |
my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst')); |
102 |
push @branch_loop, |
103 |
{ |
104 |
value => "$branch_hash", |
105 |
branchname => $branches->{$branch_hash}->{'branchname'}, |
106 |
selected => $selected |
107 |
}; |
108 |
} |
109 |
$template->param( branchloop => \@branch_loop, "mylibraryfirst"=>C4::Context->preference("SearchMyLibraryFirst")); |
110 |
|
98 |
|
111 |
#doctype |
99 |
#doctype |
112 |
$itemtypes = GetItemTypes; |
100 |
$itemtypes = GetItemTypes; |
113 |
my @itemtypeloop; |
101 |
my @itemtypeloop; |
114 |
foreach my $thisitemtype (keys %$itemtypes) { |
102 |
foreach my $thisitemtype (sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'}} keys %$itemtypes) { |
115 |
my %row =(value => $thisitemtype, |
103 |
my %row =(value => $thisitemtype, |
116 |
description => $itemtypes->{$thisitemtype}->{'description'}, |
104 |
description => $itemtypes->{$thisitemtype}->{'description'}, |
117 |
); |
105 |
); |
118 |
- |
|
|