From 49064301f2e275e49f0fcb942667de2c984ce5a4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 25 Aug 2015 15:45:45 +0100 Subject: [PATCH] Bug 14544: Pass the itemtype description and notforloan to the template Before it was returned by GetShelfContents and the join on itemtype. --- opac/opac-shelves.pl | 5 ++++- virtualshelves/shelves.pl | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index 6c2f0b9..63dc402 100755 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -238,7 +238,10 @@ if ( $op eq 'view' ) { } my $marcflavour = C4::Context->preference("marcflavour"); - $this_item->{'imageurl'} = getitemtypeinfo( $content->biblionumber->biblioitems->first->itemtype, 'intranet' )->{'imageurl'}; + my $itemtypeinfo = getitemtypeinfo( $content->biblionumber->biblioitems->first->itemtype, 'intranet' ); + $this_item->{imageurl} = $itemtypeinfo->{imageurl}; + $this_item->{description} = $itemtypeinfo->{description}; + $this_item->{notforloan} = $itemtypeinfo->{notforloan}; $this_item->{'coins'} = GetCOinSBiblio($record); $this_item->{'subtitle'} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) ); $this_item->{'normalized_upc'} = GetNormalizedUPC( $record, $marcflavour ); diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index 47fa1bc..cd2be63 100755 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -216,7 +216,10 @@ if ( $op eq 'view' ) { } my $marcflavour = C4::Context->preference("marcflavour"); - $this_item->{'imageurl'} = getitemtypeinfo( $content->biblionumber->biblioitems->first->itemtype, 'intranet' )->{'imageurl'}; + my $itemtypeinfo = getitemtypeinfo( $content->biblionumber->biblioitems->first->itemtype, 'intranet' ); + $this_item->{imageurl} = $itemtypeinfo->{imageurl}; + $this_item->{description} = $itemtypeinfo->{description}; + $this_item->{notforloan} = $itemtypeinfo->{notforloan}; $this_item->{'coins'} = GetCOinSBiblio($record); $this_item->{'subtitle'} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) ); $this_item->{'normalized_upc'} = GetNormalizedUPC( $record, $marcflavour ); -- 2.1.0