@@ -, +, @@ 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 @@ -88,6 +88,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; @@ -1396,6 +1397,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 @@ -1315,12 +1315,11 @@ - - + - + @@ -1347,8 +1346,6 @@ - ? - --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -447,12 +447,11 @@ - - + - + @@ -479,8 +478,6 @@ - ? - --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -446,12 +446,11 @@ - - + - + @@ -478,8 +477,6 @@ - ? - --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl @@ -87,12 +87,11 @@ - - + - + @@ -119,8 +118,6 @@ - ? - --