Bugzilla – Attachment 40637 Details for
Bug 13600
XSLT: 8xx not showing if there is no 4xx
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13600 - XSLT: 8xx not showing if there is no 4xx
Bug-13600---XSLT-8xx-not-showing-if-there-is-no-4x.patch (text/plain), 12.28 KB, created by
Winona Salesky
on 2015-06-25 14:36:25 UTC
(
hide
)
Description:
Bug 13600 - XSLT: 8xx not showing if there is no 4xx
Filename:
MIME Type:
Creator:
Winona Salesky
Created:
2015-06-25 14:36:25 UTC
Size:
12.28 KB
patch
obsolete
>From 57be79c470260ef5e75fa017d28d0ab5696ea31b Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Thu, 25 Jun 2015 10:35:47 -0400 >Subject: [PATCH] Bug 13600 - XSLT: 8xx not showing if there is no 4xx > >Removes dependency on 490 ind1 for 8xx display. 8xx will always display. >Adds span class="separator" | between multiple series, changes : before $v to a conditional ; >Adds patch to staff details interface. > >Test Plan: >1) Apply this patch >2) Ensure you are using the default XSLT setting for the staff and opac details view. >3) Find or create a record with MARC tags 800, 810, 830 >4) Check display of 8xx tags, should always display if present in the record. >6) Repeat test for the staff interface >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 18 ++-- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 103 +++++++++++---------- > 2 files changed, 61 insertions(+), 60 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 73a2126..a3c9ef2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -176,7 +176,7 @@ > </xsl:if> > > <!-- Series --> >- <xsl:if test="marc:datafield[@tag=440 or @tag=490]"> >+ <xsl:if test="marc:datafield[@tag=440 or @tag=490 or @tag=800 or @tag=810 or @tag=811 or @tag=830]"> > <span class="results_summary series"><span class="label">Series: </span> > <!-- 440 --> > <xsl:for-each select="marc:datafield[@tag=440]"> >@@ -190,7 +190,7 @@ > </xsl:call-template> > </a> > <xsl:call-template name="part"/> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> > </xsl:for-each> > > <!-- 490 Series not traced, Ind1 = 0 --> >@@ -205,10 +205,9 @@ > </xsl:call-template> > </a> > <xsl:call-template name="part"/> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> > </xsl:for-each> >- <!-- 490 Series traced, Ind1 = 1 --> >- <xsl:if test="marc:datafield[@tag=490][@ind1=1]"> >+ <!-- 800,810,811,830 always display. --> > <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]"> > <xsl:choose> > <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >@@ -235,11 +234,12 @@ > <xsl:call-template name="part"/> > </xsl:otherwise> > </xsl:choose> >- <xsl:text>: </xsl:text> >- <xsl:value-of select="marc:subfield[@code='v']" /> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:if test="marc:subfield[@code='v']"> >+ <xsl:text> ; </xsl:text> >+ <xsl:value-of select="marc:subfield[@code='v']" /> >+ </xsl:if> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> > </xsl:for-each> >- </xsl:if> > > </span> > </xsl:if> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 695c39f..5ce292a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -198,73 +198,74 @@ > </xsl:call-template> > </xsl:if> > >- <!-- Series --> >- <xsl:if test="marc:datafield[@tag=440 or @tag=490]"> >- <span class="results_summary series"><span class="label">Series: </span> >- <!-- 440 --> >- <xsl:for-each select="marc:datafield[@tag=440]"> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">av</xsl:with-param> >- </xsl:call-template> >- </xsl:with-param> >- </xsl:call-template> >- </a> >- <xsl:call-template name="part"/> >- <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> >- >- <!-- 490 Series not traced, Ind1 = 0 --> >- <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]"> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">av</xsl:with-param> >- </xsl:call-template> >- </xsl:with-param> >- </xsl:call-template> >- </a> >- <xsl:call-template name="part"/> >- <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> >- <!-- 490 Series traced, Ind1 = 1 --> >- <xsl:if test="marc:datafield[@tag=490][@ind1=1]"> >- <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]"> >- <xsl:choose> >- <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >- <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}"> >+ <!-- Series --> >+ <xsl:if test="marc:datafield[@tag=440 or @tag=490 or @tag=800 or @tag=810 or @tag=811 or @tag=830]"> >+ <span class="results_summary series"><span class="label">Series: </span> >+ <!-- 440 --> >+ <xsl:for-each select="marc:datafield[@tag=440]"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> > <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:with-param name="codes">av</xsl:with-param> > </xsl:call-template> > </xsl:with-param> > </xsl:call-template> > </a> >- </xsl:when> >- <xsl:otherwise> >+ <xsl:call-template name="part"/> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> >+ </xsl:for-each> >+ >+ <!-- 490 Series not traced, Ind1 = 0 --> >+ <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]"> > <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> > <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:with-param name="codes">av</xsl:with-param> > </xsl:call-template> > </xsl:with-param> > </xsl:call-template> > </a> > <xsl:call-template name="part"/> >- </xsl:otherwise> >- </xsl:choose> >- <xsl:text>: </xsl:text> >- <xsl:value-of select="marc:subfield[@code='v']" /> >- <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> >- </span> >- </xsl:if> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> >+ </xsl:for-each> >+ >+ <!-- 800,810,811,830 always display. --> >+ <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]"> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}"> >+ <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> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> >+ <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> >+ </a> >+ <xsl:call-template name="part"/> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:if test="marc:subfield[@code='v']"> >+ <xsl:text> ; </xsl:text> >+ <xsl:value-of select="marc:subfield[@code='v']" /> >+ </xsl:if> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> >+ </xsl:for-each> >+ </span> >+ </xsl:if> > > <!-- Analytics --> > <xsl:if test="$leader7='s'"> >-- >2.3.2 (Apple Git-55)
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 13600
:
40097
|
40106
|
40107
|
40207
|
40636
|
40637
|
140705
|
140706
|
140736
|
142530
|
142588
|
142589
|
143069
|
143566
|
143567
|
143568