From d711d45f4e8336c22981184758686fbe07d375be 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 Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- 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 b3deb4305a..22a60909cb 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -456,8 +456,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 0148404bd8..de58c8896b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -637,7 +637,7 @@ Note that permanent location is a code, and location may be an authval. [% END %] [% END %] [% IF bundlesEnabled %] - + [% END %] [% END %] -- 2.39.5