|
Lines 282-302
sub XSLTParse4Display {
Link Here
|
| 282 |
} |
282 |
} |
| 283 |
|
283 |
|
| 284 |
# possibly show analytics link in Detail views |
284 |
# possibly show analytics link in Detail views |
| 285 |
if ( $xslsyspref eq "OPACXSLTDetailsDisplay" || $xslsyspref eq "XSLTDetailsDisplay" ) { |
285 |
my $show_components = C4::Context->preference('ShowComponentRecords') // q{}; |
|
|
286 |
$variables->{show_analytics_link} = 0; |
| 287 |
if( ( $show_components =~ /both|opac/ && $xslsyspref eq "OPACXSLTDetailsDisplay" ) || |
| 288 |
( $show_components =~ /both|staff/ && $xslsyspref eq "XSLTDetailsDisplay" )) |
| 289 |
{ |
| 286 |
$biblio //= Koha::Biblios->find( $biblionumber ); |
290 |
$biblio //= Koha::Biblios->find( $biblionumber ); |
| 287 |
my $components = $biblio->get_marc_components(); |
291 |
my $components = $biblio->get_marc_components(); |
| 288 |
$variables->{show_analytics_link} = ( scalar @{$components} == 0 ) ? 0 : 1; |
292 |
$variables->{show_analytics_link} = 1 if @$components; |
| 289 |
|
|
|
| 290 |
my $showcomp = C4::Context->preference('ShowComponentRecords'); |
| 291 |
if ( |
| 292 |
$variables->{show_analytics_link} |
| 293 |
&& ( $showcomp eq 'both' |
| 294 |
|| ( $showcomp eq 'staff' && $xslsyspref !~ m/OPAC/ ) |
| 295 |
|| ( $showcomp eq 'opac' && $xslsyspref =~ m/OPAC/ ) ) |
| 296 |
) |
| 297 |
{ |
| 298 |
$variables->{show_analytics_link} = 0; |
| 299 |
} |
| 300 |
} |
293 |
} |
| 301 |
|
294 |
|
| 302 |
my $varxml = "<variables>\n"; |
295 |
my $varxml = "<variables>\n"; |
| 303 |
- |
|
|