Bugzilla – Attachment 84304 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.75 KB, created by
Kyle M Hall (khall)
on 2019-01-22 19:07:45 UTC
(
hide
)
Description:
Bug 7614: Consider transfer limits in Koha::Template::Plugin::Branches
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-01-22 19:07:45 UTC
Size:
1.75 KB
patch
obsolete
>From b2f4ccbf5d1848d345407dad7b29b29f0d08938f Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutiosn.com> >Date: Wed, 15 Aug 2018 14:27:45 -0400 >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. > >Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Template/Plugin/Branches.pm | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > >diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm >index 1f50ef3d4b..58b13d2fc5 100644 >--- a/Koha/Template/Plugin/Branches.pm >+++ b/Koha/Template/Plugin/Branches.pm >@@ -85,4 +85,25 @@ sub InIndependentBranchesMode { > return ( not C4::Context->preference("IndependentBranches") or C4::Context::IsSuperLibrarian ); > } > >+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; >-- >2.17.2 (Apple Git-113)
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