From 654e450a3214a58a82b8f4a956461b5a34bd59a5 Mon Sep 17 00:00:00 2001 From: Owen Leonard <oleonard@myacpl.org> Date: Mon, 14 Jan 2013 09:30:21 -0500 Subject: [PATCH] [SIGNED-OFF] Bug 8661 [Revised] break out additional authors in opac like This patch takes the simple route of copying over the markup for displaying authors from the staff client XSL to the OPAC. Revision moves the position of the authority detail icon so that it falls inside delimiting punctuation. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Some notes about possible enhancements were added to the bug report. --- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 36 ++++++++------------ 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index fe08fd3..b0bf196 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -137,16 +137,10 @@ </xsl:call-template> </h5> </xsl:if> - <xsl:choose> - <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]"> - <h5 class="author">by - <xsl:call-template name="showAuthor"> - <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111 or @tag=700 or @tag=710 or @tag=711]"/> - <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> - </xsl:call-template> - </h5> - </xsl:when> - </xsl:choose> + + <!-- Author Statement --> + <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template> + <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template> <xsl:if test="$DisplayOPACiconsXSLT!='0'"> <xsl:if test="$materialTypeCode!=''"> @@ -893,17 +887,13 @@ <xsl:template name="showAuthor"> <xsl:param name="authorfield" /> <xsl:param name="UseAuthoritiesForTracings" /> + <xsl:if test="count($authorfield)>0"> + <h5 class="author"> <xsl:for-each select="$authorfield"> - <xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose> <xsl:choose> - <xsl:when test="not(@tag=111 or @tag=711)" /> - <xsl:when test="marc:subfield[@code='n']"> - <xsl:text> </xsl:text> - <xsl:call-template name="subfieldSelect"> - <xsl:with-param name="codes">n</xsl:with-param> - </xsl:call-template> - <xsl:text> </xsl:text> - </xsl:when> + <xsl:when test="position()>1"/> + <xsl:when test="@tag<700">Author(s): </xsl:when> + <xsl:otherwise>Additional author(s): </xsl:otherwise> </xsl:choose> <a> <xsl:choose> @@ -921,14 +911,12 @@ </xsl:choose> <!-- add relator code too between brackets--> <xsl:if test="marc:subfield[@code='4' or @code='e']"> - <span class="relatorcode"> <xsl:text> [</xsl:text> <xsl:choose> <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when> <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise> </xsl:choose> <xsl:text>]</xsl:text> - </span> </xsl:if> </a> <xsl:if test="marc:subfield[@code=9]"> @@ -937,8 +925,12 @@ <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> - <xsl:text>.</xsl:text> + </h5> + </xsl:if> </xsl:template> <xsl:template name="nameABCDQ"> -- 1.7.9.5