From ee43823179ee627ac16ea9da8168e5f1bf9619c0 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Thu, 29 Oct 2020 12:13:04 +0100 Subject: Initial commit; Stable version --- templates/headers/_display_headers.html.ep | 94 ++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 templates/headers/_display_headers.html.ep (limited to 'templates/headers/_display_headers.html.ep') diff --git a/templates/headers/_display_headers.html.ep b/templates/headers/_display_headers.html.ep new file mode 100644 index 0000000..67e60b4 --- /dev/null +++ b/templates/headers/_display_headers.html.ep @@ -0,0 +1,94 @@ +% my $sort_param = begin + % my $param = shift; + + + + % no warnings qw(experimental::smartmatch); + %= do { given (param('sort')) { '↑' when ($param); '↓' when ('!' . $param) } } + %= ucfirst l $param; + + + +% end + + + + + + + + + + + + + + + + + + %= $sort_param->('status'); + + %= $sort_param->('date'); + + + % if ($folder ne "SENT") { + %= $sort_param->('sender'); + % } else { + + % } + + %= $sort_param->('subject'); + + %= $sort_param->('size'); + + + + + + + + % foreach my $msgnum ($first_item .. $last_item) { + % my $msg = $msgs->[$msgnum - $first_item]; + + + + + + + + + + + + % } + +
<%= ucfirst l 'nr' %> + + <%= ucfirst l 'recipient' %> + % if (param('sort') eq "sender") { + v + % } elsif (param('sort') eq "recipient_rev") { + ^ + % } + + + + +
+ %= $msgnum + + %= ucfirst($msg->{is_multipart} ? l('yes') : l('no')); + + % sub d { qr/([[:digit:]]{$_[0]})/ } + % my ($year,$mon,$mday,$hour,$min,$sec) = $msg->{date} =~ m/@{[d(4).'-'.d(2).'-'.d(2).'T'.d(2).':'.d(2).':'.d(2).'Z']}/; + %= join('/', $mday, $mon, $year) . " $hour:$min"; + + %= $msg->{from}->[0]->{name} || $msg->{from}->[0]->{email}; + + <%= $msg->{subject} || '_' %> + + %= print_sizes10 $msg->{size}; + + +
\ No newline at end of file -- cgit v1.2.3