% my $sort_param = begin % my $param = shift; %= link_to url_with->query(sort => $param eq (param('sort') || '') ? '!' . $param : $param) => begin % no warnings qw(experimental::smartmatch); %= do { if (param('sort') eq '↑') { $param } elsif (param('sort') eq '↓') { '!' . $param } else { die } } %= ucfirst l $param; % end % end
% foreach my $msgnum ($pgn->{first_item} .. $pgn->{last_item}) { % my $msg = $msgs->[$msgnum - $pgn->{first_item}]; %= tag div => (class => $msg->{unread} ? 'media jwm-new-mail' : 'media') => (id => $msg->{message_handle}) => begin
%= $msgnum + 1
<%= $msg->{head}{sender}[0]{display_name} || $msg->{head}{sender}[0]{address} || $msg->{head}{from}[0]{display_name} || $msg->{head}{from}[0]{address}; %>
% my $date = $v->parse_iso_date($msg->{head}{date}); %= join('/', $date->{mday}, $date->{month}, $date->{year}) . " $date->{hour}:$date->{min}";
%= link_to $msg->{head}{subject} || '_' => read => {id => $msg->{message_handle}}
%= $v->print_sizes10($msg->{byte_size});
%= check_box mail => $msg->{message_handle} => (form => 'move-mail') => (class => 'jwm-mail-checkbox')
% end % }