Bugzilla – Attachment 20331 Details for
Bug 10081
IndependentBranches error message missing the library name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10081: add library name to IndependentBranches error message
Bug-10081-add-library-name-to-IndependentBranches-.patch (text/plain), 2.98 KB, created by
Galen Charlton
on 2013-08-14 14:15:58 UTC
(
hide
)
Description:
Bug 10081: add library name to IndependentBranches error message
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2013-08-14 14:15:58 UTC
Size:
2.98 KB
patch
obsolete
>From b8935734a4b6cbece678ee754fbbf8973b9f1ae4 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 13 Aug 2013 12:27:28 -0400 >Subject: [PATCH] Bug 10081: add library name to IndependentBranches error > message > >With IndependentBranches turned on, if you try to check out an item >which belongs to another library you will get an error message which is >missing the library name. This patch corrects the problem by passing the >necessary variable to the template and outputting the library name using >the KohaBranchName TT plugin. > >To test, turn on IndependentBranches and try to check out an item >belonging to another library (note that you must test with a staff user >who is not a superlibrarian). The error message you see should include >the name of the library to which the item belongs: > >"This item belongs to Nelsonville and cannot be checked out from this >location." > >Checkouts of items belonging to the library should be unaffected. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >--- > C4/Circulation.pm | 6 ++++-- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 3 ++- > 2 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index ca66931..95414eb 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -896,8 +896,10 @@ sub CanBookBeIssued { > if ( C4::Context->preference("IndependentBranches") ) { > my $userenv = C4::Context->userenv; > if ( ($userenv) && ( $userenv->{flags} % 2 != 1 ) ) { >- $issuingimpossible{ITEMNOTSAMEBRANCH} = 1 >- if ( $item->{C4::Context->preference("HomeOrHoldingBranch")} ne $userenv->{branch} ); >+ if ( $item->{C4::Context->preference("HomeOrHoldingBranch")} ne $userenv->{branch} ){ >+ $issuingimpossible{ITEMNOTSAMEBRANCH} = 1; >+ $issuingimpossible{'itemhomebranch'} = $item->{C4::Context->preference("HomeOrHoldingBranch")}; >+ } > $needsconfirmation{BORRNOTSAMEBRANCH} = GetBranchName( $borrower->{'branchcode'} ) > if ( $borrower->{'branchcode'} ne $userenv->{branch} ); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index f93ae74..f19a8af 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1,3 +1,4 @@ >+[% USE KohaBranchName %] > [% USE KohaDates %] > [% IF ( export_remove_fields OR export_with_csv_profile ) %] > [% SET exports_enabled = 1 %] >@@ -546,7 +547,7 @@ function validate1(date) { > [% END %] > > [% IF ( ITEMNOTSAMEBRANCH ) %] >- <li>This item belongs to [% itemhomebranch %] and cannot be issued from this location.</li> >+ <li>This item belongs to [% itemhomebranch | $KohaBranchName %] and cannot be checked out from this location.</li> > [% END %] > > [% IF ( USERBLOCKEDREMAINING ) %] >-- >1.7.10.4
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 10081
:
17557
|
20321
|
20331
|
20504