Bugzilla – Attachment 133497 Details for
Bug 30556
OPAC shows "Place hold" button on available items even if on shelf holds aren't allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Bug 30556: Place hold button doesn't show when not allowed
Bug-30556-Place-hold-button-doesnt-show-when-not-a.patch (text/plain), 2.28 KB, created by
The Minh Luong
on 2022-04-20 19:21:22 UTC
(
hide
)
Description:
Bug 30556: Place hold button doesn't show when not allowed
Filename:
MIME Type:
Creator:
The Minh Luong
Created:
2022-04-20 19:21:22 UTC
Size:
2.28 KB
patch
obsolete
>From 819687b259971429012119374b6ca0f2dda2d0fb Mon Sep 17 00:00:00 2001 >From: The Minh Luong <theminh@inlibro.com> >Date: Wed, 20 Apr 2022 15:18:11 -0400 >Subject: [PATCH] Bug 30556: Place hold button doesn't show when not allowed > >When On shelf holds holds allowed is on "If all unavailable", the Place hold button is not showed. > >To test: > >1. Create a circulation rule with on shelf holds set to "If all unavailable" >2. Create or modify a record to match the items itype to the circulation rule >3. Use a patron matching the circ rule category to log into the opac >4. Look for the record >5. Notice that the Place hold button is there, even thought it's not allowed >6. Apply the patch. >7. The button is not there. >--- > .../opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc | 2 +- > opac/opac-detail.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc >index a76406b254..d763419254 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc >@@ -3,7 +3,7 @@ > <ul id="action"> > [% UNLESS ( norequests ) %] > [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] >- [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %] >+ [% IF Koha.Preference( 'CanBeReserved' ) == 1 %] > [% IF ( ReservableItems ) %] > <li><a class="reserve btn btn-link btn-lg" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a></li> > [% END %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 00c52eb5aa..17f6d06426 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -775,7 +775,7 @@ if ( not $viewallitems and @items > $max_items_to_display ) { > } > } > } >- >+$template->param( 'CanBeReserved' => ($borrowernumber ? C4::Reserves::CanBookBeReserved( $borrowernumber, $biblionumber ) eq 'OK' : 1) ); > if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { > $template->param( ReservableItems => 1 ); > } >-- >2.25.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 Raw
Actions:
View
Attachments on
bug 30556
:
133497
|
133608
|
134172
|
134420
|
134421
|
134436
|
134437
|
134438
|
134617
|
134619
|
134620
|
134621
|
135395
|
137065
|
139289
|
139290
|
139291
|
139292
|
144429
|
147378
|
147379
|
147380
|
147381
|
147382
|
147441
|
147442
|
150218
|
150219
|
150220
|
150221
|
150222
|
156188
|
156189
|
156190
|
156191
|
156192
|
156429
|
157087
|
157088
|
157089
|
157090
|
157091