blob: fad8829212d0868c54037db0f33372d0e7c2d199 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<%- include('header', { title: thread.subject }) %>
<style>
table { width: 100%; max-width: 50em; }
td.body { white-space: pre-wrap; padding: 10px 10px; }
th.author { border-right: none; }
th.time { text-align: right; border-left: none; font-weight: normal; }
td.edit { text-align: right; border: none; }
</style>
<% posts.forEach((row) => { %>
<p>
<table>
<tr>
<th class="nowrap author"><%= row.author_name %>
<th class="nowrap time"><%= row.ctime %>
<%= row.edited ? "(edited " + row.mtime + ")" : "" %>
<tr>
<td class="body" colspan="2"><%- row.body %></td>
<% if (user) { %>
<tr>
<td class="edit" colspan=2>
<% if (row.author_id === user.user_id) { %>
<a href="/forum/edit/<%- row.post_id %>">Edit</a>
<% } %>
<a href="/forum/reply/<%- row.post_id %>">Reply</a>
<% } %>
</table>
<% }); %>
<%
if (user) {
%><p><a href="/forum/reply/<%- posts[0].post_id %>">Reply</a><%
}
%>
|