Bugzilla – Attachment 60144 Details for
Bug 7614
Use branch transfer limits for determining available opac holds pickup locations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7614: Consider transfer limits in Koha::Template::Plugin::Branches
Bug-7614-Consider-transfer-limits-in-KohaTemplateP.patch (text/plain), 1.48 KB, created by
Lari Taskula
on 2017-02-13 11:21:49 UTC
(
hide
)
Description:
Bug 7614: Consider transfer limits in Koha::Template::Plugin::Branches
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2017-02-13 11:21:49 UTC
Size:
1.48 KB
patch
obsolete
>From d8ddf2ee6d7448f52931d44d57d1ab1966925e2c Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Fri, 10 Feb 2017 17:05:35 +0200 >Subject: [PATCH] Bug 7614: Consider transfer limits in > Koha::Template::Plugin::Branches > >Consider transfer limits in Koha::Template::Plugin::Branches->pickup_locations. > >This patch modified the mentioned method to consider branch transfer limits and >does not include any library in the returned list of libraries in case a branch >transfer limit applies for a given book or item. > >To be tested in following patches. >--- > Koha/Template/Plugin/Branches.pm | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > >diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm >index 75ed8f7..cca69f0 100644 >--- a/Koha/Template/Plugin/Branches.pm >+++ b/Koha/Template/Plugin/Branches.pm >@@ -78,9 +78,18 @@ sub all { > > sub pickup_locations { > my ($self, $params) = @_; >- $params->{search_params} ||= {}; >- $params->{search_params}->{pickup_location} = 1; >- return $self->all($params); >+ >+ my $selected = $params->{selected}; >+ my $libraries = Koha::Libraries->pickup_locations($params); >+ for my $l ( @$libraries ) { >+ if ( defined $selected and $l->{branchcode} eq $selected >+ or not defined $selected and C4::Context->userenv and $l->{branchcode} eq C4::Context->userenv->{branch} >+ ) { >+ $l->{selected} = 1; >+ } >+ } >+ >+ return $libraries; > } > > 1; >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7614
:
60141
|
60142
|
60143
|
60144
|
60145
|
60785
|
60786
|
60787
|
60938
|
60946
|
70047
|
77895
|
77896
|
77897
|
77898
|
77899
|
77900
|
78020
|
84295
|
84296
|
84297
|
84298
|
84299
|
84300
|
84301
|
84302
|
84303
|
84304
|
84305
|
84306
|
84307
|
84308
|
84309
|
84310
|
84311