Bugzilla – Attachment 7480 Details for
Bug 6496
authors appearing incorrectly in OPAC and Staff Client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6496 - correct the order of the author display in the OPAC
Bug-6496---correct-the-order-of-the-author-display.patch (text/plain), 7.72 KB, created by
Jared Camins-Esakov
on 2012-02-07 15:51:21 UTC
(
hide
)
Description:
Bug 6496 - correct the order of the author display in the OPAC
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-02-07 15:51:21 UTC
Size:
7.72 KB
patch
obsolete
>From 28a7d00f4d92fef6ef03b1d1f4b792e4cb0dcb10 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Thu, 2 Feb 2012 18:21:44 +1300 >Subject: [PATCH] Bug 6496 - correct the order of the author display in the OPAC >Content-Type: text/plain; charset="UTF-8" > >This sets the order the fields are displayed in to be as it is in the >MARC (typically numerical order), rather than 100,700,110,710,... like >it was. > >Basically, it's a port of the way it's done in the staff client. As >such, it should be able to handle a lot more than it could previously, >including relator codes. > >(replaces the previous commit, just removing an erronious comment and >making the commit message more accurate) > >Conflicts: > > koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 110 +++++++++----------- > 1 files changed, 50 insertions(+), 60 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >index 7074cc0..13812f0 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >@@ -126,68 +126,15 @@ > </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:for-each select="marc:datafield[@tag=100 or @tag=700]"> >- <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:call-template name="nameABCDQ"/></a> >- <xsl:choose> >- <xsl:when test="position()!=last()"><xsl:text>; </xsl:text></xsl:when></xsl:choose> >- </xsl:for-each> >- >- <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]"> >- <xsl:choose> >- <xsl:when test="position()=1"> >- <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:call-template name="nameABCDN"/></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:for-each select="marc:datafield[@tag=111 or @tag=711]"> >- <xsl:choose> >- <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 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: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:call-template name="nameACDEQ"/></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> >- </h5> >- </xsl:when> > </xsl:choose> > > <xsl:if test="$DisplayOPACiconsXSLT!='0'"> >@@ -905,6 +852,49 @@ > > </xsl:template> > >+ <xsl:template name="showAuthor"> >+ <xsl:param name="authorfield" /> >+ <xsl:param name="UseAuthoritiesForTracings" /> >+ <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:for-each> >+ <xsl:text>.</xsl:text> >+ </xsl:template> >+ > <xsl:template name="nameABCDQ"> > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> >-- >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 6496
:
4447
|
4448
|
4449
|
4450
|
5235
|
5343
|
5397
|
5399
|
5400
|
5409
|
5451
|
7419
|
7479
| 7480