Bugzilla – Attachment 65185 Details for
Bug 15140
Add MARC21 776 to OPAC and staff display
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15140: Add MARC21 776 to OPAC and staff display
Bug-15140-Add-MARC21-776-to-OPAC-and-staff-display.patch (text/plain), 5.97 KB, created by
Nick Clemens (kidclamp)
on 2017-07-21 14:10:44 UTC
(
hide
)
Description:
Bug 15140: Add MARC21 776 to OPAC and staff display
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-07-21 14:10:44 UTC
Size:
5.97 KB
patch
obsolete
>From a8d23601486d30366890dc943bf6ca9240653815 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 16 Mar 2017 12:37:12 +0100 >Subject: [PATCH] Bug 15140: Add MARC21 776 to OPAC and staff display > >Adds code to opac and staff detail XSLT in order to show 776$t (or $a) and >a link based on 776$w (record control number). $w should be in the form: > (MARCOrgCode)Record-number >For instance: (NL-AmRIJ)12345 > >Note: You should have enabled default opac/intranet XSLT view. > >Test plan: >[1] Add two 776s (one with $t and $w and one with $t only) >[2] Verify that you see "Additional physical formats" on opac-detail. Does > the link for $w work? >[3] Check intranet detail too. >[4] Empty 776$t and put text in $a. Check detail page again. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 43 ++++++++++++++++++++++ > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 43 ++++++++++++++++++++++ > 2 files changed, 86 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 55192cd..23131bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -753,6 +753,49 @@ > </span> > </xsl:if> > >+<!-- MARC21 776 Additional Physical Form Entry --> >+ <xsl:if test="marc:datafield[@tag=776]"> >+ <span class="results_summary add_physical_form"> >+ <span class="label">Additional physical formats: </span> >+ <xsl:for-each select="marc:datafield[@tag=776]"> >+ <xsl:variable name="linktext"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='t']"> >+ <xsl:value-of select="marc:subfield[@code='t']"/> >+ </xsl:when> >+ <xsl:when test="marc:subfield[@code='a']"> >+ <xsl:value-of select="marc:subfield[@code='a']"/> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>No title</xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:variable> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='w']"> >+ <a> >+ <xsl:attribute name="href"> >+ <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=Control-number:</xsl:text> >+ <xsl:call-template name="extractControlNumber"> >+ <xsl:with-param name="subfieldW"> >+ <xsl:value-of select="marc:subfield[@code='w']"/> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:attribute> >+ <xsl:value-of select="$linktext"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="$linktext"/> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:if test="position() != last()"> >+ <xsl:text>; </xsl:text> >+ </xsl:if> >+ </xsl:for-each> >+ </span> >+ </xsl:if> >+ > <!-- DDC classification --> > <xsl:if test="marc:datafield[@tag=082]"> > <span class="results_summary ddc"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 658fc36..74da731 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -805,6 +805,49 @@ > </span> > </xsl:if> > >+<!-- MARC21 776 Additional Physical Form Entry --> >+ <xsl:if test="marc:datafield[@tag=776]"> >+ <span class="results_summary add_physical_form"> >+ <span class="label">Additional physical formats: </span> >+ <xsl:for-each select="marc:datafield[@tag=776]"> >+ <xsl:variable name="linktext"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='t']"> >+ <xsl:value-of select="marc:subfield[@code='t']"/> >+ </xsl:when> >+ <xsl:when test="marc:subfield[@code='a']"> >+ <xsl:value-of select="marc:subfield[@code='a']"/> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>No title</xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:variable> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='w']"> >+ <a> >+ <xsl:attribute name="href"> >+ <xsl:text>/cgi-bin/koha/opac-search.pl?q=Control-number:</xsl:text> >+ <xsl:call-template name="extractControlNumber"> >+ <xsl:with-param name="subfieldW"> >+ <xsl:value-of select="marc:subfield[@code='w']"/> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:attribute> >+ <xsl:value-of select="$linktext"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="$linktext"/> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:if test="position() != last()"> >+ <xsl:text>; </xsl:text> >+ </xsl:if> >+ </xsl:for-each> >+ </span> >+ </xsl:if> >+ > <!-- DDC classification --> > <xsl:if test="marc:datafield[@tag=082]"> > <span class="results_summary ddc"> >-- >2.1.4
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 15140
:
61161
|
61162
|
61351
|
62531
|
62908
|
63232
|
63233
| 65185 |
65186
|
65187