Publication:
[% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode|html %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %]
[% ELSE %][% IF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %][% END %]
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
+++ a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
@@ -436,6 +436,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OpenURL
+
+
+
+
+
+
+
+
+
+
+ /opac-tmpl/prog/images/
+
+
+
+
+
+
+
+
+ ?
+
+
+
+
+
+
+
+
+ text-decoration:none
+
+
+
+
+
+
+ vertical-align:middle
+
+
+
+
+
+
+
+
+
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl
+++ a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl
@@ -76,6 +76,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OpenURL
+
+
+
+
+
+
+
+
+
+
+ /opac-tmpl/prog/images/
+
+
+
+
+
+
+
+
+ ?
+
+
+
+
+
+
+
+
+ text-decoration:none
+
+
+
+
+
+
+ vertical-align:middle
+
+
+
+
+
+
+
+
+
+
454
Translation of
--- a/opac/opac-search.pl
+++ a/opac/opac-search.pl
@@ -459,6 +459,16 @@ if (C4::Context->preference('OpacSuppression')) {
}
}
+# OpenURL
+if (C4::Context->preference('OpenURLinOPACResults')) {
+ $template->param(
+ OpenURLinOPACResults => 1,
+ OpenURLResolverURL => C4::Context->preference('OpenURLResolverURL'),
+ OpenURLText => C4::Context->preference('OpenURLText'),
+ OpenURLImageLocation => C4::Context->preference('OpenURLImageLocation')
+ );
+}
+
$template->param ( LIMIT_INPUTS => \@limit_inputs );
$template->param ( OPACResultsSidebar => C4::Context->preference('OPACResultsSidebar'));
@@ -543,6 +553,27 @@ for (my $i=0;$i<@servers;$i++) {
if ( grep {$_ eq $line->{'biblionumber'}} @cart_list) {
$line->{'incart'} = 1;
}
+
+ if (C4::Context->preference('COinSinOPACResults')
+ or C4::Context->preference('OpenURLinOPACResults')) {
+ my $record = GetMarcBiblio($line->{'biblionumber'});
+ $line->{coins} = GetCOinSBiblio($record);
+ }
+
+ if ( C4::Context->preference( "Babeltheque" ) and $line->{normalized_isbn} ) {
+ my $isbn = Business::ISBN->new( $line->{normalized_isbn} );
+ next if not $isbn;
+ $isbn = $isbn->as_isbn13->as_string;
+ $isbn =~ s/-//g;
+ my $social_datas = C4::SocialData::get_data( $isbn );
+ next if not $social_datas;
+ for my $key ( keys %$social_datas ) {
+ $line->{$key} = $$social_datas{$key};
+ if ( $key eq 'score_avg' ){
+ $line->{score_int} = sprintf("%.0f", $$social_datas{score_avg} );
+ }
+ }
+ }
}
@@ -557,26 +588,6 @@ for (my $i=0;$i<@servers;$i++) {
}
}
- if (C4::Context->preference('COinSinOPACResults')) {
- foreach (@newresults) {
- my $record = GetMarcBiblio($_->{'biblionumber'});
- $_->{coins} = GetCOinSBiblio($record);
- if ( C4::Context->preference( "Babeltheque" ) and $_->{normalized_isbn} ) {
- my $isbn = Business::ISBN->new( $_->{normalized_isbn} );
- next if not $isbn;
- $isbn = $isbn->as_isbn13->as_string;
- $isbn =~ s/-//g;
- my $social_datas = C4::SocialData::get_data( $isbn );
- next if not $social_datas;
- for my $key ( keys %$social_datas ) {
- $_->{$key} = $$social_datas{$key};
- if ( $key eq 'score_avg' ){
- $_->{score_int} = sprintf("%.0f", $$social_datas{score_avg} );
- }
- }
- }
- }
- }
if ( C4::Context->preference('OpacStarRatings') eq 'all' ) {
--