diff options
Diffstat (limited to 'templates/headers')
-rw-r--r-- | templates/headers/_display_bot_nav.html.ep | 45 | ||||
-rw-r--r-- | templates/headers/_display_headers.html.ep | 94 | ||||
-rw-r--r-- | templates/headers/_display_top_nav.html.ep | 33 | ||||
-rw-r--r-- | templates/headers/_displayfolders.html.ep | 26 |
4 files changed, 198 insertions, 0 deletions
diff --git a/templates/headers/_display_bot_nav.html.ep b/templates/headers/_display_bot_nav.html.ep new file mode 100644 index 0000000..107ac67 --- /dev/null +++ b/templates/headers/_display_bot_nav.html.ep @@ -0,0 +1,45 @@ +<table id=bot-nav width=100%> + + <colgroup> + <col width=70% /> + <col width=10% /> + <col width=20% /> + </colgroup> + + <tr> + <td> + %= include '_pagination1'; + </td> + + <td> + <label for=allbox><%= l 'check_all' %>: </label> + <input name=allbox type=checkbox onclick="check_all(this);"> + </td> + + <td> + <form id=move-mail action="<%= url_for('move') %>" method=post> + <label for=select-folder> <%= l('move') . ' ' . l('to') %> </label> + <select name=folder id=select-folder> + %== "<option value='$_'>$_</option>" for grep {$_ ne $folder} @$mail_folders; + </select> + + %= csrf_field + + <input type="submit" value="<%= l 'move' %>"> + </form> + + </td> + </tr> +</table> + + +<script> +function check_all(box) { + const setTo = box.checked; + const mails = document.getElementById('mail-headers').tBodies[0].rows; + + for (const m of mails) { + m.lastElementChild.children[0].checked = setTo; + } +} +</script>
\ No newline at end of file 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; + + <th class=sort-param> + <a href="<%= url_with->query(sort => (param('sort') || '') eq $param ? '!' . $param : $param) %>"> + % no warnings qw(experimental::smartmatch); + %= do { given (param('sort')) { '↑' when ($param); '↓' when ('!' . $param) } } + %= ucfirst l $param; + </a> + </th> + +% end + +<table id=mail-headers> + + <colgroup> + <col width=5% /> + <col width=10% /> + <col width=15% /> + <col width=25% /> + <col width=25% /> + <col width=10% /> + <col width=10% /> + </colgroup> + + <thead> + <tr id=sort> + <th> <%= ucfirst l 'nr' %> </th> + + %= $sort_param->('status'); + + %= $sort_param->('date'); + + + % if ($folder ne "SENT") { + %= $sort_param->('sender'); + % } else { + <th class=sort-param> + <a href="<%= url_with->query(sort => param('sort') ne '!sender' ? 'sender' : '!sender' ) %>"> + <%= ucfirst l 'recipient' %> + % if (param('sort') eq "sender") { + <IMG SRC="/down.gif" width="12" height="12" border="0" alt="v"> + % } elsif (param('sort') eq "recipient_rev") { + <IMG SRC="/up.gif" width="12" height="12" border="0" alt="^"> + % } + </a> + </th> + % } + + %= $sort_param->('subject'); + + %= $sort_param->('size'); + + <th> + <!-- <img src="/chkb.gif"> --> + <input type=checkbox checked=1 disabled=1> + </th> + </tr> + </thead> + + + <tbody> + % foreach my $msgnum ($first_item .. $last_item) { + % my $msg = $msgs->[$msgnum - $first_item]; + + <tr class="<%= $msg->{new} ? 'new-mail' : '' %>" id="<%= $msg->{mid} %>" > + <td> + %= $msgnum + </td> + <td> + %= ucfirst($msg->{is_multipart} ? l('yes') : l('no')); + </td> + <td> + % 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"; + </td> + <td> + %= $msg->{from}->[0]->{name} || $msg->{from}->[0]->{email}; + </td> + <td> + <a href="<%= url_for('read', id => $msg->{mid}) %>"> <%= $msg->{subject} || '_' %> </a> + </td> + <td> + %= print_sizes10 $msg->{size}; + </td> + <td> + <input type=checkbox name=mail value="<%= $msg->{mid} %>" form=move-mail> + </td> + </tr> + + % } + </tbody> +</table>
\ No newline at end of file diff --git a/templates/headers/_display_top_nav.html.ep b/templates/headers/_display_top_nav.html.ep new file mode 100644 index 0000000..5888cb3 --- /dev/null +++ b/templates/headers/_display_top_nav.html.ep @@ -0,0 +1,33 @@ +<table width=100%> + <tr> + + <td> + <ul class=line> + %# <a href="<%= url_with($prefsurl) %>"><%= TXT 'userconfig' %></a> + %# <a href="<%=$prefsurl%>?action=editaddresses&folder=<%=$folder%>&sessionid=<%=$thissession%>&sort=<%=$sort%>&firstmessage=<%=$firstmessage+1%>&lang=<%=$lang%>" ><%= TXT 'addressbook' %></a> + <li> + <a href="<%= url_for('logout') %>"><%= ucfirst l 'logout' %></a> + </li> + <li> + <a href="<%= url_for('write') %>" ><%= ucfirst l 'compose' %></a> + </li> + </ul> + </td> + + <td> + <form action="<%= url_for %>"> + <label for=search><%= ucfirst l 'search' %></label>: <input type=search name=search size=8> + </form> + </td> + + <td id=pag2> + %= include '_pagination2'; + </td> + + <td> + <!-- delete button --> + %# <form action="<%= url_for('delete_msg') %>" name=Formdel onsubmit="return confirm('<%= TXT q(js_confirm_delete) %>')" > </form> + </td> + + </tr> +</table>
\ No newline at end of file diff --git a/templates/headers/_displayfolders.html.ep b/templates/headers/_displayfolders.html.ep new file mode 100644 index 0000000..8cff0ed --- /dev/null +++ b/templates/headers/_displayfolders.html.ep @@ -0,0 +1,26 @@ +<table id=display-folders width=100%> + <tr> + + <td id=folder-list class=alter-font> + <strong class=up> <%= l($folder) || $folder %> </strong> + + <ul class=line> +% for my $v (grep {$_ ne $folder} @$mail_folders) { + <li><a href="<%= url_for(folder => $v) %>" class=bright> <%= $v ne '' ? (l($v) || $v) : l 'Home' %> </a></li> +% } + </ul> + </td> + + <td> + <em class=msg-count> + <%= $first_item %>-<%= $last_item %> <%= l 'of' %> <%= $total_items %> <%= l 'messages' %>\ + <%= ", $total_new_mails " . l('new') if $total_new_mails > 0; =%> + +% if ($total_size) { + - <%= ucfirst l('mbox_size') . ": " . print_sizes10 $total_size %> +% } + </em> + </td> + + </tr> +</table>
\ No newline at end of file |