Currently, lines feeds typed in borrowernotes and opacnote are not visible in the interface. Patch is coming.
Created attachment 91905 [details] [review] Bug 23409 - show borrowernotes and opacnote's lines feeds Test plan: - Fill borrowernotes and opacnote with lines separated by lines endings, - save and check the content is displayed on a single line, - apply this patch, - check lines endings are displayed
Hi Alex, I think there is a nicer way to solve this using TT filters. I've seen them used in quite a few places already. http://www.template-toolkit.org/docs/manual/Filters.html#section_html_line_break
Created attachment 91906 [details] [review] Bug 23409 - show borrowernotes and opacnote's lines feeds Test plan: - Fill borrowernotes and opacnote with lines separated by lines endings, - save and check the content is displayed on a single line, - apply this patch, - check lines endings are displayed
Instead of: + [% FILTER html_line_break %] + [% patron.opacnote | html %] + [% END %] You can just do: [% patron.opacnote | html | html_line_break %] (I think we first want to espace, then make br so the br are not esacped)
(In reply to Katrin Fischer from comment #4) > Instead of: > > + [% FILTER html_line_break %] > + [% patron.opacnote | > html %] > + [% END %] > > You can just do: > > [% patron.opacnote | html | html_line_break %] > > (I think we first want to espace, then make br so the br are not esacped) Indeed, its much better ;) See existing : [% subscription.notes | html | html_line_break %]
patron.opacnote exists in other places : koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc borrowernotes exists in a lot of other places. BTW html filter should always be used, not $raw.
Hi Alex, will you have a chance to submit an updated patch?
Created attachment 92172 [details] [review] Bug 23409 - show borrowernotes and opacnote's lines feeds Test plan: - Fill borrowernotes and opacnote with lines separated by lines endings, - save and check the content is displayed on a single line, - apply this patch, - check lines endings are displayed
Created attachment 92173 [details] [review] Bug 23409: show borrowernotes and opacnote's lines feeds Test plan: - Fill borrowernotes and opacnote with lines separated by lines endings, - save and check the content is displayed on a single line, - apply this patch, - check lines endings are displayed
Created attachment 92246 [details] [review] Bug 23409: show borrowernotes and opacnote's lines feeds Test plan: - Fill borrowernotes and opacnote with lines separated by lines endings, - save and check the content is displayed on a single line, - apply this patch, - check lines endings are displayed Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 92247 [details] [review] Bug 23409: (follow-up) Allow HTML in circulation note and add line breaks in OPAC user account This patch makes 2 changes: - bug 22702 allowed adding HTML to the circulation note, so this patch restores that ability. - display OPAC note and messages as multi-line in OPAC To test: - Add a circulation and an OPAC note with line breaks and HTML tags to the patron account - Add a message with line breaks to the patron account - Check line breaks don't show on - OPAC > patron account > my summary page - Staff > patron account > details - Apply patches - Repeat test
Added a follow-up - can you check Alex? Changes in OPAC are debatable on this bug report, but I think we really need to put back the $raw because of bug 22702.
Created attachment 99712 [details] [review] Bug 23409: show borrowernotes and opacnote's lines feeds Test plan: - Fill borrowernotes and opacnote with lines separated by lines endings, - save and check the content is displayed on a single line, - apply this patch, - check lines endings are displayed Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 99713 [details] [review] Bug 23409: (follow-up) Allow HTML in circulation note and add line breaks in OPAC user account This patch makes 2 changes: - bug 22702 allowed adding HTML to the circulation note, so this patch restores that ability. - display OPAC note and messages as multi-line in OPAC To test: - Add a circulation and an OPAC note with line breaks and HTML tags to the patron account - Add a message with line breaks to the patron account - Check line breaks don't show on - OPAC > patron account > my summary page - Staff > patron account > details - Apply patches - Repeat test Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Notes and messages show line breaks in OPAC, Notes on staff HTML tags are processed in circulation notes No errors
Created attachment 101386 [details] [review] Bug 23409: show borrowernotes and opacnote's lines feeds Test plan: - Fill borrowernotes and opacnote with lines separated by lines endings, - save and check the content is displayed on a single line, - apply this patch, - check lines endings are displayed Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 101387 [details] [review] Bug 23409: (follow-up) Allow HTML in circulation note and add line breaks in OPAC user account This patch makes 2 changes: - bug 22702 allowed adding HTML to the circulation note, so this patch restores that ability. - display OPAC note and messages as multi-line in OPAC To test: - Add a circulation and an OPAC note with line breaks and HTML tags to the patron account - Add a message with line breaks to the patron account - Check line breaks don't show on - OPAC > patron account > my summary page - Staff > patron account > details - Apply patches - Repeat test Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Notes and messages show line breaks in OPAC, Notes on staff HTML tags are processed in circulation notes No errors Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work everyone! Pushed to master for 20.05
Backported to 19.11.x for 19.11.05
not backporting enchancment to 19.05.x