@@ -, +, @@ query part --- C4/Biblio.pm | 21 +++++++++++++++++++++ C4/XSLT.pm | 3 ++- .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 7 ++----- .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 7 ++----- .../bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl | 7 ++----- .../bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl | 7 ++----- 6 files changed, 31 insertions(+), 21 deletions(-) --- a/C4/Biblio.pm +++ a/C4/Biblio.pm @@ -28,6 +28,7 @@ use MARC::File::USMARC; use MARC::File::XML; use POSIX qw(strftime); use Module::Load::Conditional qw(can_load); +use URI; use URI::Escape; # GetCOinSBiblio use C4::Koha; @@ -1470,6 +1471,26 @@ sub GetCOinSBiblio { return $coins_value; } +sub GetOpenURLResolverURL { + my ($record) = @_; + + my $coins = GetCOinSBiblio($record); + my $OpenURLResolverURL = C4::Context->preference('OpenURLResolverURL'); + + if ($OpenURLResolverURL) { + my $uri = URI->new($OpenURLResolverURL); + + if (not defined $uri->query) { + $OpenURLResolverURL .= '?'; + } else { + $OpenURLResolverURL .= '&'; + } + $OpenURLResolverURL .= $coins; + } + + return $OpenURLResolverURL; +} + =head2 GetMarcPrice --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -250,7 +250,8 @@ sub XSLTParse4Display { my ($biblio) = GetBiblioItemByBiblioNumber($biblionumber); my @itypes = split( /\s/, C4::Context->preference('OPACOpenURLItemTypes') ); if (grep /^$biblio->{itemtype}$/, @itypes) { - $variables->{COinS} = C4::Biblio::GetCOinSBiblio($orig_record); + $variables->{OpenURLResolverURL} = + C4::Biblio::GetOpenURLResolverURL($orig_record); } } my $varxml = "\n"; --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -1249,12 +1249,11 @@ - - + - + @@ -1281,8 +1280,6 @@ - ? - --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -446,12 +446,11 @@ - - + - + @@ -478,8 +477,6 @@ - ? - --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -445,12 +445,11 @@ - - + - + @@ -477,8 +476,6 @@ - ? - --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl @@ -86,12 +86,11 @@ - - + - + @@ -118,8 +117,6 @@ - ? - --