From b14e26faf461e03d790b8b1c7dd5feb973c9d53c Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Tue, 3 Oct 2017 14:50:36 +0000 Subject: [PATCH] Bug 4319 - [OPAC] allow to holds waiting items Test plan: - Checkout an item - Place hold on this item, - Return the item - Make sure the hold is waiting (found W) and AllowOnShelfHolds is not to 'Allow' - Check that the button "Place hold" appears in opac detail page of the biblio --- .../opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc | 2 +- opac/opac-detail.pl | 10 ++++++---- 2 files changed, 7 insertions(+), 5 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 5e96b0f..9069ee4 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 @@ [% UNLESS ( norequests ) %] [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %] - [% IF ( AllowOnShelfHolds OR ItemsIssued ) %] + [% IF ( AllowOnShelfHolds OR ItemsIssued OR ItemsWaiting ) %]
  • Place hold
  • [% END %] [% END %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 8252e50..858e952 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -458,10 +458,12 @@ if ($session->param('busc')) { } } - -$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); -$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); -$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") ); +$template->param( + ItemsIssued => CountItemsIssued( $biblionumber ), + ItemsWaiting => Koha::Holds->search({biblionumber => $biblionumber, found => 'W'})->count(), + OPACShowCheckoutName => C4::Context->preference("OPACShowCheckoutName"), + OPACShowBarcode => C4::Context->preference("OPACShowBarcode") +); # adding items linked via host biblios -- 2.7.4