Bug 8210: add links to authorities to headings in OPAC
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. Revised version of the patch adds a space between the heading and the magnifying glass. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Patch works nicely. If a library does not like to see the magnifying glass/link to the authority, it's easy to disable it by adding the line .authlink {display:none;} to OpacUserCSS.
This commit is contained in:
parent
4feb6a4736
commit
237a43b361
3 changed files with 40 additions and 0 deletions
|
@ -2706,6 +2706,10 @@ ul.ui-tabs-nav li {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.authlink {
|
||||
padding-left: 0.25em;
|
||||
}
|
||||
|
||||
/* jQuery UI Datepicker */
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border : 0; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { background : transparent none; padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
|
|
|
@ -505,6 +505,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>
|
||||
|
@ -912,6 +918,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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue