Bugzilla – Attachment 3072 Details for
Bug 5701
Distinction between authors/additional authors in staff normal view (MARC21/XSLT)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.txt (text/plain), 6.31 KB, created by
Marcel de Rooy
on 2011-02-07 13:14:03 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2011-02-07 13:14:03 UTC
Size:
6.31 KB
patch
obsolete
>From 8b5412abd0e493e712547ff130c606281b53ff46 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 7 Feb 2011 13:53:45 +0100 >Subject: [PATCH] Bug 5701: Distinction between authors/additional authors in staff normal view (MARC21/XSLT) >Content-Type: text/plain; charset="utf-8" > >At this time all entries in 100/110/111 and 700/710/711 are shown together. >We want to see the difference between an author and an added entry. (The 700 >author could for instance be an illustrator.) >To this end we like to see the eventual relator code or term in $4 or $e too >(displayed between brackets after the name). > >In the patch the code for authors is moved to a template routine at the end of >the xslt stylesheet. >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 94 +++++++++---------- > 1 files changed, 45 insertions(+), 49 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index edaf280..952c41e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -120,55 +120,9 @@ > </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]"> >- <xsl:attribute name="href">/cgi-bin/koha/catalogue/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/catalogue/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:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >- </xsl:for-each> >- >- <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]"> >- <a> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code=9]"> >- <xsl:attribute name="href">/cgi-bin/koha/catalogue/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/catalogue/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]"> >- <a> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code=9]"> >- <xsl:attribute name="href">/cgi-bin/koha/catalogue/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/catalogue/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> >+ <!-- Author Statement --> >+ <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/></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:call-template> > > <xsl:if test="$materialTypeCode!=''"> > <span class="results_summary"><span class="label">Type: </span> >@@ -835,4 +789,46 @@ > <xsl:value-of select="substring($str,1,string-length($str)-1)"/> > </xsl:template> > >+ <xsl:template name="showAuthor"> >+ <xsl:param name="authorfield"/> >+ <xsl:if test="count($authorfield)>0"> >+ <h5 class="author"> >+ <xsl:for-each select="$authorfield"> >+ <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]"> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/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/catalogue/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> >+ </h5> >+ </xsl:if> >+ </xsl:template> >+ > </xsl:stylesheet> >-- >1.6.0.6 >
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 5701
:
3071
| 3072