Bugzilla – Attachment 31050 Details for
Bug 12726
Show RDA tag 264 on OPAC Results XSLT view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12726: Show RDA tag 264 on OPAC Results XSLT view (MARC21)
Bug-12726-Show-RDA-tag-264-on-OPAC-Results-XSLT-vi.patch (text/plain), 9.26 KB, created by
Marcel de Rooy
on 2014-08-21 13:15:43 UTC
(
hide
)
Description:
Bug 12726: Show RDA tag 264 on OPAC Results XSLT view (MARC21)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-08-21 13:15:43 UTC
Size:
9.26 KB
patch
obsolete
>From 2082ca3ba923c5041f1250acb49843d634fd2e9c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 7 Aug 2014 09:25:41 +0200 >Subject: [PATCH] Bug 12726: Show RDA tag 264 on OPAC Results XSLT view > (MARC21) >Content-Type: text/plain; charset=utf-8 > >This patch adds the same information to the Publisher line of OPAC Results >as bug 12724 did on OPAC Detail. >To accomplish this and reduce repeated code, two XSLT routines (named >templates) are moved from OPACDetail to MARC21slimUtils. > >Test plan (see also bug 12742 and the rules mentioned there): >[1] Add tag 260 and some 264s to your MARC21 record. >[2] Check the display of OPAC Details. Should not have changed. >[3] Now check also the display of this record in OPAC Results. >[4] Change some indicators in the record. Check OPAC Results again. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >On top of 12724, no change on detail, more data on results. >No koha-qa errors >--- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 61 ------------------- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 16 +++++- > .../bootstrap/en/xslt/MARC21slimUtils.xsl | 62 ++++++++++++++++++++ > 3 files changed, 76 insertions(+), 63 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index f79f92d..4c017e1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1070,67 +1070,6 @@ > <xsl:text>.</xsl:text> > </xsl:template> > >- <xsl:template name="showRDAtag264"> >- <!-- Depending on how many tags you have, we will pick by preference >- Publisher-latest or Publisher or 'Other'-latest or 'Other' >- The preferred tag is saved in the fav variable and passed to a >- helper named-template --> >- <xsl:choose> >- <xsl:when test="marc:datafield[@tag=264 and @ind1=3 and @ind2=1]"> >- <!-- ind1==3 means latest change --> >- <!-- ind2==1 means Publisher --> >- <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3 and @ind2=1][1]"/> >- <xsl:call-template name="showRDAtag264helper"> >- <xsl:with-param name="field" select="$fav"/> >- </xsl:call-template> >- </xsl:when> >- >- <xsl:when test="marc:datafield[@tag=264 and @ind2=1]"> >- <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind2=1][last()]"/> >- <xsl:call-template name="showRDAtag264helper"> >- <xsl:with-param name="field" select="$fav"/> >- </xsl:call-template> >- </xsl:when> >- >- <xsl:when test="marc:datafield[@tag=264 and @ind1=3]"> >- <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3][1]"/> >- <xsl:call-template name="showRDAtag264helper"> >- <xsl:with-param name="field" select="$fav"/> >- </xsl:call-template> >- </xsl:when> >- >- <xsl:otherwise> >- <xsl:variable name="fav" select="marc:datafield[@tag=264][last()]"/> >- <xsl:call-template name="showRDAtag264helper"> >- <xsl:with-param name="field" select="$fav"/> >- </xsl:call-template> >- </xsl:otherwise> >- </xsl:choose> >- </xsl:template> >- <xsl:template name="showRDAtag264helper"> >- <xsl:param name="field"/> >- <xsl:variable name="ind2" select="$field/@ind2"/> >- <xsl:choose> >- <xsl:when test="$ind2='0'"> >- <span class="label">Producer: </span> >- </xsl:when> >- <xsl:when test="$ind2='1'"> >- <span class="label">Publisher: </span> >- </xsl:when> >- <xsl:when test="$ind2='2'"> >- <span class="label">Distributor: </span> >- </xsl:when> >- <xsl:when test="$ind2='3'"> >- <span class="label">Manufacturer: </span> >- </xsl:when> >- </xsl:choose> >- <xsl:value-of select="$field/marc:subfield[@code='a']"/> >- <xsl:text> </xsl:text> >- <xsl:value-of select="$field/marc:subfield[@code='b']"/> >- <xsl:text> </xsl:text> >- <xsl:value-of select="$field/marc:subfield[@code='c']"/> >- </xsl:template> >- > <xsl:template name="nameABCQ"> > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 9dba489..96e3d19 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -886,7 +886,9 @@ > </xsl:call-template> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=260]"> >+ <!-- Publisher info and RDA related info from tags 260, 264 --> >+ <xsl:choose> >+ <xsl:when test="marc:datafield[@tag=260]"> > <span class="results_summary publisher"><span class="label">Publisher: </span> > <xsl:for-each select="marc:datafield[@tag=260]"> > <xsl:if test="marc:subfield[@code='a']"> >@@ -910,8 +912,18 @@ > </xsl:call-template> > <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:if test="marc:datafield[@tag=264]"> >+ <xsl:text>; </xsl:text> >+ <xsl:call-template name="showRDAtag264"/> >+ </xsl:if> > </span> >- </xsl:if> >+ </xsl:when> >+ <xsl:when test="marc:datafield[@tag=264]"> >+ <span class="results_summary"> >+ <xsl:call-template name="showRDAtag264"/> >+ </span> >+ </xsl:when> >+ </xsl:choose> > > <!-- Dissertation note --> > <xsl:if test="marc:datafield[@tag=502]"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >index 9599566..4780b7b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >@@ -188,7 +188,69 @@ > </span> > </xsl:if> > </xsl:for-each> >+ </xsl:template> >+ >+ <xsl:template name="showRDAtag264"> >+ <!-- Function showRDAtag264 shows selected information from tag 264 >+ on the Publisher line (used by OPAC Detail and Results) >+ Depending on how many tags you have, we will pick by preference >+ Publisher-latest or Publisher or 'Other'-latest or 'Other' >+ The preferred tag is saved in the fav variable and passed to a >+ helper named-template --> >+ <xsl:choose> >+ <xsl:when test="marc:datafield[@tag=264 and @ind1=3 and @ind2=1]"> >+ <!-- ind1==3 means latest change --> >+ <!-- ind2==1 means Publisher --> >+ <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3 and @ind2=1][1]"/> >+ <xsl:call-template name="showRDAtag264helper"> >+ <xsl:with-param name="field" select="$fav"/> >+ </xsl:call-template> >+ </xsl:when> >+ >+ <xsl:when test="marc:datafield[@tag=264 and @ind2=1]"> >+ <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind2=1][last()]"/> >+ <xsl:call-template name="showRDAtag264helper"> >+ <xsl:with-param name="field" select="$fav"/> >+ </xsl:call-template> >+ </xsl:when> > >+ <xsl:when test="marc:datafield[@tag=264 and @ind1=3]"> >+ <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3][1]"/> >+ <xsl:call-template name="showRDAtag264helper"> >+ <xsl:with-param name="field" select="$fav"/> >+ </xsl:call-template> >+ </xsl:when> >+ >+ <xsl:otherwise> >+ <xsl:variable name="fav" select="marc:datafield[@tag=264][last()]"/> >+ <xsl:call-template name="showRDAtag264helper"> >+ <xsl:with-param name="field" select="$fav"/> >+ </xsl:call-template> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:template> >+ <xsl:template name="showRDAtag264helper"> >+ <xsl:param name="field"/> >+ <xsl:variable name="ind2" select="$field/@ind2"/> >+ <xsl:choose> >+ <xsl:when test="$ind2='0'"> >+ <span class="label">Producer: </span> >+ </xsl:when> >+ <xsl:when test="$ind2='1'"> >+ <span class="label">Publisher: </span> >+ </xsl:when> >+ <xsl:when test="$ind2='2'"> >+ <span class="label">Distributor: </span> >+ </xsl:when> >+ <xsl:when test="$ind2='3'"> >+ <span class="label">Manufacturer: </span> >+ </xsl:when> >+ </xsl:choose> >+ <xsl:value-of select="$field/marc:subfield[@code='a']"/> >+ <xsl:text> </xsl:text> >+ <xsl:value-of select="$field/marc:subfield[@code='b']"/> >+ <xsl:text> </xsl:text> >+ <xsl:value-of select="$field/marc:subfield[@code='c']"/> > </xsl:template> > > </xsl:stylesheet> >-- >1.7.7.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 12726
:
30566
|
30595
|
31049
|
31050
|
32424