Lines 201-207
my $show_analytics;
Link Here
|
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 if @{$components}; # 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 |
$template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages}; |
205 |
my $parts; |
205 |
my $parts; |
206 |
for my $part ( @{$components} ) { |
206 |
for my $part ( @{$components} ) { |
207 |
$part = C4::Search::new_record_from_zebra( 'biblioserver', $part ); |
207 |
$part = C4::Search::new_record_from_zebra( 'biblioserver', $part ); |
Lines 222-228
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
Link Here
|
222 |
} |
222 |
} |
223 |
} else { # check if we should show analytics anyway |
223 |
} else { # check if we should show analytics anyway |
224 |
$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}; |
225 |
$template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages}; |
226 |
} |
226 |
} |
227 |
|
227 |
|
228 |
# XSLT processing of some stuff |
228 |
# XSLT processing of some stuff |
229 |
- |
|
|