Bugzilla – Attachment 110218 Details for
Bug 15141
Add MARC21 770/772 to OPAC and staff detail pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15141: Add MARC21 770/772 Supplement (parent) to OPAC and staff detail pages
Bug-15141-Add-MARC21-770772-Supplement-parent-to-O.patch (text/plain), 12.11 KB, created by
Martin Renvoize (ashimema)
on 2020-09-16 15:19:38 UTC
(
hide
)
Description:
Bug 15141: Add MARC21 770/772 Supplement (parent) to OPAC and staff detail pages
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-09-16 15:19:38 UTC
Size:
12.11 KB
patch
obsolete
>From d5231739cf2c95af025978021c360864508d35c7 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 13 Sep 2020 16:07:44 +0000 >Subject: [PATCH] Bug 15141: Add MARC21 770/772 Supplement (parent) to OPAC and > staff detail pages > >Adds the 2 corresponding linking fields to the staff and OPAC detail pages: > >770 - Supplement/Special Issue Entry (R) >https://www.loc.gov/marc/bibliographic/bd770.html > >772 - Supplement Parent Entry (R) >https://www.loc.gov/marc/bibliographic/bd772.html > >To test: >- Catalog records with 770/772 in Koha, examples can be found in the LOC > documentation. > - When UseControlNumber is set to Use and $w is added, a link will be built using $w > - If there is no $w or UseControlNumber is Don't use, a link will be build using the title >- Verify that they display nicely in the OPAC and staff detail pages > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 84 ++++++++++++++++++ > .../en/xslt/MARC21slim2OPACDetail.xsl | 85 +++++++++++++++++++ > 2 files changed, 169 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 16f727a0e1..8e7774c03c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1203,6 +1203,90 @@ > </span> > </xsl:if> > >+ <!-- 770 - Supplement/Special issue entry --> >+ <xsl:if test="marc:datafield[@tag=770]"> >+ <span class="results_summary supplement"><span class="label">Supplement: </span> >+ <xsl:for-each select="marc:datafield[@tag=770]"> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <span class="770_rel_info"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">i</xsl:with-param> >+ </xsl:call-template> >+ <xsl:text> </xsl:text> >+ </span> >+ </xsl:if> >+ <a> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <xsl:attribute name="href"> >+ /cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template> >+ </xsl:attribute> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''),true())"/></xsl:attribute> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a_t</xsl:with-param> >+ </xsl:call-template> >+ </xsl:when> >+ </xsl:choose> >+ </a> >+ <xsl:text> </xsl:text> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param> >+ </xsl:call-template> >+ <xsl:choose> >+ <xsl:when test="position()=last()"></xsl:when> >+ <xsl:otherwise><span class="separator"> | </span></xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> >+ </span> >+ </xsl:if> >+ >+ <!-- 772 - Supplement parent entry --> >+ <xsl:if test="marc:datafield[@tag=772]"> >+ <span class="results_summary supplement_parent"><span class="label">Supplement to: </span> >+ <xsl:for-each select="marc:datafield[@tag=772]"> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <span class="772_rel_info"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">i</xsl:with-param> >+ </xsl:call-template> >+ <xsl:text> </xsl:text> >+ </span> >+ </xsl:if> >+ <a> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <xsl:attribute name="href"> >+ /cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template> >+ </xsl:attribute> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''),true())"/></xsl:attribute> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a_t</xsl:with-param> >+ </xsl:call-template> >+ </xsl:when> >+ </xsl:choose> >+ </a> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param> >+ </xsl:call-template> >+ <xsl:choose> >+ <xsl:when test="position()=last()"></xsl:when> >+ <xsl:otherwise><span class="separator"> | </span></xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> >+ </span> >+ </xsl:if> > > <!-- 775 Other Edition --> > <xsl:if test="marc:datafield[@tag=775]"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index f507ea428e..3b33257ce2 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1315,6 +1315,91 @@ > </span> > </xsl:if> > >+ <!-- 770 - Supplement/Special issue entry --> >+ <xsl:if test="marc:datafield[@tag=770]"> >+ <span class="results_summary supplement"><span class="label">Supplement: </span> >+ <xsl:for-each select="marc:datafield[@tag=770]"> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <span class="770_rel_info"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">i</xsl:with-param> >+ </xsl:call-template> >+ <xsl:text> </xsl:text> >+ </span> >+ </xsl:if> >+ <a> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <xsl:attribute name="href"> >+ /cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template> >+ </xsl:attribute> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''),true())"/></xsl:attribute> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a_t</xsl:with-param> >+ </xsl:call-template> >+ </xsl:when> >+ </xsl:choose> >+ </a> >+ <xsl:text> </xsl:text> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param> >+ </xsl:call-template> >+ <xsl:choose> >+ <xsl:when test="position()=last()"></xsl:when> >+ <xsl:otherwise><span class="separator"> | </span></xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> >+ </span> >+ </xsl:if> >+ >+ <!-- 772 - Supplement parent entry --> >+ <xsl:if test="marc:datafield[@tag=772]"> >+ <span class="results_summary supplement_parent"><span class="label">Supplement to: </span> >+ <xsl:for-each select="marc:datafield[@tag=772]"> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <span class="772_rel_info"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">i</xsl:with-param> >+ </xsl:call-template> >+ <xsl:text> </xsl:text> >+ </span> >+ </xsl:if> >+ <a> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <xsl:attribute name="href"> >+ /cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template> >+ </xsl:attribute> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''),true())"/></xsl:attribute> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a_t</xsl:with-param> >+ </xsl:call-template> >+ </xsl:when> >+ </xsl:choose> >+ </a> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param> >+ </xsl:call-template> >+ <xsl:choose> >+ <xsl:when test="position()=last()"></xsl:when> >+ <xsl:otherwise><span class="separator"> | </span></xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> >+ </span> >+ </xsl:if> >+ > <!-- 775 Other Edition --> > <xsl:if test="marc:datafield[@tag=775]"> > <span class="results_summary other_editions"><span class="label">Other editions: </span> >-- >2.20.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 15141
:
110026
|
110218
|
111756