% title @thread.title %>
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to @thread %>
<%= truncate(@thread.title, length: 60, omission: " …") %>
<% if @thread.edited? %>
Last edited by <%= link_to @thread.editor.name, @thread.editor %>.
<% end %>
<%= render_md(@thread.content).html_safe %>
<%= "#{pluralize(@thread.replies.length, 'reply')}." %>
<% @thread.replies.each do |reply| %>
<%= render partial: "threadreplies/reply", locals: {reply: reply} %>
<% end %>
<% if @thread.can_write?(current_user) %>
<%= render partial: "threadreplies/new", locals: {reply: Threadreply.new(forumthread: @thread)} %>
<% else %>
You cannot reply here.
<% end %>