diff options
Diffstat (limited to 'templates/headers')
-rw-r--r-- | templates/headers/_display_bot_nav.html.ep | 18 | ||||
-rw-r--r-- | templates/headers/_display_folders.html.ep | 8 | ||||
-rw-r--r-- | templates/headers/_display_headers.html.ep | 15 | ||||
-rw-r--r-- | templates/headers/_pagination1.html.ep | 10 | ||||
-rw-r--r-- | templates/headers/_pagination2.html.ep | 10 |
5 files changed, 32 insertions, 29 deletions
diff --git a/templates/headers/_display_bot_nav.html.ep b/templates/headers/_display_bot_nav.html.ep index 5a58b77..7be2832 100644 --- a/templates/headers/_display_bot_nav.html.ep +++ b/templates/headers/_display_bot_nav.html.ep @@ -10,14 +10,16 @@ </div> <div class="pure-u-1-1 pure-u-md-1-2"> - %= form_for move => (id => 'move-mail') => (class => 'pure-form') => begin - <fieldset> - %= label_for 'select-folder' => l('move to') - %= select_field folder => [grep {$_ ne $folder} @$mail_folders] => (id => 'select-folder') - %= csrf_field - %= submit_button l('move') => (class => 'pure-button') - </fieldset> - % end + % if (grep {$_ ne $folder} @$mail_folders) { + %= form_for move => (id => 'move-mail') => (class => 'pure-form') => begin + <fieldset> + %= label_for 'select-folder' => l('move to') + %= select_field folder => [map { $_ ? $_ : l 'Home' } grep {$_ ne $folder} @$mail_folders] => (id => 'select-folder') + %= csrf_field + %= submit_button l('move') => (class => 'pure-button') + </fieldset> + % end + % } </div> </div> diff --git a/templates/headers/_display_folders.html.ep b/templates/headers/_display_folders.html.ep index 856844d..7f1612f 100644 --- a/templates/headers/_display_folders.html.ep +++ b/templates/headers/_display_folders.html.ep @@ -8,10 +8,10 @@ </strong> <ul class="pure-menu-list"> -% for my $v (grep {$_ ne $folder} @$mail_folders) { +% for (grep {$_ ne $folder} @$mail_folders) { <li class="pure-menu-item"> - %= link_to '' => {folder => $v} => (class => 'bright') => begin - %= l($v || '_mailbox_root') + %= link_to '' => {folder => $_} => (class => 'bright') => begin + %= l($_ || '_mailbox_root') % end </li> % } @@ -21,7 +21,7 @@ </div> <p class="pure-u-1-1 pure-u-md-1-2"> - <%= l('[_1] of [_2] messages', $last_item - $first_item + 1, $total_items) %>\ + <%= l('[_1] of [_2] messages', $this_page->[1] - $this_page->[0], $total_items) %>\ <%= l(', [_1] new', $total_new_mails) if $total_new_mails > 0 =%> <%= l(' - mailbox size: [_1]', print_sizes10 $total_size) if $total_size %> </p> diff --git a/templates/headers/_display_headers.html.ep b/templates/headers/_display_headers.html.ep index 42f927c..4dd36a1 100644 --- a/templates/headers/_display_headers.html.ep +++ b/templates/headers/_display_headers.html.ep @@ -66,9 +66,9 @@ % foreach my $msgnum ($first_item .. $last_item) { % my $msg = $msgs->[$msgnum - $first_item]; - %= tag tr => (class => $msg->{new} ? 'new-mail' : '') => (id => $msg->{mid}) => begin + %= tag tr => (class => $msg->{unread} ? 'new-mail' : '') => (id => $msg->{message_handle}) => begin <td class="hide-small"> - %= $msgnum + %= $msgnum + 1 </td> <td> @@ -76,7 +76,7 @@ <!-- <div class="pure-u-1-4"> - %# ucfirst($msg->{is_multipart} ? l('yes') : l('no')); + %# ucfirst($msg->{head}{mime}{content_maintype} eq 'multipart' ? l('yes') : l('no')); </div> --> @@ -86,22 +86,23 @@ </div> <div class="pure-u-16-24 pure-u-md-6-24"> - %= $msg->{head}{from}[0]{name} || $msg->{head}{from}[0]{email}; + <%= $msg->{head}{sender}[0]{display_name} || $msg->{head}{sender}[0]{address} || + $msg->{head}{from}[0]{display_name} || $msg->{head}{from}[0]{address}; %> </div> <div class="pure-u-20-24 pure-u-md-12-24"> - %= link_to $msg->{head}{subject} || '_' => read => {id => $msg->{mid}} + %= link_to $msg->{head}{subject} || '_' => read => {id => $msg->{message_handle}} </div> <div class="pure-u-4-24 pure-u-md-2-24"> - %= print_sizes10 $msg->{size}; + %= print_sizes10 $msg->{byte_size}; </div> </div> </td> <td> - %= check_box mail => $msg->{mid} => (form => 'move-mail') + %= check_box mail => $msg->{message_handle} => (form => 'move-mail') </td> % end diff --git a/templates/headers/_pagination1.html.ep b/templates/headers/_pagination1.html.ep index 9b6121a..0e000f9 100644 --- a/templates/headers/_pagination1.html.ep +++ b/templates/headers/_pagination1.html.ep @@ -1,7 +1,7 @@ <div> - <a href="<%= url_with->query({start => $prev_page->[0]-1}) %>"><img src="/left.gif" alt="←"></a> - <a href="<%= url_with->query({start => $first_page->[0]-1}) %>"><img src="/first.gif" alt="↞"></a> - [<%= l('page [_1] of [_2]', $current_page, $total_pages) %>] - <a href="<%= url_with->query({start => $last_page->[0]-1}) %>"><img src="/last.gif" alt="↠"></a> - <a href="<%= url_with->query({start => $next_page->[0]-1}) %>"><img src="/right.gif" alt="→"></a> + <a href="<%= url_with->query({start => $prev_page->[0]}) %>"> ← </a> + <a href="<%= url_with->query({start => $first_page->[0]}) %>"> ↞ </a> + [<%= l('page [_1] of [_2]', $current_page+1, $total_pages) %>] + <a href="<%= url_with->query({start => $last_page->[0]}) %>"> ↠ </a> + <a href="<%= url_with->query({start => $next_page->[0]}) %>"> → </a> </div> diff --git a/templates/headers/_pagination2.html.ep b/templates/headers/_pagination2.html.ep index 236e9bb..63e8f63 100644 --- a/templates/headers/_pagination2.html.ep +++ b/templates/headers/_pagination2.html.ep @@ -1,10 +1,10 @@ <div> %= form_for '' => (class => 'pure-form') => begin - <a href="<%= url_with->query({start => $first_page->[0]-1}) %>"><img src="/first.gif" alt="<%= l('first') . ' ' . l 'page' %>"></a> - <a href="<%= url_with->query({start => $prev_page->[0]-1}) %>"><img src="/left.gif" alt="<%= l('previous') . ' ' . l 'page' %>"></a> + <a href="<%= url_with->query({start => $first_page->[0]}) %>"><img src="/first.gif" alt="<%= l('first') . ' ' . l 'page' %>"></a> + <a href="<%= url_with->query({start => $prev_page->[0]}) %>"><img src="/left.gif" alt="<%= l('previous') . ' ' . l 'page' %>"></a> [ %= label_for custompage => ucfirst l 'page' - %= number_field start => (id => 'custompage') => (size => 3) => (placeholder => $current_page) + %= number_field start => (id => 'custompage') => (size => 3) => (placeholder => $current_page+1) %= l 'of' %= $total_pages ] @@ -16,7 +16,7 @@ % } % } - <a href="<%= url_with->query({start => $next_page->[0]-1}) %>"><img src="/right.gif" alt="<%= l('next') . ' ' . l 'page' %>"></a> - <a href="<%= url_with->query({start => $last_page->[0]-1}) %>"><img src="/last.gif" alt="<%= l('last') . ' ' . l('page') %>"></a> + <a href="<%= url_with->query({start => $next_page->[0]}) %>"><img src="/right.gif" alt="<%= l('next') . ' ' . l 'page' %>"></a> + <a href="<%= url_with->query({start => $last_page->[0]}) %>"><img src="/last.gif" alt="<%= l('last') . ' ' . l('page') %>"></a> % end </div> |