Lines 200-206
my $showcomp = C4::Context->preference('ShowComponentRecords');
Link Here
|
200 |
my $show_analytics; |
200 |
my $show_analytics; |
201 |
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) { |
201 |
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) { |
202 |
if ( my $components = $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords')) ) { |
202 |
if ( my $components = $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords')) ) { |
203 |
$show_analytics = 1; # just show link when having results |
203 |
$show_analytics = 1 if @{$components}; # just show link when having results |
|
|
204 |
$template->param( analytics_error => 1 ) if @{$biblio->messages}; |
204 |
my $parts; |
205 |
my $parts; |
205 |
for my $part ( @{$components} ) { |
206 |
for my $part ( @{$components} ) { |
206 |
$part = C4::Search::new_record_from_zebra( 'biblioserver', $part ); |
207 |
$part = C4::Search::new_record_from_zebra( 'biblioserver', $part ); |
Lines 221-226
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
Link Here
|
221 |
} |
222 |
} |
222 |
} else { # check if we should show analytics anyway |
223 |
} else { # check if we should show analytics anyway |
223 |
$show_analytics = 1 if @{$biblio->get_marc_components(1)}; # count matters here, results does not |
224 |
$show_analytics = 1 if @{$biblio->get_marc_components(1)}; # count matters here, results does not |
|
|
225 |
$template->param( analytics_error => 1 ) if @{$biblio->messages}; |
224 |
} |
226 |
} |
225 |
|
227 |
|
226 |
# XSLT processing of some stuff |
228 |
# XSLT processing of some stuff |