Bugzilla – Attachment 62531 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.89 KB, created by
Marcel de Rooy
on 2017-04-21 14:28:59 UTC
(
hide
)
Description:
Bug 15140: Add MARC21 776 to OPAC and staff display
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-04-21 14:28:59 UTC
Size:
5.89 KB
patch
obsolete
>From 59af3a6b7573fd7c30097bc73ce034fbdd9aee27 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 >Content-Type: text/plain; charset=utf-8 > >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> >--- > .../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 5ebecbf..36fa3c7 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 6bc54b1..fee0893 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