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