diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 3c90afcee3..56518c2956 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -384,13 +384,13 @@ sub shelfpage { } my $contents; ( $contents, $totshelves ) = GetShelfContents( $number, $shelveslimit, $shelvesoffset ); - if ( my $count = scalar @$contents ) { + if ( $totshelves > 0 ) { unless ( scalar grep { /^CONFIRM-$number$/ } $query->param() ) { if ( defined $shelflist->{$number} ) { - push( @paramsloop, { need_confirm => $shelflist->{$number}->{shelfname}, count => $count, single => ($count eq 1 ? 1:0) } ); + push( @paramsloop, { need_confirm => $shelflist->{$number}->{shelfname}, count => $totshelves, single => ($totshelves eq 1 ? 1:0) } ); $shelflist->{$number}->{confirm} = $number; } else { - push( @paramsloop, { need_confirm => $privshelflist->{$number}->{shelfname}, count => $count } ); + push( @paramsloop, { need_confirm => $privshelflist->{$number}->{shelfname}, count => $totshelves } ); $privshelflist->{$number}->{confirm} = $number; } $stay = 0; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 23d815ffc6..95505e8444 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -234,7 +234,11 @@ function placeHold () { [% IF ( paramsloo.noshelfnumber ) %]
ERROR: No list number given.
[% END %] [% IF ( paramsloo.need_confirm ) %]
The list [% paramsloo.need_confirm %] is not empty. -
It has [% paramsloo.count %] entries. + [% IF ( paramsloo.single ) %] +
It has [% paramsloo.count %] entry. + [% ELSE %] +
It has [% paramsloo.count %] entries. + [% END %]
Use the "Confirm" button below to confirm deletion.
[% END %]