Lines 265-273
sub XSLTParse4Display {
Link Here
|
265 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
265 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
266 |
|
266 |
|
267 |
$variables ||= {}; |
267 |
$variables ||= {}; |
|
|
268 |
my $biblio; |
268 |
if (C4::Context->preference('OPACShowOpenURL')) { |
269 |
if (C4::Context->preference('OPACShowOpenURL')) { |
269 |
my @biblio_itemtypes; |
270 |
my @biblio_itemtypes; |
270 |
my $biblio = Koha::Biblios->find($biblionumber); |
271 |
$biblio //= Koha::Biblios->find($biblionumber); |
271 |
if (C4::Context->preference('item-level_itypes')) { |
272 |
if (C4::Context->preference('item-level_itypes')) { |
272 |
@biblio_itemtypes = $biblio->items->get_column("itype"); |
273 |
@biblio_itemtypes = $biblio->items->get_column("itype"); |
273 |
} else { |
274 |
} else { |
Lines 284-290
sub XSLTParse4Display {
Link Here
|
284 |
my $partsxml = ''; |
285 |
my $partsxml = ''; |
285 |
# possibly insert component records into Detail views |
286 |
# possibly insert component records into Detail views |
286 |
if ($xslsyspref =~ m/Details/) { |
287 |
if ($xslsyspref =~ m/Details/) { |
287 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
288 |
$biblio //= Koha::Biblios->find( $biblionumber ); |
288 |
my $components = $biblio->get_marc_analytics(300); |
289 |
my $components = $biblio->get_marc_analytics(300); |
289 |
$variables->{show_analytics_link} = ( scalar @{$components} == 0 ) ? 0 : 1; |
290 |
$variables->{show_analytics_link} = ( scalar @{$components} == 0 ) ? 0 : 1; |
290 |
|
291 |
|
291 |
- |
|
|