Bugzilla – Attachment 20653 Details for
Bug 8948
MARC21 field 787 doesn't display
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8948: MARC21 field 787 doesn't display
Bug-8948-MARC21-field-787-doesn-t-display.patch (text/plain), 9.97 KB, created by
Nuño López Ansótegui
on 2013-08-27 10:42:52 UTC
(
hide
)
Description:
Bug 8948: MARC21 field 787 doesn't display
Filename:
MIME Type:
Creator:
Nuño López Ansótegui
Created:
2013-08-27 10:42:52 UTC
Size:
9.97 KB
patch
obsolete
>From 16d74d3cb76e10cf427398ab4e6840abd89ed66a Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Nu=C3=B1o=20L=C3=B3pez=20Ans=C3=B3tegui?= <nunyo@masmedios.com> >Date: Tue, 27 Aug 2013 12:28:08 +0200 >Subject: [PATCH] Bug 8948: MARC21 field 787 doesn't display > >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 72 ++++++++++++++++++++ > .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 67 ++++++++++++++++++ > 2 files changed, 139 insertions(+), 0 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index caa0ab5..549ccbd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -826,6 +826,78 @@ > </xsl:for-each> > </xsl:if> > >+ <!-- 787 --> >+ <xsl:if test="marc:datafield[@tag=787]"> >+ <xsl:for-each select="marc:datafield[@tag=787]"> >+ <xsl:if test="@ind1=0"> >+ <span class="results_summary in"><span class="label"> >+ <xsl:choose> >+ <xsl:when test="@ind2=' '"> >+ Related item: >+ </xsl:when> >+ <xsl:when test="@ind2=8"> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <xsl:value-of select="marc:subfield[@code='i']"/> >+ </xsl:if> >+ </xsl:when> >+ </xsl:choose> >+ </span> >+ <xsl:variable name="f787"> >+ <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">at</xsl:with-param> >+ </xsl:call-template></xsl:with-param></xsl:call-template> >+ </xsl:variable> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <xsl:if test="marc:subfield[@code='t']"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute> >+ <xsl:value-of select="marc:subfield[@code='t']"/> >+ </a> >+ <xsl:if test="marc:subfield[@code='d']"> >+ <span class="label"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='d']"/></span> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='g']"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> >+ </xsl:if> >+ </xsl:when> >+ <xsl:when test="$UseControlNumber = '0'"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr<xsl:value-of select="marc:subfield[@code='t']"/></xsl:attribute> >+ <xsl:value-of select="marc:subfield[@code='t']"/> >+ </a> >+ <xsl:if test="marc:subfield[@code='d']"> >+ <span class="label"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='d']"/></span> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='g']"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> >+ </xsl:when> >+ <xsl:otherwise> >+ <a><xsl:if test="marc:subfield[@code='t']"><xsl:text></xsl:text><xsl:value-of select="marc:subfield[@code='t']"/></xsl:if></a> >+ <xsl:if test="marc:subfield[@code='d']"> >+ <span class="label"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='d']"/></span> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='g']"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> >+ </xsl:otherwise> >+ <xsl:when test="marc:subfield[@code='0']"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute> >+ <xsl:value-of select="$f787"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <a><xsl:if test="marc:subfield[@code='t']"><xsl:text></xsl:text><xsl:value-of select="marc:subfield[@code='t']"/></xsl:if></a> >+ <xsl:if test="marc:subfield[@code='d']"> >+ <span class="label"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='d']"/></span> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='g']"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> >+ </xsl:otherwise> >+ </xsl:choose> >+ </span> >+ >+ <xsl:if test="marc:subfield[@code='n']"> >+ <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span> >+ </xsl:if> >+ >+ </xsl:if> >+ </xsl:for-each> >+ </xsl:if> >+ > <xsl:if test="$OPACBaseURL!=''"> > <span class="results_summary"><span class="label">OPAC view: </span> > <a><xsl:attribute name="href">http://<xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>. >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >index fd0eb68..36fe682 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >@@ -939,6 +939,73 @@ > </xsl:for-each> > </xsl:if> > >+ <!-- 787 --> >+ <xsl:if test="marc:datafield[@tag=787]"> >+ <xsl:for-each select="marc:datafield[@tag=787]"> >+ <xsl:if test="@ind1=0"> >+ <span class="results_summary in"><span class="label"> >+ <xsl:choose> >+ <xsl:when test="@ind2=' '"> >+ Related item: >+ </xsl:when> >+ <xsl:when test="@ind2=8"> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <xsl:value-of select="marc:subfield[@code='i']"/> >+ </xsl:if> >+ </xsl:when> >+ </xsl:choose> >+ </span> >+ <xsl:variable name="f787"> >+ <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a_t</xsl:with-param> >+ </xsl:call-template></xsl:with-param></xsl:call-template> >+ </xsl:variable> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <xsl:if test="marc:subfield[@code='t']"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute> >+ <xsl:value-of select="marc:subfield[@code='t']"/> >+ </a> >+ <xsl:if test="marc:subfield[@code='d']"> >+ <span class="label"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='d']"/></span> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='g']"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> >+ </xsl:if> >+ </xsl:when> >+ <xsl:when test="$UseControlNumber = '0'"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="marc:subfield[@code='t']"/></xsl:attribute> >+ <xsl:value-of select="marc:subfield[@code='t']"/> >+ </a> >+ <xsl:if test="marc:subfield[@code='d']"> >+ <span class="label"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='d']"/></span> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='g']"><xsl:text></xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> >+ </xsl:when> >+ <xsl:otherwise> >+ <a><xsl:if test="marc:subfield[@code='t']"><xsl:text></xsl:text><xsl:value-of select="marc:subfield[@code='t']"/></xsl:if></a> >+ <xsl:if test="marc:subfield[@code='d']"> >+ <span class="label"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='d']"/></span> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='g']"><xsl:text> - </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> >+ </xsl:otherwise> >+ <xsl:when test="marc:subfield[@code='0']"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute> >+ <xsl:value-of select="$f787"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute> >+ <xsl:value-of select="$f787"/> >+ </a> >+ <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> >+ </xsl:otherwise> >+ </xsl:choose> >+ </span> >+ >+ </xsl:if> >+ </xsl:for-each> >+ </xsl:if> >+ > </xsl:template> > > <xsl:template name="showAuthor"> >-- >1.5.6.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 8948
:
20653
|
26946
|
142781
|
142782
|
142791
|
143083
|
143084
|
143111
|
143141
|
143142
|
143143
|
143562
|
143563
|
143564
|
143642
|
143684
|
143685
|
143686
|
143687