Bug 15324: Do not display 'Waiting holds:" if no holds are waiting

Test plan:
- Make sure that you have a patron A with waiting holds and a patron B
  without waiting holds
- Go to the checkout page for patron A (Home > Circulation > Checkouts
> ...)
- At the right, there is a title "Waiting holds:" and a list of
  holds waiting
- Go to the checkout page for patron B
=> Without this patch "Waiting holds:" is displayed

Sign-off on Jonathan's patch
Signed-off-by: Marc Véron <veron@veron.ch>

http://bugs.koha-community.org/show_bug.cgi?id=14324

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2015-12-08 15:10:46 +00:00 committed by Brendan A Gallagher
parent 83b7d6e0d3
commit cd46c5dc75
2 changed files with 3 additions and 2 deletions

View File

@ -457,9 +457,10 @@ if ($borrowernumber) {
# show all reserves of this borrower, and the position of the reservation ....
if ($borrowernumber) {
my $holds = Koha::Holds->search( { borrowernumber => $borrowernumber } );
my $waiting_holds = $holds->waiting;
$template->param(
holds_count => $holds->count(),
WaitingHolds => scalar $holds->waiting(),
WaitingHolds => $waiting_holds,
);
$template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' );

View File

@ -797,7 +797,7 @@ No patron matched <span class="ex">[% message %]</span>
</ul>
</div>
[% IF ( WaitingHolds ) %]
[% IF WaitingHolds.count %]
<div id="holdswaiting" class="circmessage">
<h4>Holds waiting:</h4>
[% FOREACH w IN WaitingHolds %]