Bug 4319: (QA follow-up) Use ReservableItems in all scripts
[1] Call CountItemsIssued or hasItemswaitingOrInTransit when needed only.
[2] Add this logic to ISBD and MARC detail too, since they also use
this include.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirming that Place hold now comes up if you have a waiting item and
circulation rule == If any unavailable.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
7ac45d00b6
commit
9905247a48
|
|
@ -79,8 +79,6 @@ if(my $cart_list = $query->cookie("bib_list")){
|
|||
}
|
||||
}
|
||||
|
||||
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
|
||||
|
||||
my $marcflavour = C4::Context->preference("marcflavour");
|
||||
|
||||
my @items = GetItemsInfo($biblionumber);
|
||||
|
|
@ -183,9 +181,12 @@ for my $itm (@items) {
|
|||
unless $allow_onshelf_holds;
|
||||
}
|
||||
|
||||
if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) {
|
||||
$template->param( ReservableItems => 1 );
|
||||
}
|
||||
|
||||
$template->param(
|
||||
RequestOnOpac => C4::Context->preference("RequestOnOpac"),
|
||||
AllowOnShelfHolds => $allow_onshelf_holds,
|
||||
norequests => $norequests,
|
||||
ISBD => $res,
|
||||
biblio => $biblio,
|
||||
|
|
|
|||
|
|
@ -136,8 +136,9 @@ for my $itm (@all_items) {
|
|||
last if $allow_onshelf_holds;
|
||||
}
|
||||
|
||||
$template->param( 'AllowOnShelfHolds' => $allow_onshelf_holds );
|
||||
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
|
||||
if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) {
|
||||
$template->param( ReservableItems => 1 );
|
||||
}
|
||||
|
||||
# adding the $RequestOnOpac param
|
||||
my $RequestOnOpac;
|
||||
|
|
|
|||
|
|
@ -719,9 +719,9 @@ if ( not $viewallitems and @items > $max_items_to_display ) {
|
|||
}
|
||||
}
|
||||
|
||||
my $itemsWaitingOrInTransit = Koha::Biblios->find($biblionumber)->hasItemswaitingOrInTransit || 0;
|
||||
my $itemsIssued = CountItemsIssued( $biblionumber );
|
||||
$template->param( 'ReservableItems' => $itemsWaitingOrInTransit || $itemsIssued || $allow_onshelf_holds );
|
||||
if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) {
|
||||
$template->param( ReservableItems => 1 );
|
||||
}
|
||||
|
||||
# Display only one tab if one items list is empty
|
||||
if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue