Bugzilla – Attachment 109968 Details for
Bug 5927
Show series information in search results page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5927: [Alternate] Show series information in staff and opac results pages
Bug-5927-Alternate-Show-series-information-in-staf.patch (text/plain), 44.76 KB, created by
Nick Clemens (kidclamp)
on 2020-09-11 18:47:48 UTC
(
hide
)
Description:
Bug 5927: [Alternate] Show series information in staff and opac results pages
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-09-11 18:47:48 UTC
Size:
44.76 KB
patch
obsolete
>From 66d4c31ae9b5b364d36f1e480bdf80abacab0a87 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 11 Sep 2020 18:44:13 +0000 >Subject: [PATCH] Bug 5927: [Alternate] Show series information in staff and > opac results pages > >This moves the series info to a template in the XSLT utils files and adds a >few variables to make it work right. > >To test: >1 - Create a catalog records with: > 440 series fields > 490 traced series fields > 490 untraced series fields >2 - View the details pages for these records and note the display and the links formed >3 - Apply patch >4 - Confirm the details pages look the same >5 - Search on staff and opac to return the records >6 - Confirm the results pages form the same series as on details >7 - Confirm the links work the same >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 160 +------------------- > .../prog/en/xslt/MARC21slim2intranetResults.xsl | 7 + > .../intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 161 +++++++++++++++++++++ > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 158 +------------------- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 8 + > .../bootstrap/en/xslt/MARC21slimUtils.xsl | 161 +++++++++++++++++++++ > 6 files changed, 347 insertions(+), 308 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 16f727a0e1..6d0d9e649a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -190,135 +190,12 @@ > <xsl:with-param name="index">se</xsl:with-param> > </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/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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:if test="../marc:datafield[@tag=490][@ind1!=1]"> >- <xsl:text>; </xsl:text> >- </xsl:if> >- </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/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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]"> >- <xsl:choose> >- <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >- <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></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:when> >- <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >- <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></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:when> >- <xsl:otherwise> >- <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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: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:for-each select="marc:datafield[@tag=830]"> >- <xsl:choose> >- <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >- <a href="/cgi-bin/koha/catalogue/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:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >- <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></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:when> >- <xsl:otherwise> >- <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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: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:call-template name="show-series"> >+ <xsl:with-param name="searchurl">/cgi-bin/koha/catalogue/search.pl</xsl:with-param> >+ <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/> >+ <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> >+ </xsl:call-template> > > <!-- Analytics information --> > <xsl:variable name="leader7_class"> >@@ -1396,33 +1273,6 @@ > </xsl:call-template> > </xsl:template> > >- <xsl:template name="part"> >- <xsl:variable name="partNumber"> >- <xsl:call-template name="specialSubfieldSelect"> >- <xsl:with-param name="axis">n</xsl:with-param> >- <xsl:with-param name="anyCodes">n</xsl:with-param> >- <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> >- </xsl:call-template> >- </xsl:variable> >- <xsl:variable name="partName"> >- <xsl:call-template name="specialSubfieldSelect"> >- <xsl:with-param name="axis">p</xsl:with-param> >- <xsl:with-param name="anyCodes">p</xsl:with-param> >- <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> >- </xsl:call-template> >- </xsl:variable> >- <xsl:if test="string-length(normalize-space($partNumber))"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString" select="$partNumber"/> >- </xsl:call-template> >- </xsl:if> >- <xsl:if test="string-length(normalize-space($partName))"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString" select="$partName"/> >- </xsl:call-template> >- </xsl:if> >- </xsl:template> >- > <xsl:template name="specialSubfieldSelect"> > <xsl:param name="anyCodes"/> > <xsl:param name="axis"/> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index be70b9abcb..d263de1ea1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -16,6 +16,7 @@ > > <!-- Option: Display Alternate Graphic Representation (MARC 880) --> > <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/> >+ <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/> > > <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/> > <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/> >@@ -839,6 +840,12 @@ > </xsl:call-template> > </xsl:if> > >+ <xsl:call-template name="show-series"> >+ <xsl:with-param name="searchurl">/cgi-bin/koha/catalogue/search.pl</xsl:with-param> >+ <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/> >+ <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> >+ </xsl:call-template> >+ > <!-- Publisher info and RDA related info from tags 260, 264 --> > <xsl:choose> > <xsl:when test="marc:datafield[@tag=264]"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index 7fb14ad515..0c019a2ca3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -397,6 +397,167 @@ > </xsl:if> > </xsl:template> > >+ <xsl:template name="part"> >+ <xsl:variable name="partNumber"> >+ <xsl:call-template name="specialSubfieldSelect"> >+ <xsl:with-param name="axis">n</xsl:with-param> >+ <xsl:with-param name="anyCodes">n</xsl:with-param> >+ <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:variable name="partName"> >+ <xsl:call-template name="specialSubfieldSelect"> >+ <xsl:with-param name="axis">p</xsl:with-param> >+ <xsl:with-param name="anyCodes">p</xsl:with-param> >+ <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:if test="string-length(normalize-space($partNumber))"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString" select="$partNumber"/> >+ </xsl:call-template> >+ </xsl:if> >+ <xsl:if test="string-length(normalize-space($partName))"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString" select="$partName"/> >+ </xsl:call-template> >+ </xsl:if> >+ </xsl:template> >+ >+ <xsl:template name="show-series"> >+ <xsl:param name="searchurl"/> >+ <xsl:param name="UseControlNumber"/> >+ <xsl:param name="UseAuthoritiesForTracings"/> >+ <!-- 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"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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:if test="../marc:datafield[@tag=490][@ind1!=1]"> >+ <xsl:text>; </xsl:text> >+ </xsl:if> >+ </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"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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]"> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></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:when> >+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></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:when> >+ <xsl:otherwise> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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: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:for-each select="marc:datafield[@tag=830]"> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <a href="/cgi-bin/koha/catalogue/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:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></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:when> >+ <xsl:otherwise> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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: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:template> >+ > </xsl:stylesheet> > > <!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp. >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index f507ea428e..909c9e26d4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -212,132 +212,11 @@ > </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="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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:if test="../marc:datafield[@tag=490][@ind1!=1]"> >- <xsl:text>; </xsl:text> >- </xsl:if> >- </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="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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]"> >- <xsl:choose> >- <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></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:when> >- <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></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:when> >- <xsl:otherwise> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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: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:for-each select="marc:datafield[@tag=830]"> >- <xsl:choose> >- <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >- <a href="/cgi-bin/koha/catalogue/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:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></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:when> >- <xsl:otherwise> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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: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:call-template name="show-series"> >+ <xsl:with-param name="searchurl">/cgi-bin/koha/opac-search.pl</xsl:with-param> >+ <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/> >+ <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> >+ </xsl:call-template> > > <!-- Analytics information --> > <xsl:variable name="leader7_class"> >@@ -1884,33 +1763,6 @@ > </xsl:call-template> > </xsl:template> > >- <xsl:template name="part"> >- <xsl:variable name="partNumber"> >- <xsl:call-template name="specialSubfieldSelect"> >- <xsl:with-param name="axis">n</xsl:with-param> >- <xsl:with-param name="anyCodes">n</xsl:with-param> >- <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> >- </xsl:call-template> >- </xsl:variable> >- <xsl:variable name="partName"> >- <xsl:call-template name="specialSubfieldSelect"> >- <xsl:with-param name="axis">p</xsl:with-param> >- <xsl:with-param name="anyCodes">p</xsl:with-param> >- <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> >- </xsl:call-template> >- </xsl:variable> >- <xsl:if test="string-length(normalize-space($partNumber))"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString" select="$partNumber"/> >- </xsl:call-template> >- </xsl:if> >- <xsl:if test="string-length(normalize-space($partName))"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString" select="$partName"/> >- </xsl:call-template> >- </xsl:if> >- </xsl:template> >- > <xsl:template name="specialSubfieldSelect"> > <xsl:param name="anyCodes"/> > <xsl:param name="axis"/> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index a0879f65d4..78aa361918 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -22,6 +22,8 @@ > <!-- Option: Display Alternate Graphic Representation (MARC 880) --> > <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/> > >+ <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/> >+ <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/> > <xsl:variable name="OPACResultsLibrary" select="marc:sysprefs/marc:syspref[@name='OPACResultsLibrary']"/> > <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> > <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/> >@@ -638,6 +640,12 @@ > </xsl:choose> > </p> > >+ <xsl:call-template name="show-series"> >+ <xsl:with-param name="searchurl">/cgi-bin/koha/opac-search.pl</xsl:with-param> >+ <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/> >+ <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> >+ </xsl:call-template> >+ > <xsl:if test="marc:datafield[@tag=250]"> > <span class="results_summary edition"> > <span class="label">Edition: </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >index bc8b4f75f9..564dbd17f9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >@@ -361,6 +361,167 @@ > </xsl:if> > </xsl:template> > >+ <xsl:template name="show-series"> >+ <xsl:param name="searchurl"/> >+ <xsl:param name="UseControlNumber"/> >+ <xsl:param name="UseAuthoritiesForTracings"/> >+ <!-- 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"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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:if test="../marc:datafield[@tag=490][@ind1!=1]"> >+ <xsl:text>; </xsl:text> >+ </xsl:if> >+ </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"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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]"> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></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:when> >+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></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:when> >+ <xsl:otherwise> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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: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:for-each select="marc:datafield[@tag=830]"> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <a href="/cgi-bin/koha/catalogue/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:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></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:when> >+ <xsl:otherwise> >+ <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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: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:template> >+ >+ <xsl:template name="part"> >+ <xsl:variable name="partNumber"> >+ <xsl:call-template name="specialSubfieldSelect"> >+ <xsl:with-param name="axis">n</xsl:with-param> >+ <xsl:with-param name="anyCodes">n</xsl:with-param> >+ <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:variable name="partName"> >+ <xsl:call-template name="specialSubfieldSelect"> >+ <xsl:with-param name="axis">p</xsl:with-param> >+ <xsl:with-param name="anyCodes">p</xsl:with-param> >+ <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:if test="string-length(normalize-space($partNumber))"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString" select="$partNumber"/> >+ </xsl:call-template> >+ </xsl:if> >+ <xsl:if test="string-length(normalize-space($partName))"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString" select="$partName"/> >+ </xsl:call-template> >+ </xsl:if> >+ </xsl:template> >+ > </xsl:stylesheet> > > <!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp. >-- >2.11.0
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 5927
:
109033
|
109070
|
109106
|
109115
|
109118
|
109119
|
109757
|
109968
|
109995
|
109996