diff options
Diffstat (limited to 'views/message_outbox.ejs')
-rw-r--r-- | views/message_outbox.ejs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/views/message_outbox.ejs b/views/message_outbox.ejs new file mode 100644 index 0000000..c460bd3 --- /dev/null +++ b/views/message_outbox.ejs @@ -0,0 +1,23 @@ +<%- include('header', { title: "Outbox" }) %> +<style> +table { width: 100%; max-width: 50em; } +tr.unread { background-color: lemonchiffon; } +td.to { width: 5em; } +td.time { text-align: right; width: 5em; } +td a { color:black; text-decoration: none; } +</style> +<p> +» <a href="/message/send">Send message</a> +<br> +» <a href="/inbox">Inbox</a> +<table> +<tr><th>To<th>Subject<th>Date +<% if (messages.length > 0) { messages.forEach((row) => { %> +<tr class="<%- row.read ? "read" : "unread" %>"> +<td class="nowrap to"><%= row.to_name %> +<td class="subject"><a href="/message/read/<%- row.message_id %>"><%= row.subject %></a> +<td class="nowrap time"><%= row.time %> +<% }); } else { %> +<tr><td colspan="3">No messages</td> +<% } %> +</table> |