diff options
author | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2020-10-29 12:13:04 +0100 |
---|---|---|
committer | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2020-10-29 12:13:04 +0100 |
commit | ee43823179ee627ac16ea9da8168e5f1bf9619c0 (patch) | |
tree | 5e6c36d5629d2ce79f3cb1310998dc715a6f19c7 /templates/webmail/readmail.html.ep |
Initial commit; Stable version
Diffstat (limited to 'templates/webmail/readmail.html.ep')
-rw-r--r-- | templates/webmail/readmail.html.ep | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/templates/webmail/readmail.html.ep b/templates/webmail/readmail.html.ep new file mode 100644 index 0000000..f537d96 --- /dev/null +++ b/templates/webmail/readmail.html.ep @@ -0,0 +1,52 @@ +% layout 'mainlayout'; + +% my $mail_fmt = begin + % my ($category, $value) = @_; + <dt> <%= ucfirst l $category %> </dt> + <dd> <%= ref $value ? join(' ' . l('and') . ' ', map {"$_->{name} <$_->{address}>"} @$value) : $value %> </dd> +% end + +<div class=ow> + +<h1>Read Mail</h1> + +<dl id=show-head> + <dt> <%= uc l 'subject' %> </dt> + <dd> <%= $msg->{subject} %> </dd> +%= $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} }; + <dt> <%= uc l 'date' %> </dt> + <dd> <%= $msg->{date} %> </dd> + <dt> <%= uc l 'size' %> </dt> + <dd> <%= print_sizes10 $msg->{size} %> </dd> + <dt> <%= uc l 'content-type' %> </dt> + <dd> <%= $msg->{content_type} %> </dd> +</dl> + +% my $body = $msg->{body}; + +% if ($msg->{content_type} eq 'multipart/alternative') { +% for (reverse @$body) { + <div class=show-body> +% my $x = mime_render($_->{type}, $_->{val}); +%== $x; +% last if $x; + </div> +% } +% } +% elsif (ref $body eq 'HASH') { +% for (%$body) { + <div class=show-body> +%== mime_render($_->{type}, $_->{val}); + </div> +% } +% } +% else { + <div class=show-body> +%== mime_render($msg->{content_type}, $body); + </div> +% } + +</div>
\ No newline at end of file |