Bugzilla – Attachment 12069 Details for
Bug 8661
break out additional authors in opac like in staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8661 - break out additional authors in opac like in staff
Bug-8661---break-out-additional-authors-in-opac-li.patch (text/plain), 6.53 KB, created by
Owen Leonard
on 2012-09-07 17:52:14 UTC
(
hide
)
Description:
Bug 8661 - break out additional authors in opac like in staff
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-09-07 17:52:14 UTC
Size:
6.53 KB
patch
obsolete
>From a4c741d05f6c482ba390c5fb44ef19757e34ac48 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 7 Sep 2012 12:52:39 -0400 >Subject: [PATCH] Bug 8661 - break out additional authors in opac like in > staff >Content-Type: text/plain; charset="utf-8" > >This patch takes the simple route of copying over the markup >for displaying authors from the staff client XSL to the OPAC. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 91 +++++++++----------- > 1 file changed, 43 insertions(+), 48 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >index 8d54517..cc0d4d9 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!=''"> >@@ -873,47 +867,48 @@ > > </xsl:template> > >+ > <xsl:template name="showAuthor"> >- <xsl:param name="authorfield" /> >- <xsl:param name="UseAuthoritiesForTracings" /> >+ <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:choose> >- <a> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >- </xsl:when> >- <xsl:otherwise> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> >- </xsl:otherwise> >- </xsl:choose> >- <xsl:choose> >- <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when> >- <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when> >- <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when> >- </xsl:choose> >- <!-- add relator code too between brackets--> >- <xsl:if test="marc:subfield[@code='4' or @code='e']"> >- <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> >- </xsl:if> >- </a> >+ <xsl:choose> >+ <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> >+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:choose> >+ <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when> >+ <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when> >+ <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when> >+ </xsl:choose> >+ <!-- add relator code too between brackets--> >+ <xsl:if test="marc:subfield[@code='4' or @code='e']"> >+ <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> >+ </xsl:if> >+ </a> >+ <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
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 8661
:
11718
|
11719
|
12069
|
12073
|
13025
|
13054
|
13772
|
13804
|
13816
|
14056
|
15146
|
15212