From 27fe4d4fd53d93b668d13a72f8411f32ea9a4775 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 8 Nov 2023 16:41:02 +0000 Subject: [PATCH] Bug 18397: Add message delivery details to the notices tab This patch adds further delivery details to the notices tab in patron details in the staff client. Once a message is sent, we display the 'from:', 'to:' and 'cc:' addresses in the 'Delivery note' column when they exist. --- .../prog/en/modules/members/notices.tt | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 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..a6999b4ef7e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -94,20 +94,28 @@ [% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %] [% IF ( QUEUED_MESSAGE.failure_code ) %] - [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]Invalid borrowernumber [% borrowernumber | html %] - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]Unable to find an email address for this borrower - [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]Invalid [% matches.0 | html %] email address found [% borrowernumber | html %] - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]Missing from email address - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]Missing SMS number - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]Message is duplicate - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]No notes from SMS driver - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]Unhandled email failure, check the logs for further details - [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]Unknown error - [% ELSE %]Error occurred while sending email. + [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]Invalid borrowernumber [% borrowernumber | html %] + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]Unable to find an email address for this borrower + [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]Invalid [% matches.0 | html %] email address found [% borrowernumber | html %] + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]Missing from email address + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]Missing SMS number + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]Message is duplicate + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]No notes from SMS driver + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]Unhandled email failure, check the logs for further details + [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]Unknown error + [% ELSE %]Error occurred while sending email. [% END %] [% END %] - [% IF ( QUEUED_MESSAGE.cc_address ) %] - Notice copied to: [% QUEUED_MESSAGE.cc_address | html %] + [% IF ( QUEUED_MESSAGE.status == 'sent' ) %] + [% IF ( QUEUED_MESSAGE.from_address ) %] + from: [% QUEUED_MESSAGE.from_address | html %] + [% END %] + [% IF ( QUEUED_MESSAGE.to_address ) %] + to: [% QUEUED_MESSAGE.to_address | html %] + [% END %] + [% IF ( QUEUED_MESSAGE.cc_address ) %] + cc: [% QUEUED_MESSAGE.cc_address | html %] + [% END %] [% END %] -- 2.41.0