Bugzilla – Attachment 128041 Details for
Bug 17127
Can't hide MARC21 500 and others with NotesToHide
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17127: Remove notes from detail.tt to only use MARCNOTES
Bug-17127-Remove-notes-from-detailtt-to-only-use-M.patch (text/plain), 5.39 KB, created by
Florian
on 2021-11-26 14:31:12 UTC
(
hide
)
Description:
Bug 17127: Remove notes from detail.tt to only use MARCNOTES
Filename:
MIME Type:
Creator:
Florian
Created:
2021-11-26 14:31:12 UTC
Size:
5.39 KB
patch
obsolete
>From 4628e6c59d912e7f06de6c64fddb9cbc8a4e224d Mon Sep 17 00:00:00 2001 >From: Florian Bontemps <florian.bontemps@biblibre.com> >Date: Wed, 27 Oct 2021 12:50:42 +0000 >Subject: [PATCH] Bug 17127: Remove notes from detail.tt to only use MARCNOTES > >Notes come from the biblio table, but that table is already used to fill in MARCNOTES through Biblio.pm and get_marc_notes. >Get_marc_notes does check for NotesToHide and already read every note on the records, but .notes doesn't go through that same filter. >I don't see the point of keeping notes as a condition when MARCNOTES does the same job but better. > >To test: > 1) Take any record, or create one > 2) Input something in the 500 field (or 300 in UNIMARC) > 3) In Systempreferences -> NotesToHide, fill in the number 500 (or 300). > 4) Save, then go look at the record detail in the OPAC and admin website. > 5) You should still see the 500 or 300 field under the Description tab. > 6) Apply patch. > 7) Reload the record detail page. > 8) Observe the error is gone. >--- > .../prog/en/modules/catalogue/detail.tt | 10 ++-------- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 12 +++--------- > 2 files changed, 5 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 684a082ffa..3b56260668 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -268,7 +268,7 @@ > <a href="#holdings">Holdings ([% itemloop.size() || 0 | html %])</a> > </li> > [% END %] >-[% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions ([% ( MARCNOTES.size || 1 ) | html %])</a></li>[% END %] >+[% IF ( MARCNOTES ) %]<li><a href="#description">Descriptions ([% ( MARCNOTES.size || 1 ) | html %])</a></li>[% END %] > [% IF ComponentParts && ComponentParts.size %]<li id="components_tab"><a href="#components">Components ([% ComponentParts.size | html %])</a></li>[% END %] > [% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %] > [% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %] >@@ -650,12 +650,11 @@ Note that permanent location is a code, and location may be an authval. > </div> > [% END %] > >-[% IF ( MARCNOTES || notes ) %] >+[% IF ( MARCNOTES ) %] > > <div id="description"> > <div class="content_set"> > >-[% IF ( MARCNOTES ) %] > [% FOREACH MARCNOTE IN MARCNOTES %] > <p> > [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] >@@ -664,11 +663,6 @@ Note that permanent location is a code, and location may be an authval. > [% MARCNOTE.marcnote | html | html_line_break %] > [% END %] > </p> >- [% END %] >-[% ELSE %] >- [% IF ( notes ) %] >- <p>[% notes | html %]</p> >- [% END %] > [% END %] > </div> > </div> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 52a7cec016..c226da6dd0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -392,12 +392,10 @@ > [% IF (SeparateHoldings) %] > <li><a href="#otherholdings">Other holdings [% ' ( ' _ (otheritemloop.size || 0) _ ' )' | html %]</a></li> > [% END %] >- [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %] >+ [% IF ( MARCNOTES || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %] > [% SET title_notes_count = 0 %] > [% IF MARCNOTES %] > [% SET title_notes_count = MARCNOTES.size %] >- [% ELSIF notes %] >- [% SET title_notes_count = 1 %] > [% END %] > [% IF SYNDETICS_SUMMARY %][% SET title_notes_count = title_notes_count + 1 %][% END %] > <li id="tab_descriptions"> <a href="#descriptions">Title notes ( [% title_notes_count | html %] )</a></li> >@@ -562,7 +560,7 @@ > </div> > [% END # / SeparateHoldings %] > >- [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %] >+ [% IF ( MARCNOTES || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %] > <div id="descriptions"> > <div class="content_set"> > >@@ -583,15 +581,11 @@ > </p> > [% END %] > </div> >- [% ELSE %] >- [% IF ( notes ) %] >- <p>[% notes | html %]</p> >- [% END %] > [% END %] > > </div> <!-- /.content_set --> > </div> <!-- / #descriptions --> >- [% END # / IF MARCNOTES || notes %] >+ [% END # / IF MARCNOTES %] > > [% IF ComponentParts && ComponentParts.size %] > <div id="components"> >-- >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 17127
:
126990
|
128041
|
128049
|
128705