Bugzilla – Attachment 127268 Details for
Bug 29406
Improve display of OPAC suppression message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29406: Improve display of OPAC suppression message
Bug-29406-Improve-display-of-OPAC-suppression-mess.patch (text/plain), 4.94 KB, created by
Owen Leonard
on 2021-11-03 15:37:32 UTC
(
hide
)
Description:
Bug 29406: Improve display of OPAC suppression message
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-11-03 15:37:32 UTC
Size:
4.94 KB
patch
obsolete
>From 7f7b7248338270f6f31c57ce5fbd5fc96fbc14b0 Mon Sep 17 00:00:00 2001 >From: Owen <oleonard@myacpl.org> >Date: Wed, 3 Nov 2021 15:27:26 +0000 >Subject: [PATCH] Bug 29406: Improve display of OPAC suppression message > >This patch changes the way the "Suppressed in OPAC" message is shown on >the staff interface search results and the bibliographic detail page. >Now the information is displayed like other bibliographic details. > >To test, apply the patch and restart services. > >- Enable the OpacSuppression system preference and modify at least one > record to be suppressed in the OPAC (942$n in MARC21). >- Perform a catalog search which will return this record in the staff > client. >- The entry for that record in the search results should include the > message "Suppressed in OPAC" at the bottom of the list of other > bibliographic details. >- View the details for that record. You should see a line labeled "OPAC > view" It should say "Suppressed in OPAC." >- Test a record which is not suppressed. If you have OPACBaseURL > populated you should see "OPAC view: Open in new window." >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 30 +++++++++++-------- > .../en/xslt/MARC21slim2intranetResults.xsl | 15 +++++----- > 2 files changed, 26 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index d7cdb80a03..6983988867 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -97,13 +97,6 @@ > </xsl:choose> > </xsl:variable> > >- <!-- Indicate if record is suppressed in OPAC --> >- <xsl:if test="$OpacSuppression = 1"> >- <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']"> >- <span class="results_summary suppressed_opac">Suppressed in OPAC</span> >- </xsl:if> >- </xsl:if> >- > <!-- Title Statement --> > <!-- Alternate Graphic Representation (MARC 880) --> > <xsl:if test="$display880"> >@@ -1428,11 +1421,24 @@ > </xsl:for-each> > </xsl:if> > >- <xsl:if test="$OPACBaseURL!=''"> >- <span class="results_summary opac_view"><span class="label">OPAC view: </span> >- <a><xsl:attribute name="href"><xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:datafield[@tag=999]/marc:subfield[@code='c'], true())"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>. >- </span> >- </xsl:if> >+ <!-- Indicate if record is suppressed in OPAC --> >+ <xsl:choose> >+ <xsl:when test="$OpacSuppression = 1 and marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']"> >+ <span class="results_summary suppressed_opac"> >+ <span class="label">OPAC view: </span> >+ Suppressed in OPAC >+ </span> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:if test="$OPACBaseURL!=''"> >+ <span class="results_summary opac_view"><span class="label">OPAC view: </span> >+ <a><xsl:attribute name="href"><xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:datafield[@tag=999]/marc:subfield[@code='c'], true())"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>. >+ </span> >+ </xsl:if> >+ </xsl:otherwise> >+ </xsl:choose> >+ >+ > > </xsl:template> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index aa11b41975..ab6bbb9530 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -283,13 +283,6 @@ > --> > </xsl:variable> > >- <!-- Indicate if record is suppressed in OPAC --> >- <xsl:if test="$OpacSuppression = 1"> >- <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']"> >- <span class="results_summary suppressed_opac">Suppressed in OPAC</span> >- </xsl:if> >- </xsl:if> >- > <!-- Title Statement: Alternate Graphic Representation (MARC 880) --> > <xsl:if test="$display880"> > <xsl:call-template name="m880Select"> >@@ -1016,6 +1009,14 @@ > </xsl:for-each> > </span> > </xsl:if> >+ >+ <!-- Indicate if record is suppressed in OPAC --> >+ <xsl:if test="$OpacSuppression = 1"> >+ <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']"> >+ <span class="results_summary suppressed_opac">Suppressed in OPAC</span> >+ </xsl:if> >+ </xsl:if> >+ > </xsl:template> > > <xsl:template name="nameABCQ"> >-- >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 29406
:
127266
|
127267
|
127268
|
127406
|
127491