26 lines
919 B
Plaintext
26 lines
919 B
Plaintext
<% local is_locked = ntob(thread.is_locked) %>
|
|
<main>
|
|
<nav class="darkbg">
|
|
<h1 class="thread-title"><%= thread.title %></h1>
|
|
<span>Posted in <a href="<%= url_for("topic", {slug = topic.slug}) %>"><%= topic.name %></a></span>
|
|
</nav>
|
|
<% for i, post in ipairs(posts) do %>
|
|
<% render("views.threads.post", {post = post, is_latest = i == #posts}) %>
|
|
<% end %>
|
|
</main>
|
|
|
|
<nav id="bottomnav">
|
|
<% render("views.common.pagination", {page_count = pages, current_page = page}) %>
|
|
</nav>
|
|
|
|
<% if is_locked then -%>
|
|
<% render("views.common.infobox", {kind = constants.InfoboxKind.LOCK, msg = "This thread is locked."}) %>
|
|
<% end -%>
|
|
<% if not me:is_guest() and not is_locked then %>
|
|
<h1>Respond to "<%= thread.title %>"</h1>
|
|
<form method="post">
|
|
<textarea id="post_content" name="post_content" placeholder="Response body" required></textarea><br>
|
|
<input type="submit" value="Post reply">
|
|
</form>
|
|
<% end %>
|