diff options
Diffstat (limited to 'views/message_inbox.ejs')
-rw-r--r-- | views/message_inbox.ejs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/views/message_inbox.ejs b/views/message_inbox.ejs index e70e156..626662d 100644 --- a/views/message_inbox.ejs +++ b/views/message_inbox.ejs @@ -1,12 +1,19 @@ -<%- include('header', { title: "Inbox" }) %> +<%- include('header', { title: "Inbox" }) -%> +<style> +.unread { background-color: lightyellow; } +</style> <p><a href="/message/send">Send message</a> <table class="post"> <tr><th>From<th>Subject<th>Date <% if (messages.length > 0) { messages.forEach((row) => { %> -<tr class="<%- row.read ? "read" : "unread" %>"> -<td class="author"><a href="/user/<%- row.from_name %>"><%= row.from_name %></a> -<td class="subject"><a href="/message/read/<%- row.message_id %>"><%= row.subject %></a> -<td class="time"><%= row.time %> +<% if (row.read) { %> +<tr class="read"> +<% } else {%> +<tr> +<% } %> +<td><a href="/user/<%- row.from_name %>"><%= row.from_name %></a> +<td><a href="/message/read/<%- row.message_id %>"><%= row.subject %></a> +<td><%= row.time %> <% }); } else { %> <tr><td colspan="3">No messages</td> <% } %> |