Bugzilla – Attachment 11359 Details for
Bug 8210
Headings in OPAC bib details should link to authority record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8210: add links to authorities to headings in OPAC
Bug-8210-add-links-to-authorities-to-headings-in-O.patch (text/plain), 5.74 KB, created by
Jared Camins-Esakov
on 2012-08-04 17:45:08 UTC
(
hide
)
Description:
Bug 8210: add links to authorities to headings in OPAC
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-08-04 17:45:08 UTC
Size:
5.74 KB
patch
obsolete
>From 9ff97f2f507440e72f1a7a9e2d177b6efab5cb87 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Sat, 4 Aug 2012 13:38:59 -0400 >Subject: [PATCH] Bug 8210: add links to authorities to headings in OPAC >Content-Type: text/plain; charset="UTF-8" > >At the moment, there is no way to get to an authority record from a bib >record that uses it other than doing a new search on the authority file. >This patch adds a link (a cute little magnifying glass) to linked >authority records on the OPAC detail view for MARC21 and NORMARC >with XSLT enabled. A follow-up patch will add the link to regular mode. >Because UNIMARC handles authorities differently, the link is not added >to the XSLT. > >Test plan: >1) Set OPACXSLTDetailsDisplay to 'default' >2) View a record that has some headings that are linked to authority > records in the OPAC (easiest way to find a record like that is to > edit a record and add some headings using the thesaurus plugin) >3) Observe the cute little magnifying glass links to the authority. >--- > .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 12 ++++++++++ > .../prog/en/xslt/NORMARCslim2OPACDetail.xsl | 24 ++++++++++++++++++++ > 2 files changed, 36 insertions(+), 0 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >index b6db8b4..906e053 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >@@ -506,6 +506,12 @@ > </xsl:with-param> > </xsl:call-template> > </a> >+ <xsl:if test="marc:subfield[@code=9]"> >+ <a class='authlink'> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >+ <img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/> >+ </a> >+ </xsl:if> > <xsl:choose> > <xsl:when test="position()=last()"></xsl:when> > <xsl:otherwise> | </xsl:otherwise> >@@ -909,6 +915,12 @@ > <xsl:text>]</xsl:text> > </xsl:if> > </a> >+ <xsl:if test="marc:subfield[@code=9]"> >+ <a class='authlink'> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >+ <img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/> >+ </a> >+ </xsl:if> > </xsl:for-each> > <xsl:text>.</xsl:text> > </xsl:template> >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl >index 3a77417..9cfec9a 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl >@@ -119,6 +119,12 @@ > </xsl:otherwise> > </xsl:choose> > <xsl:call-template name="nameABCDQ"/></a> >+ <xsl:if test="marc:subfield[@code=9]"> >+ <a class='authlink'> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >+ <img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/> >+ </a> >+ </xsl:if> > <xsl:choose> > <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> >@@ -134,6 +140,12 @@ > </xsl:otherwise> > </xsl:choose> > <xsl:call-template name="nameABCDN"/></a> >+ <xsl:if test="marc:subfield[@code=9]"> >+ <a class='authlink'> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >+ <img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/> >+ </a> >+ </xsl:if> > <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > >@@ -148,6 +160,12 @@ > </xsl:otherwise> > </xsl:choose> > <xsl:call-template name="nameACDEQ"/></a> >+ <xsl:if test="marc:subfield[@code=9]"> >+ <a class='authlink'> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >+ <img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/> >+ </a> >+ </xsl:if> > <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > > </xsl:for-each> >@@ -345,6 +363,12 @@ > </xsl:with-param> > </xsl:call-template> > </a> >+ <xsl:if test="marc:subfield[@code=9]"> >+ <a class='authlink'> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >+ <img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/> >+ </a> >+ </xsl:if> > <xsl:choose> > <xsl:when test="position()=last()"></xsl:when> > <xsl:otherwise> | </xsl:otherwise> >-- >1.7.2.5
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 8210
:
11359
|
11474
|
11480
|
11519
|
11584
|
11591
|
12261
|
12262