<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%=truncate(@thread.title, length: 60, omission: " …") %>

<%= render partial: "labels/label", locals: {label: @thread.label} %><%= title @thread.title %>

<%= link_to(@thread.author.avatar(64), @thread.author, title: @thread.author.ign) %> <%= render partial: "users/username", locals: { user: @thread.author } %> <%= link_to p do %> <%= ago @thread.created_at %> <% end %> <%= link_to "edit", edit_forumthread_path( @thread), class: "editlink" if mod? || @thread.author.is?(current_user) %>
<% if @thread.edited? %>
Last edited <%= ago @thread.updated_at %> by <%= link_to @thread.editor.name, @thread.editor %>.
<% end %>
<%= render_md(@thread.content).html_safe %>

<%= "#{pluralize(@thread.replies.size, 'reply')}." %>

<% @replies.each do |reply| %> <%= render partial: "threadreplies/reply", locals: {reply: reply} %> <% end %> <%= paginate @replies %> <% if @thread.locked? %>
This thread is locked.
<% end %> <% if current_user %> <% if @thread.can_write?(current_user) %> <%= render partial: "threadreplies/new", locals: {reply: Threadreply.new(forumthread: @thread)} %> <% else %>

You don't have the required permission to reply here.

<% end %> <% else %>

Please <%= link_to "Log in", login_path(return_path: request.env['PATH_INFO']), action: "new" %> to post a reply.

<% end %>