Bugzilla – Attachment 37987 Details for
Bug 13433
655 display in XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 13433 - 655 display in XSLT
SIGNED-OFF-Bug-13433---655-display-in-XSLT.patch (text/plain), 7.55 KB, created by
Nick Clemens (kidclamp)
on 2015-04-16 19:23:52 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 13433 - 655 display in XSLT
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2015-04-16 19:23:52 UTC
Size:
7.55 KB
patch
obsolete
>From 739b829d0efa29759d82df10aeff211a1a4c685e Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Wed, 15 Apr 2015 21:15:38 -0400 >Subject: [PATCH] [SIGNED OFF] 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 > >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> >--- > .../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 9ff58e1..7a4f0db 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 bfaeb1b..79a8a62 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> >-- >1.9.1
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