summaryrefslogtreecommitdiff
path: root/views/message_inbox.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'views/message_inbox.ejs')
-rw-r--r--views/message_inbox.ejs23
1 files changed, 23 insertions, 0 deletions
diff --git a/views/message_inbox.ejs b/views/message_inbox.ejs
new file mode 100644
index 0000000..91490ac
--- /dev/null
+++ b/views/message_inbox.ejs
@@ -0,0 +1,23 @@
+<%- include('header', { title: "Inbox" }) %>
+<style>
+table { width: 100%; max-width: 50em; }
+tr.unread { background-color: lemonchiffon; }
+td.from { width: 5em; }
+td.time { text-align: right; width: 5em; }
+td a { color:black; text-decoration: none; }
+</style>
+<p>
+&#xbb; <a href="/message/send">Send message</a>
+<br>
+&#xbb; <a href="/outbox">Outbox</a>
+<table>
+<tr><th>From<th>Subject<th>Date
+<% if (messages.length > 0) { messages.forEach((row) => { %>
+<tr class="<%- row.read ? "read" : "unread" %>">
+<td class="nowrap from"><%= row.from_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>