diff options
Diffstat (limited to 'views/message_outbox.ejs')
-rw-r--r-- | views/message_outbox.ejs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/views/message_outbox.ejs b/views/message_outbox.ejs index c7ff379..a5d1abd 100644 --- a/views/message_outbox.ejs +++ b/views/message_outbox.ejs @@ -1,4 +1,7 @@ -<%- include('header', { title: "Outbox" }) %> +<%- include('header', { title: "Outbox" }) -%> +<style> +.unread { background-color: lightyellow; } +</style> <script> function delete_all() { let warning = "Are you sure you want to delete ALL the messages?"; @@ -9,10 +12,14 @@ function delete_all() { <table class="post"> <tr><th>To<th>Subject<th>Date <% if (messages.length > 0) { messages.forEach((row) => { %> -<tr class="<%- row.read ? "read" : "unread" %>"> -<td class="author"><a href="/user/<%- row.to_name %>"><%= row.to_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.to_name %>"><%= row.to_name %></a> +<td><a href="/message/read/<%- row.message_id %>"><%= row.subject %></a> +<td><%= row.time %> <% }); } else { %> <tr><td colspan="3">No messages</td> <% } %> |