%
local is_locked = ntob(thread.is_locked)
local can_post = (not is_locked and not me:is_guest()) or me:is_mod()
%>
<% for i, post in ipairs(posts) do %>
<% render("views.threads.post", {post = post, is_latest = i == #posts}) %>
<% end %>
<% if is_locked then -%>
<% render("views.common.infobox", {kind = constants.InfoboxKind.LOCK, msg = "This thread is locked."}) %>
<% end -%>
<% if can_post then %>
Respond to "<%= thread.title %>"
<% render("views.common.babycode-editor", {ta_name="post_content"}) %>
<% end %>