Bugzilla – Attachment 148566 Details for
Bug 32794
mailto links in 856 can be incorrectly formed by XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32794: (follow-up) Consolidate shared code into one function (:template)
Bug-32794-follow-up-Consolidate-shared-code-into-o.patch (text/plain), 4.28 KB, created by
Marcel de Rooy
on 2023-03-22 16:00:51 UTC
(
hide
)
Description:
Bug 32794: (follow-up) Consolidate shared code into one function (:template)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-03-22 16:00:51 UTC
Size:
4.28 KB
patch
obsolete
>From c78159b421254e2dfb92a38df3072af26d55ee7f Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 22 Mar 2023 15:17:06 +0000 >Subject: [PATCH] Bug 32794: (follow-up) Consolidate shared code into one > function (:template) >Content-Type: text/plain; charset=utf-8 > >Few extra lines for the $2 exception as noted on Bugzilla. > >Note: We should probably check why the utils xslt on opac and intranet >have so much differences currently. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/xslt/MARC21slimUtils.xsl | 32 +++++++++++++++++++ > .../bootstrap/en/xslt/MARC21slimUtils.xsl | 32 +++++++++++++++++++ > 2 files changed, 64 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index d9a49ffcf5..9ebd0716e3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -690,6 +690,38 @@ > </xsl:if> > </xsl:template> > >+ <xsl:template name="AddMissingProtocol"> >+ <xsl:param name="resourceLocation"/> >+ <xsl:param name="indicator1"/> >+ <xsl:param name="accessMethod"/> >+ <xsl:param name="delimiter" select="':'"/> >+ <xsl:if test="not(contains($resourceLocation, $delimiter))"> >+ <xsl:choose> >+ <xsl:when test="$indicator1=7 and ( $accessMethod='mailto' or $accessMethod='tel' )"> >+ <xsl:value-of select="$accessMethod"/><xsl:text>:</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=7"> >+ <xsl:value-of select="$accessMethod"/><xsl:text>://</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=0"> >+ <xsl:text>mailto:</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=1"> >+ <xsl:text>ftp://</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=2"> >+ <xsl:text>telnet://</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=3"> >+ <xsl:text>tel:</xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>http://</xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:if> >+ </xsl:template> >+ > </xsl:stylesheet> > > <!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp. >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >index e899b81099..e03e599718 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >@@ -653,6 +653,38 @@ > </xsl:if> > </xsl:template> > >+ <xsl:template name="AddMissingProtocol"> >+ <xsl:param name="resourceLocation"/> >+ <xsl:param name="indicator1"/> >+ <xsl:param name="accessMethod"/> >+ <xsl:param name="delimiter" select="':'"/> >+ <xsl:if test="not(contains($resourceLocation, $delimiter))"> >+ <xsl:choose> >+ <xsl:when test="$indicator1=7 and ( $accessMethod='mailto' or $accessMethod='tel' )"> >+ <xsl:value-of select="$accessMethod"/><xsl:text>:</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=7"> >+ <xsl:value-of select="$accessMethod"/><xsl:text>://</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=0"> >+ <xsl:text>mailto:</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=1"> >+ <xsl:text>ftp://</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=2"> >+ <xsl:text>telnet://</xsl:text> >+ </xsl:when> >+ <xsl:when test="$indicator1=3"> >+ <xsl:text>tel:</xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>http://</xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:if> >+ </xsl:template> >+ > </xsl:stylesheet> > > <!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp. >-- >2.30.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 32794
:
145999
|
147745
|
148565
| 148566 |
148567