Bugzilla – Attachment 64518 Details for
Bug 8995
Show OpenURL links in OPAC search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8995: Fix and simplify usage of syspref OpenURLImageLocation
Bug-8995-Fix-and-simplify-usage-of-syspref-OpenURL.patch (text/plain), 7.95 KB, created by
Julian Maurice
on 2017-06-22 07:56:10 UTC
(
hide
)
Description:
Bug 8995: Fix and simplify usage of syspref OpenURLImageLocation
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-06-22 07:56:10 UTC
Size:
7.95 KB
patch
obsolete
>From 1fd65d7957b8873c944a7fa2f594672690d8a37f Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 2 Sep 2016 16:00:34 +0200 >Subject: [PATCH] Bug 8995: Fix and simplify usage of syspref > OpenURLImageLocation > >There were still references to the OPAC 'prog' theme in XSL files >Now, when using a relative URL, we have to give the full path >--- > .../prog/en/modules/admin/preferences/opac.pref | 6 +++--- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 16 ++-------------- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 16 ++-------------- > .../bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl | 16 ++-------------- > .../bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl | 16 ++-------------- > 5 files changed, 11 insertions(+), 59 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 0abf0a9f3e..0698ccaa40 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -528,11 +528,11 @@ OPAC: > - 'Location of image for OpenURL links:' > - pref: OpenURLImageLocation > class: url >- - '<br />Can be a complete URL starting with <code>http://</code> or' >- - '<code>https://</code> or the name of a file in <code>images</code> directory' >+ - '<br />Can be an absolute URL starting with <code>http://</code> or' >+ - '<code>https://</code> or a relative URL' > - '<br />Examples:' > - '<br />- <code>http://www.example.com/img/openurl.png</code>' >- - '<br />- <code>OpenURL/OpenURL.png</code> (file is in <code>opac-tmpl/<opacthemes>/images/OpenURL/OpenURL.png</code>)' >+ - '<br />- <code>/opac-tmpl/bootstrap/images/OpenURL.png</code>' > - > - pref: OPACShowOpenURL > choices: >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 3f3ac3b69d..3cc22e23c8 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1265,18 +1265,6 @@ > </xsl:choose> > </xsl:variable> > >- <xsl:variable name="openurlimagelocation"> >- <xsl:choose> >- <xsl:when test="starts-with($OpenURLImageLocation, 'http://') or starts-with($OpenURLImageLocation, 'https://')"> >- <xsl:value-of select="$OpenURLImageLocation" /> >- </xsl:when> >- <xsl:when test="$OpenURLImageLocation != ''"> >- <xsl:text>/opac-tmpl/prog/images/</xsl:text> >- <xsl:value-of select="$OpenURLImageLocation" /> >- </xsl:when> >- </xsl:choose> >- </xsl:variable> >- > <span class="results_summary"><a> > <xsl:attribute name="href"> > <xsl:value-of select="$OpenURLResolverURL" /> >@@ -1293,10 +1281,10 @@ > </xsl:attribute> > </xsl:if> > <xsl:choose> >- <xsl:when test="$openurlimagelocation != ''"> >+ <xsl:when test="$OpenURLImageLocation != ''"> > <img> > <xsl:attribute name="src"> >- <xsl:value-of select="$openurlimagelocation" /> >+ <xsl:value-of select="$OpenURLImageLocation" /> > </xsl:attribute> > </img> > </xsl:when> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 53f9f54656..5cd70923d6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -462,18 +462,6 @@ > </xsl:choose> > </xsl:variable> > >- <xsl:variable name="openurlimagelocation"> >- <xsl:choose> >- <xsl:when test="starts-with($OpenURLImageLocation, 'http://') or starts-with($OpenURLImageLocation, 'https://')"> >- <xsl:value-of select="$OpenURLImageLocation" /> >- </xsl:when> >- <xsl:when test="$OpenURLImageLocation != ''"> >- <xsl:text>/opac-tmpl/prog/images/</xsl:text> >- <xsl:value-of select="$OpenURLImageLocation" /> >- </xsl:when> >- </xsl:choose> >- </xsl:variable> >- > <span class="results_summary"><a> > <xsl:attribute name="href"> > <xsl:value-of select="$OpenURLResolverURL" /> >@@ -490,10 +478,10 @@ > </xsl:attribute> > </xsl:if> > <xsl:choose> >- <xsl:when test="$openurlimagelocation != ''"> >+ <xsl:when test="$OpenURLImageLocation != ''"> > <img> > <xsl:attribute name="src"> >- <xsl:value-of select="$openurlimagelocation" /> >+ <xsl:value-of select="$OpenURLImageLocation" /> > </xsl:attribute> > </img> > </xsl:when> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >index 9cf3554a47..b94e9cc344 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >@@ -461,18 +461,6 @@ > </xsl:choose> > </xsl:variable> > >- <xsl:variable name="openurlimagelocation"> >- <xsl:choose> >- <xsl:when test="starts-with($OpenURLImageLocation, 'http://') or starts-with($OpenURLImageLocation, 'https://')"> >- <xsl:value-of select="$OpenURLImageLocation" /> >- </xsl:when> >- <xsl:when test="$OpenURLImageLocation != ''"> >- <xsl:text>/opac-tmpl/prog/images/</xsl:text> >- <xsl:value-of select="$OpenURLImageLocation" /> >- </xsl:when> >- </xsl:choose> >- </xsl:variable> >- > <span class="results_summary"><a> > <xsl:attribute name="href"> > <xsl:value-of select="$OpenURLResolverURL" /> >@@ -489,10 +477,10 @@ > </xsl:attribute> > </xsl:if> > <xsl:choose> >- <xsl:when test="$openurlimagelocation != ''"> >+ <xsl:when test="$OpenURLImageLocation != ''"> > <img> > <xsl:attribute name="src"> >- <xsl:value-of select="$openurlimagelocation" /> >+ <xsl:value-of select="$OpenURLImageLocation" /> > </xsl:attribute> > </img> > </xsl:when> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >index 2cebcd00d1..24db601936 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >@@ -102,18 +102,6 @@ > </xsl:choose> > </xsl:variable> > >- <xsl:variable name="openurlimagelocation"> >- <xsl:choose> >- <xsl:when test="starts-with($OpenURLImageLocation, 'http://') or starts-with($OpenURLImageLocation, 'https://')"> >- <xsl:value-of select="$OpenURLImageLocation" /> >- </xsl:when> >- <xsl:when test="$OpenURLImageLocation != ''"> >- <xsl:text>/opac-tmpl/prog/images/</xsl:text> >- <xsl:value-of select="$OpenURLImageLocation" /> >- </xsl:when> >- </xsl:choose> >- </xsl:variable> >- > <span class="results_summary"><a> > <xsl:attribute name="href"> > <xsl:value-of select="$OpenURLResolverURL" /> >@@ -130,10 +118,10 @@ > </xsl:attribute> > </xsl:if> > <xsl:choose> >- <xsl:when test="$openurlimagelocation != ''"> >+ <xsl:when test="$OpenURLImageLocation != ''"> > <img> > <xsl:attribute name="src"> >- <xsl:value-of select="$openurlimagelocation" /> >+ <xsl:value-of select="$OpenURLImageLocation" /> > </xsl:attribute> > </img> > </xsl:when> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8995
:
13141
|
22753
|
23625
|
23626
|
23627
|
24087
|
24088
|
24089
|
26899
|
26900
|
26901
|
29357
|
29358
|
29359
|
30385
|
30386
|
30387
|
30388
|
30389
|
30390
|
35747
|
35916
|
40647
|
44639
|
48371
|
48372
|
55131
|
55132
|
55133
|
55134
|
55135
|
55136
|
55882
|
64513
|
64514
|
64515
|
64516
|
64517
|
64518
|
64519
|
64532
|
64533
|
64534
|
64535
|
64536
|
64537
|
64538
|
86483
|
86484
|
86485
|
86486
|
86487
|
86488
|
86489
|
86490
|
86491
|
86492
|
86541
|
86542
|
86557
|
86558
|
86559
|
86601
|
86602
|
86603
|
86604
|
86605
|
86606
|
86607
|
86608
|
86609
|
86610
|
88665
|
88666
|
88667
|
88668
|
88669
|
88670
|
88671
|
88672
|
88673
|
88735
|
88736
|
88737
|
88738
|
88739
|
88740
|
88741
|
88742
|
88743
|
88744
|
89012
|
89013
|
89014
|
89015
|
89120