From e1bafc13858b5c72a7584c52d3d9d6d597d39e6b Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Tue, 31 Aug 2021 20:23:03 +0200 Subject: restructured ipc format --- templates/headers/_display_headers.html.ep | 6 +++--- templates/webmail/readmail.html.ep | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'templates') diff --git a/templates/headers/_display_headers.html.ep b/templates/headers/_display_headers.html.ep index da04873..d3f9457 100644 --- a/templates/headers/_display_headers.html.ep +++ b/templates/headers/_display_headers.html.ep @@ -71,14 +71,14 @@ %= ucfirst($msg->{is_multipart} ? l('yes') : l('no')); - % my $date = parse_iso_date $msg->{date_received}; + % my $date = parse_iso_date $msg->{head}{date}; %= join('/', $date->{mday}, $date->{month}, $date->{year}) . " $date->{hour}:$date->{min}"; - %= $msg->{from}->[0]->{name} || $msg->{from}->[0]->{email}; + %= $msg->{head}{from}[0]{name} || $msg->{head}{from}[0]{email}; - <%= $msg->{subject} || '_' %> + <%= $msg->{head}{subject} || '_' %> %= print_sizes10 $msg->{size}; diff --git a/templates/webmail/readmail.html.ep b/templates/webmail/readmail.html.ep index 8c2432a..0a9fde0 100644 --- a/templates/webmail/readmail.html.ep +++ b/templates/webmail/readmail.html.ep @@ -12,25 +12,25 @@
<%= uc l 'subject' %>
-
<%= $msg->{subject} %>
-%= $mail_fmt->('from', $msg->{from}); -%= $mail_fmt->('to', $msg->{to}); -%= $mail_fmt->('cc', $msg->{cc}) if !ref $msg->{cc} || @{ $msg->{cc} }; -%= $mail_fmt->('bcc', $msg->{bcc}) if !ref $msg->{bcc} || @{ $msg->{cc} }; +
<%= $msg->{head}{subject} %>
+%= $mail_fmt->('from', $msg->{head}{from}); +%= $mail_fmt->('to', $msg->{head}{to}); +%= $mail_fmt->('cc', $msg->{head}{cc}) if !ref $msg->{head}{cc} || @{ $msg->{head}{cc} }; +%= $mail_fmt->('bcc', $msg->{head}{bcc}) if !ref $msg->{head}{bcc} || @{ $msg->{head}{bcc} };
<%= uc l 'date' %>
-
<%= $msg->{date_received} %>
+
<%= $msg->{head}{date} %>
<%= uc l 'size' %>
<%= print_sizes10 $msg->{size} %>
<%= uc l 'content-type' %>
-
<%= $msg->{content_type} %>
+
<%= $msg->{head}{content_type} %>
% my $body = $msg->{body}; -% if ($msg->{content_type} eq 'multipart/alternative') { +% if ($msg->{head}{content_type} eq 'multipart/alternative') { % for (reverse @$body) {
-% my $x = mime_render($_->{type}, $_->{val}); +% my $x = mime_render($_->{head}{content_type}, $_->{body}); %== $x;
% last if $x; @@ -39,13 +39,13 @@ % elsif (ref $body eq 'HASH') { % for (%$body) {
-%== mime_render($_->{type}, $_->{val}); +%== mime_render($_->{head}{content_type}, $_->{body});
% } % } % else {
-%== mime_render($msg->{content_type}, $body); +%== mime_render($msg->{head}{content_type}, $body);
% } -- cgit v1.2.3