Bugzilla – Attachment 170444 Details for
Bug 22972
Proposal for enriching the bibliographic records with standard identifiers from authority data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22972: Modify MARC21 XSLT to include link to external data ($1)
Bug-22972-Modify-MARC21-XSLT-to-include-link-to-ex.patch (text/plain), 7.46 KB, created by
Baptiste Wojtkowski (bwoj)
on 2024-08-16 09:03:07 UTC
(
hide
)
Description:
Bug 22972: Modify MARC21 XSLT to include link to external data ($1)
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2024-08-16 09:03:07 UTC
Size:
7.46 KB
patch
obsolete
>From 79fa976222899d8da6072f141e01d17359e6eb08 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 22 Mar 2023 10:59:11 +0100 >Subject: [PATCH] Bug 22972: Modify MARC21 XSLT to include link to external > data ($1) > >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 51 +++++++++++++++++++ > .../en/xslt/MARC21slim2OPACDetail.xsl | 48 +++++++++++++++++ > 2 files changed, 99 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 36b0105..d076a71 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -699,6 +699,31 @@ > </xsl:call-template> > </xsl:if> > >+ <!-- add link to external data like wikidata, viaf... --> >+ <xsl:if test="marc:subfield[@code='1']"> >+ <xsl:for-each select="marc:subfield[@code='1']"> >+ <span class="linkeddata_subj"> >+ <xsl:text> [</xsl:text> >+ <a> >+ <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute> >+ <xsl:attribute name="target">_blank</xsl:attribute> >+ <xsl:choose> >+ <xsl:when test="contains(.,'wikidata')"> >+ <xsl:text>Wikidata</xsl:text> >+ </xsl:when> >+ <xsl:when test="contains(.,'viaf')"> >+ <xsl:text>VIAF</xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="."/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </a> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:for-each> >+ </xsl:if> >+ > <xsl:choose> > <xsl:when test="position()=last()"></xsl:when> > <xsl:otherwise> | </xsl:otherwise> >@@ -1911,6 +1936,32 @@ > <xsl:with-param name="authid"><xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:with-param> > </xsl:call-template> > </xsl:if> >+ >+ <!-- add link to external data like wikidata, viaf... --> >+ <xsl:if test="(marc:subfield[@code='1'])"> >+ <xsl:for-each select="marc:subfield[@code='1']"> >+ <span class="linkeddata"> >+ <xsl:text> [</xsl:text> >+ <a> >+ <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute> >+ <xsl:attribute name="target">_blank</xsl:attribute> >+ <xsl:choose> >+ <xsl:when test="contains(.,'wikidata')"> >+ <xsl:text>Wikidata</xsl:text> >+ </xsl:when> >+ <xsl:when test="contains(.,'viaf')"> >+ <xsl:text>VIAF</xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="."/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </a> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:for-each> >+ </xsl:if> >+ > <xsl:choose> > <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise> > </xsl:choose> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 515f954..2176b32 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -817,6 +817,30 @@ > </xsl:element> > </a> > </xsl:if> >+ <!-- add link to external data like wikidata, viaf... --> >+ <xsl:if test="marc:subfield[@code='1']"> >+ <xsl:for-each select="marc:subfield[@code='1']"> >+ <span class="linkeddata_subj"> >+ <xsl:text> [</xsl:text> >+ <a> >+ <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute> >+ <xsl:attribute name="target">_blank</xsl:attribute> >+ <xsl:choose> >+ <xsl:when test="contains(.,'wikidata')"> >+ <xsl:text>Wikidata</xsl:text> >+ </xsl:when> >+ <xsl:when test="contains(.,'viaf')"> >+ <xsl:text>VIAF</xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="."/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </a> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:for-each> >+ </xsl:if> > </li> > </xsl:for-each> > </ul> >@@ -2143,6 +2167,30 @@ > </xsl:element> > </a> > </xsl:if> >+ <!-- add link to external data like wikidata, viaf... --> >+ <xsl:if test="(marc:subfield[@code='1'])"> >+ <xsl:for-each select="marc:subfield[@code='1']"> >+ <span class="linkeddata"> >+ <xsl:text> [</xsl:text> >+ <a> >+ <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute> >+ <xsl:attribute name="target">_blank</xsl:attribute> >+ <xsl:choose> >+ <xsl:when test="contains(.,'wikidata')"> >+ <xsl:text>Wikidata</xsl:text> >+ </xsl:when> >+ <xsl:when test="contains(.,'viaf')"> >+ <xsl:text>VIAF</xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="."/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </a> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:for-each> >+ </xsl:if> > </li> > </xsl:for-each> > </ul> >-- >2.43.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 22972
:
155890
|
155891
|
155892
|
170443
| 170444 |
170445