Lines 78-86
sub all {
Link Here
|
78 |
|
78 |
|
79 |
sub pickup_locations { |
79 |
sub pickup_locations { |
80 |
my ($self, $params) = @_; |
80 |
my ($self, $params) = @_; |
81 |
$params->{search_params} ||= {}; |
81 |
|
82 |
$params->{search_params}->{pickup_location} = 1; |
82 |
my $selected = $params->{selected}; |
83 |
return $self->all($params); |
83 |
my $libraries = Koha::Libraries->pickup_locations($params); |
|
|
84 |
for my $l ( @$libraries ) { |
85 |
if ( defined $selected and $l->{branchcode} eq $selected |
86 |
or not defined $selected and C4::Context->userenv and $l->{branchcode} eq C4::Context->userenv->{branch} |
87 |
) { |
88 |
$l->{selected} = 1; |
89 |
} |
90 |
} |
91 |
|
92 |
return $libraries; |
84 |
} |
93 |
} |
85 |
|
94 |
|
86 |
1; |
95 |
1; |
87 |
- |
|
|