Bugzilla – Attachment 165711 Details for
Bug 36111
Online resource link should be based on the presence of 856$u (MARC21)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36111: online resource link should be based on the presence of 856
Bug-36111-online-resource-link-should-be-based-on-.patch (text/plain), 18.02 KB, created by
David Nind
on 2024-04-28 19:17:45 UTC
(
hide
)
Description:
Bug 36111: online resource link should be based on the presence of 856
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-04-28 19:17:45 UTC
Size:
18.02 KB
patch
obsolete
>From 977447525fbcbdc9a7bc5eccea06c601ef443408 Mon Sep 17 00:00:00 2001 >From: Matthias Le Gac <matthias.le-gac@inlibro.com> >Date: Fri, 26 Apr 2024 14:25:18 -0400 >Subject: [PATCH] Bug 36111: online resource link should be based on the > presence of 856 > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 13 +++++-------- > .../en/xslt/MARC21slim2intranetResults.xsl | 13 +++++-------- > .../en/xslt/MARC21slim2OPACDetail.xsl | 13 +++++-------- > .../en/xslt/MARC21slim2OPACResults.xsl | 19 ++++++++----------- > 4 files changed, 23 insertions(+), 35 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 9b60144d9f..d6f5fb1964 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -924,7 +924,7 @@ > <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']"> > <span class="results_summary online_resources"> > <span class="label">Online resources: </span> >- <xsl:for-each select="marc:datafield[@tag=856]"> >+ <xsl:for-each select="marc:datafield[@tag=856 and marc:subfield[@code='u']]"> > <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable> > <a> > <xsl:attribute name="href"> >@@ -935,14 +935,11 @@ > </xsl:call-template> > <xsl:value-of select="marc:subfield[@code='u']"/> > </xsl:attribute> >- <xsl:if test="not(marc:subfield[@code='u'])"> >- <xsl:attribute name="style">pointer-events: none; color: #202020;</xsl:attribute> >- </xsl:if> > <xsl:choose> > <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')"> > <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text> > </xsl:when> >- <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z'] and marc:subfield[@code='u']"> >+ <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']"> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">y3z</xsl:with-param> > </xsl:call-template> >@@ -952,16 +949,16 @@ > <xsl:when test="$URLLinkText!=''"> > <xsl:value-of select="$URLLinkText"/> > </xsl:when> >- <xsl:when test="marc:subfield[@code='u']"> >+ <xsl:otherwise> > <xsl:text>Click here to access online</xsl:text> >- </xsl:when> >+ </xsl:otherwise> > </xsl:choose> > </xsl:when> > </xsl:choose> > </a> > <xsl:choose> > <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when> >- <xsl:when test="(marc:subfield[@code='y'] or marc:subfield[@code='3'] or marc:subfield[@code='z'] or marc:subfield[@code='u']) and marc:subfield[@code='u']"><xsl:text> | </xsl:text></xsl:when> >+ <xsl:otherwise> | </xsl:otherwise> > </xsl:choose> > </xsl:for-each> > </span> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index fa8878f915..5dbecdd6bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -981,7 +981,7 @@ > <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']"> > <span class="results_summary online_resources"> > <span class="label">Online resources: </span> >- <xsl:for-each select="marc:datafield[@tag=856]"> >+ <xsl:for-each select="marc:datafield[@tag=856 and marc:subfield[@code='u']]"> > <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable> > <a> > <xsl:attribute name="href"> >@@ -992,14 +992,11 @@ > </xsl:call-template> > <xsl:value-of select="marc:subfield[@code='u']"/> > </xsl:attribute> >- <xsl:if test="not(marc:subfield[@code='u'])"> >- <xsl:attribute name="style">pointer-events: none; color: #202020;</xsl:attribute> >- </xsl:if> > <xsl:choose> > <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')"> > <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text> > </xsl:when> >- <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z'] and marc:subfield[@code='u']"> >+ <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']"> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">y3z</xsl:with-param> > </xsl:call-template> >@@ -1009,16 +1006,16 @@ > <xsl:when test="$URLLinkText!=''"> > <xsl:value-of select="$URLLinkText"/> > </xsl:when> >- <xsl:when test="marc:subfield[@code='u']"> >+ <xsl:otherwise> > <xsl:text>Click here to access online</xsl:text> >- </xsl:when> >+ </xsl:otherwise> > </xsl:choose> > </xsl:when> > </xsl:choose> > </a> > <xsl:choose> > <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when> >- <xsl:when test="(marc:subfield[@code='y'] or marc:subfield[@code='3'] or marc:subfield[@code='z'] or marc:subfield[@code='u']) and marc:subfield[@code='u']"><xsl:text> | </xsl:text></xsl:when> >+ <xsl:otherwise> | </xsl:otherwise> > </xsl:choose> > </xsl:for-each> > </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 64d224ed9c..defbacc394 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1041,7 +1041,7 @@ > <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']"> > <span class="results_summary online_resources"> > <span class="label">Online resources: </span> >- <xsl:for-each select="marc:datafield[@tag=856]"> >+ <xsl:for-each select="marc:datafield[@tag=856 and marc:subfield[@code='u']]"> > <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable> > <a property="url"> > <xsl:choose> >@@ -1060,9 +1060,6 @@ > </xsl:call-template> > <xsl:value-of select="marc:subfield[@code='u']"/> > </xsl:attribute> >- <xsl:if test="not(marc:subfield[@code='u'])"> >- <xsl:attribute name="style">pointer-events: none; color: #202020;</xsl:attribute> >- </xsl:if> > </xsl:otherwise> > </xsl:choose> > <xsl:if test="$OPACURLOpenInNewWindow='1'"> >@@ -1072,7 +1069,7 @@ > <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')"> > <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="style">height:100px</xsl:attribute></xsl:element><xsl:text></xsl:text> > </xsl:when> >- <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z'] and marc:subfield[@code='u']"> >+ <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']"> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">y3z</xsl:with-param> > </xsl:call-template> >@@ -1082,16 +1079,16 @@ > <xsl:when test="$URLLinkText!=''"> > <xsl:value-of select="$URLLinkText"/> > </xsl:when> >- <xsl:when test="marc:subfield[@code='u']"> >+ <xsl:otherwise> > <xsl:text>Click here to access online</xsl:text> >- </xsl:when> >+ </xsl:otherwise> > </xsl:choose> > </xsl:when> > </xsl:choose> > </a> > <xsl:choose> > <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when> >- <xsl:when test="(marc:subfield[@code='y'] or marc:subfield[@code='3'] or marc:subfield[@code='z'] or marc:subfield[@code='u']) and marc:subfield[@code='u']"><xsl:text> | </xsl:text></xsl:when> >+ <xsl:otherwise> | </xsl:otherwise> > </xsl:choose> > </xsl:for-each> > </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 4e738c109a..298afbbba4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -1219,7 +1219,7 @@ > <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']"> > <div class="results_summary online_resources"> > <span class="label">Online resources: </span> >- <xsl:for-each select="marc:datafield[@tag=856]"> >+ <xsl:for-each select="marc:datafield[@tag=856 and marc:subfield[@code='u']]"> > <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable> > <xsl:if test="$OPACURLOpenInNewWindow='0'"> > <a> >@@ -1239,16 +1239,13 @@ > </xsl:call-template> > <xsl:value-of select="marc:subfield[@code='u']"/> > </xsl:attribute> >- <xsl:if test="not(marc:subfield[@code='u'])"> >- <xsl:attribute name="style">pointer-events: none; color: #202020;</xsl:attribute> >- </xsl:if> > </xsl:otherwise> > </xsl:choose> > <xsl:choose> > <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')"> > <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="style">height:100px;</xsl:attribute></xsl:element><xsl:text></xsl:text> > </xsl:when> >- <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z'] and marc:subfield[@code='u']"> >+ <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']"> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">y3z</xsl:with-param> > </xsl:call-template> >@@ -1258,9 +1255,9 @@ > <xsl:when test="$URLLinkText!=''"> > <xsl:value-of select="$URLLinkText"/> > </xsl:when> >- <xsl:when test="marc:subfield[@code='u']"> >+ <xsl:otherwise> > <xsl:text>Click here to access online</xsl:text> >- </xsl:when> >+ </xsl:otherwise> > </xsl:choose> > </xsl:when> > </xsl:choose> >@@ -1286,7 +1283,7 @@ > <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and ($SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')"> > <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="style">height:100px</xsl:attribute></xsl:element><xsl:text></xsl:text> > </xsl:when> >- <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z'] and marc:subfield[@code='u']"> >+ <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']"> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">y3z</xsl:with-param> > </xsl:call-template> >@@ -1296,9 +1293,9 @@ > <xsl:when test="$URLLinkText!=''"> > <xsl:value-of select="$URLLinkText"/> > </xsl:when> >- <xsl:when test="marc:subfield[@code='u']"> >+ <xsl:otherwise> > <xsl:text>Click here to access online</xsl:text> >- </xsl:when> >+ </xsl:otherwise> > </xsl:choose> > </xsl:when> > </xsl:choose> >@@ -1306,7 +1303,7 @@ > </xsl:if> > <xsl:choose> > <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when> >- <xsl:when test="(marc:subfield[@code='y'] or marc:subfield[@code='3'] or marc:subfield[@code='z'] or marc:subfield[@code='u']) and marc:subfield[@code='u']"><xsl:text> | </xsl:text></xsl:when> >+ <xsl:otherwise> | </xsl:otherwise> > </xsl:choose> > </xsl:for-each> > </div> >-- >2.39.2
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 36111
:
162322
|
162405
|
162406
|
163876
|
164029
|
164151
|
164275
|
164276
|
164429
|
164430
|
164476
|
165236
|
165335
|
165346
|
165347
|
165355
|
165356
|
165688
|
165709
|
165710
|
165711
|
170437
|
170471
|
170474
|
170576