Bugzilla – Attachment 158648 Details for
Bug 30287
Notices using HTML render differently in notices.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30287: Conditionally render notice preview
Bug-30287-Conditionally-render-notice-preview.patch (text/plain), 2.94 KB, created by
Martin Renvoize (ashimema)
on 2023-11-08 09:39:55 UTC
(
hide
)
Description:
Bug 30287: Conditionally render notice preview
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-11-08 09:39:55 UTC
Size:
2.94 KB
patch
obsolete
>From a4d85d927a946d19ca8b88f55bc3985aa3691fb1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 6 Nov 2023 12:50:05 +0000 >Subject: [PATCH] Bug 30287: Conditionally render notice preview > >This patch adds conditional formatting based on whether the notice was >generated from an HTML template or a plaintext one. We simply drop the >'html_line_break' filter for the case where the notice should already be >html formatted. > >I was tempted to replace the html_line_break for plaintext formatted >notices too as I believe this closer resembles how we actually output >such generated notices.. but I decided that should be for another bug. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt | 5 +++++ > members/notices.pl | 2 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >index 26260468033..bc5357a97bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >@@ -1,5 +1,6 @@ > [% USE raw %] > [% USE Asset %] >+[% USE String %] > [% USE Koha %] > [% USE AuthorisedValues %] > [% USE Branches %] >@@ -65,7 +66,11 @@ > <tr> > <td> > <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id | html %]" href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | uri %]&noticeid=[% QUEUED_MESSAGE.message_id | uri %]">[% QUEUED_MESSAGE.subject | html %]</a> >+ [% IF QUEUED_MESSAGE.content_type.search('html') %] >+ <iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.content | html %]"></iframe> >+ [% ELSE %] > <iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.content | html | html_line_break %]"></iframe> >+ [% END %] > </td> > <td> > [% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]<span>email</span> >diff --git a/members/notices.pl b/members/notices.pl >index 11f3faa917a..019b1430fff 100755 >--- a/members/notices.pl >+++ b/members/notices.pl >@@ -110,7 +110,7 @@ if ( $op eq 'send_password_reset' ) { > } > > # Getting the messages >-my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber}); >+my $queued_messages = Koha::Notice::Messages->search({borrowernumber => $borrowernumber}); > > $template->param( > patron => $patron, >-- >2.41.0
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 30287
:
158517
|
158519
|
158520
|
158648
|
158649
|
158650
|
158651
|
158652
|
158653
|
158654
|
158655
|
158656
|
158834
|
158869
|
158870
|
158871
|
158872
|
158873
|
158892
|
158893
|
158894
|
158895
|
159431
|
159432
|
159433
|
159434