Bugzilla – Attachment 158517 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), 3.37 KB, created by
Martin Renvoize (ashimema)
on 2023-11-06 12:52:21 UTC
(
hide
)
Description:
Bug 30287: Conditionally render notice preview
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-11-06 12:52:21 UTC
Size:
3.37 KB
patch
obsolete
>From b5cfb15d517997fed48dc4d2d91e730299742b79 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. > >I replace the html_line_break for plaintext formatted notices too as I >believe this closer resembles how we actually output such generated >notices. >--- > .../intranet-tmpl/prog/en/modules/members/notices.tt | 9 +++++++-- > members/notices.pl | 2 +- > 2 files changed, 8 insertions(+), 3 deletions(-) > >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..45bb3a96f9c 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 %] >@@ -64,8 +65,12 @@ > [% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %] > <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> >- <iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.content | html | html_line_break %]"></iframe> >+ <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 %] ([% QUEUED_MESSAGE.content_type %])</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="<pre>[% QUEUED_MESSAGE.content | html %]</pre>"></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