Bugzilla – Attachment 151703 Details for
Bug 33780
Multi-line TT comment: [%% item.object.itemnotes.replace('\n','
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33780: Use TT html_line_break filter to format itemnotes
Bug-33780-Use-TT-htmllinebreak-filter-to-format-it.patch (text/plain), 2.09 KB, created by
Lucas Gass (lukeg)
on 2023-05-25 16:49:41 UTC
(
hide
)
Description:
Bug 33780: Use TT html_line_break filter to format itemnotes
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-05-25 16:49:41 UTC
Size:
2.09 KB
patch
obsolete
>From c47f9463471d67a257ce1df3cf0a428bb2753e41 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 25 May 2023 12:24:59 +0000 >Subject: [PATCH] Bug 33780: Use TT html_line_break filter to format itemnotes > >This patch removes a snippet of TT code which was causing problems with >translation. Putting HTML inside a TT replace() method resulted in TT >code being processed for translation. > >To test, apply the patch and edit an item record's public note field so >that it contains line breaks ("\n"). Since the notes field in the editor >is a text field, you might want to update the record in the database: > >update items set itemnotes = "Line 1\nLine 2\n\n\n\nLine 3" where >biblionumber = 228; > >View the bibliographic details page in the staff interface. The note in >the holdings table should have the correct line breaks. If you inspect >the HTML you should see that each "\n" has been replaced with "<br />" > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >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 cd48d884a0..dc0fef3516 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -591,7 +591,11 @@ > <td class="materials"> [% item.materials | html %] </td> > [% END %] > [% IF ( itemdata_itemnotes ) %] >- <td><div class="itemnotes">[% item.object.itemnotes.replace('\n','<br />') | $raw %]</div></td> >+ <td> >+ <div class="itemnotes"> >+ [% item.object.itemnotes | html | html_line_break %] >+ </div> >+ </td> > [% END %] > [% IF itemdata_nonpublicnotes %] > <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td> >-- >2.30.2
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 33780
:
151677
|
151703