From b4265cec826a962c9038c0aa50fdca076fd0160a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 27 Jun 2022 14:47:03 +0100 Subject: [PATCH] Bug 28854: (follow-up) Add bundle item status to manage button This patch adds the item counts (Present|Lost) to the 'Manage bundle' button in the catalogue details page. Signed-off-by: Katrin Fischer --- catalogue/detail.pl | 8 ++++++-- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 8f966b0733..6e546c1f96 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -419,8 +419,12 @@ foreach my $item (@items) { } } - if ($item_object->is_bundle) { - $itemfields{bundles} = 1; + if ( $item_object->is_bundle ) { + $item->{bundled} = + $item_object->bundle_items->search( { itemlost => { '!=' => 0 } } ) + ->count; + $item->{bundled_lost} = + $item_object->bundle_items->search( { itemlost => 0 } )->count; $item->{is_bundle} = 1; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 754c80211b..a20c0999cd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -624,7 +624,7 @@ Note that permanent location is a code, and location may be an authval. [% END %] [% END %] [% IF bundlesEnabled %] - + [% END %] [% END %] -- 2.30.2