Bugzilla – Attachment 37937 Details for
Bug 13433
655 display in XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13433 - 655 display in XSLT
Bug-13433---655-display-in-XSLT.patch (text/plain), 7.51 KB, created by
Winona Salesky
on 2015-04-16 01:20:55 UTC
(
hide
)
Description:
Bug 13433 - 655 display in XSLT
Filename:
MIME Type:
Creator:
Winona Salesky
Created:
2015-04-16 01:20:55 UTC
Size:
7.51 KB
patch
obsolete
>From d8f0fe2ff7a711125fab271b0ad270e68269c67b Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Wed, 15 Apr 2015 21:15:38 -0400 >Subject: [PATCH] Bug 13433 - 655 display in XSLT > >Test Plan: >1) Apply this patch >2) Ensure you are using the default XSLT setting for the staff and opac record details >3) Find or create a record with MARC tags 655 >4) Perform an opac search and select records with 655 field that would show the record in the search results >5) Note this patch adds field 655 to display. Displays subfields a,v,x,y,z. uses a vertical bar to separate multiple titles. Vertical bar is wrapped in span class="separator" for easy suppression/customization of separator. >6) Repeat steps 4 and 5 for the staff interface >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 25 ++++++++++++++++++++-- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 25 ++++++++++++++++++++-- > 2 files changed, 46 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 9a08801..0b3afc0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -525,9 +525,9 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> >+ <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]"> > <span class="results_summary subjects"><span class="label">Subject(s): </span> >- <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> >+ <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]"> > <a> > <xsl:choose> > <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >@@ -569,9 +569,30 @@ > <xsl:if test="marc:datafield[@tag=655]"> > <span class="results_summary genre"><span class="label">Genre/Form: </span> > <xsl:for-each select="marc:datafield[@tag=655]"> >+ <a> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >+ <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:when test="$TraceSubjectSubdivisions='1'"> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">avxyz</xsl:with-param> >+ <xsl:with-param name="delimeter"> AND </xsl:with-param> >+ <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> >+ <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> >+ </xsl:call-template> >+ </xsl:attribute> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute> >+ </xsl:otherwise> >+ </xsl:choose> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">avxyz</xsl:with-param> >+ <xsl:with-param name="subdivCodes">vxyz</xsl:with-param> >+ <xsl:with-param name="subdivDelimiter">-- </xsl:with-param> > </xsl:call-template> >+ </a> > <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if> > </xsl:for-each> > </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index f70d086..45c6581 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -572,9 +572,9 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> >+ <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]"> > <span class="results_summary subjects"><span class="label">Subject(s): </span> >- <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> >+ <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]"> > <span property="keywords"> > <a> > <xsl:choose> >@@ -629,8 +629,29 @@ > <xsl:if test="marc:datafield[@tag=655]"> > <span class="results_summary genre"><span class="label">Genre/Form: </span> > <xsl:for-each select="marc:datafield[@tag=655]"> >+ <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:when test="$TraceSubjectSubdivisions='1'"> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">avxyz</xsl:with-param> >+ <xsl:with-param name="delimeter"> AND </xsl:with-param> >+ <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> >+ <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> >+ </xsl:call-template> >+ </xsl:attribute> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute> >+ </xsl:otherwise> >+ </xsl:choose> >+ </a> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">avxyz</xsl:with-param> >+ <xsl:with-param name="subdivCodes">vxyz</xsl:with-param> >+ <xsl:with-param name="subdivDelimiter">-- </xsl:with-param> > </xsl:call-template> > <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if> > </xsl:for-each> >-- >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 13433
:
36918
|
37937
|
37986
|
37987
|
38102
|
38103