From 0938a735de6be0adb0e65eb9879d27718e8aa3b1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 27 Jun 2022 15:26:04 +0100 Subject: [PATCH] Bug 28854: (follow-up) Link to 'In bundle' on OPAC This patch adds the 'In bundle: Link' to the OPAC to mirror what we have on the staff client. Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc | 4 ++++ opac/opac-detail.pl | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc index 7b5688c0e1..d7dc710382 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc @@ -76,6 +76,10 @@ Not for loan [% IF ( item.restrictedvalueopac ) %]([% item.restrictedvalueopac | html %])[% END %] [% END %] +[% IF ( item.bundle_host ) %] + In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio %] +[% END %] + [% IF ( item.damaged ) %] [% SET itemavailable = 0 %] [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged, opac => 1 ) %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index acd20e6308..65c6d0d624 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -766,6 +766,11 @@ if ( not $viewallitems and @items > $max_items_to_display ) { $itm->{cover_images} = $item->cover_images; } + if ( $item->in_bundle ) { + my $host = $item->bundle_host; + $itm->{bundle_host} = $host; + } + my $itembranch = $itm->{$separatebranch}; if ($currentbranch and C4::Context->preference('OpacSeparateHoldings')) { if ($itembranch and $itembranch eq $currentbranch) { -- 2.39.5