Bugzilla – Attachment 149406 Details for
Bug 33281
Improve authority links and add them to MARC preview
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33281: Improve detail auth links and add to marc preview
Bug-33281-Improve-detail-auth-links-and-add-to-mar.patch (text/plain), 6.50 KB, created by
Katrin Fischer
on 2023-04-10 17:19:29 UTC
(
hide
)
Description:
Bug 33281: Improve detail auth links and add to marc preview
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-04-10 17:19:29 UTC
Size:
6.50 KB
patch
obsolete
>From 5309689d6fb0eda6625825e5a4128123e95060d2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 20 Mar 2023 16:53:15 +0000 >Subject: [PATCH] Bug 33281: Improve detail auth links and add to marc preview > >This patch adds atuh links tot he marc preview, and makes detial auth links open in a >new tab/window and consolidates some code > >To test: >1 - View a record linked to authorities in staff client >2 - Note links have no hover text, and open in same window >3 - Apply patch >4 - Restart and reload >5 - Note links now have a hint >6 - Note they open in new window >7 - View marc preview and note there are similar links > >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 48 +++++++++---------- > .../intranet-tmpl/prog/en/xslt/plainMARC.xsl | 16 ++++++- > 2 files changed, 39 insertions(+), 25 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 78f2043b57..736ee197a9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -686,14 +686,9 @@ > </a> > > <xsl:if test="marc:subfield[@code=9]"> >- <xsl:text> </xsl:text> >- <a class='authlink'> >- <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute> >- <xsl:element name="i"> >- <xsl:attribute name="class">fa fa-search</xsl:attribute> >- <xsl:attribute name="aria-label">View authority record</xsl:attribute> >- </xsl:element> >- </a> >+ <xsl:call-template name="showAuthlink"> >+ <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> > > <xsl:choose> >@@ -735,15 +730,11 @@ > </xsl:call-template> > </a> > >+ > <xsl:if test="marc:subfield[@code=9]"> >- <xsl:text> </xsl:text> >- <a class='authlink'> >- <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute> >- <xsl:element name="i"> >- <xsl:attribute name="class">fa fa-search</xsl:attribute> >- <xsl:attribute name="aria-label">View authority record</xsl:attribute> >- </xsl:element> >- </a> >+ <xsl:call-template name="showAuthlink"> >+ <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> > <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if> > </xsl:for-each> >@@ -1745,14 +1736,9 @@ > </xsl:if> > </a> > <xsl:if test="marc:subfield[@code=9]"> >- <xsl:text> </xsl:text> >- <a class='authlink'> >- <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute> >- <xsl:element name="i"> >- <xsl:attribute name="class">fa fa-search</xsl:attribute> >- <xsl:attribute name="aria-label">View authority record</xsl:attribute> >- </xsl:element> >- </a> >+ <xsl:call-template name="showAuthlink"> >+ <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> > <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> >@@ -1762,6 +1748,20 @@ > </xsl:if> > </xsl:template> > >+ <xsl:template name="showAuthlink"> >+ <xsl:param name="authid"/> >+ <xsl:text> </xsl:text> >+ <a class='authlink'> >+ <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="$authid"/></xsl:attribute> >+ <xsl:attribute name="title">View authority record</xsl:attribute> >+ <xsl:attribute name="target">_blank</xsl:attribute> >+ <xsl:element name="i"> >+ <xsl:attribute name="class">fa fa-search</xsl:attribute> >+ <xsl:attribute name="aria-label">View authority record</xsl:attribute> >+ </xsl:element> >+ </a> >+ </xsl:template> >+ > <!-- #1807 Strip unwanted parenthesis from subjects for searching --> > <xsl:template name="subfieldSelectSubject"> > <xsl:param name="codes"/> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl >index 48af81c38d..f2db0c47c1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl >@@ -51,7 +51,21 @@ > </xsl:template> > > <xsl:template match="marc:subfield"> >- <strong>_<xsl:value-of select="@code"/></strong> <xsl:value-of select="."/> >+ <strong>_<xsl:value-of select="@code"/></strong> >+ <xsl:text> </xsl:text> >+ <xsl:choose> >+ <xsl:when test="@code = '9'"> >+ <a> >+ <xsl:attribute name='href'>/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="."/></xsl:attribute> >+ <xsl:attribute name="title">View authority record</xsl:attribute> >+ <xsl:attribute name='target'>_blank</xsl:attribute> >+ <xsl:value-of select="."/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="."/> >+ </xsl:otherwise> >+ </xsl:choose> > <xsl:choose> > <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><br /></xsl:otherwise></xsl:choose> > </xsl:template> >-- >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 33281
:
148421
|
148974
| 149406