Bugzilla – Attachment 111756 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.17 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-10-15 15:07:42 UTC
(
hide
)
Description:
Bug 15141: Add MARC21 770/772 Supplement (parent) to OPAC and staff detail pages
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-10-15 15:07:42 UTC
Size:
12.17 KB
patch
obsolete
>From e8beea8fc12930a3d833a52063aadda29c4b69d3 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> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../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 bd75f364d5a..535687e8379 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1145,6 +1145,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 eed5bf7b562..3e3fd462152 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1258,6 +1258,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.28.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 15141
:
110026
|
110218
| 111756