From d74c5d55ac33dbbdff0b7367b3c50e0b17d18ae5 Mon Sep 17 00:00:00 2001 From: Emily Lamancusa Date: Fri, 17 Nov 2023 13:56:06 -0500 Subject: [PATCH] Bug 20844: (follow-up) Fix alert boxes for item-level holds Fix styling on the alert in additem.tt Don't show alert in moredetail page if RevertBibLevelHolds is disabled --- catalogue/moredetail.pl | 6 +++++- .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 78f0b830af..0db48af071 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -248,7 +248,11 @@ foreach my $item (@items){ ); $item_info->{nomod} = !$patron->can_edit_items_from( $item->homebranch ); - $item_info->{waiting_holds} = $item->holds({ found => [ 'W', 'T' ], item_level_hold => { '!=' => 0 } })->count; + + if ( C4::Context->preference('RevertLostBibLevelHolds') ) { + $item_info->{waiting_holds} = + $item->holds( { found => [ 'W', 'T' ], item_level_hold => { '!=' => 0 } } )->count; + } push @item_data, $item_info; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 931787e64c..0962bc7a28 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -87,7 +87,7 @@ [% IF item_not_found %]
Cannot delete: Item not found.
[% END %] [% IF waitinglostitems %] -
+
The following item(s) have a waiting item-level hold and have been marked as lost.
    [% FOREACH i IN waitinglostitems %] -- 2.34.1