<% if @root_comment.present? %> <% title @root_comment.title + " — DEV" %> <% else %> <% title "Discussion of " + @commentable.title + " — DEV" %> <% end %> <%= content_for :page_meta do %> "> " /> "> <% if @root_comment.present? %> <% else %> <% if @commentable.class.name == "Article" && @commentable.published %> <% end %> <% end %> <% end %> <% if @root_comment %>
<% else %>
<% if @commentable.main_image.present? %>
<% else %>
<% end %>

<%= @commentable.title %>

<%= @commentable.user.name %> <%= "on " + @commentable.published_at.strftime("%B %d, %Y") if @commentable.published_at %>

<% if @commentable.processed_html.present? %> <% if @commentable.processed_html.size < 350 %>
<%= sanitize_rendered_markdown(@commentable.processed_html) %>
<% else %>
<%= truncate(sanitize(@commentable.processed_html, tags: []), length: 150) %> [Read Full]
<% end %> <% end %>
<% end %>
<% if @root_comment %>

re: <%= @commentable.title %> VIEW POST

<% unless @root_comment.is_root? %> TOP OF THREAD <% end %> FULL DISCUSSION
<% else %> <%= render "form", commentable: @commentable, commentable_type: "Article" %> <% end %>
<% if @root_comment.present? %>
<% if @root_comment.depth > 0 && parent = @root_comment.parent %> re: <%= parent.title(150) %> <% end %> <% cache ["comment_root-view-root_#{user_signed_in?}", @root_comment] do %> <%= tree_for(@root_comment, @root_comment.subtree.includes(:user).arrange[@root_comment], @commentable) %> <% end %>
<% else %> <% Comment.tree_for(@commentable).each do |comment, sub_comments| %> <% cache ["comment_root_#{user_signed_in?}", comment] do %> <%= tree_for(comment, sub_comments, @commentable) %> <% end %> <% end %> <% end %>
<% if @commentable.any_comments_hidden %>

Some comments have been hidden by the post's author - find out more

<% end %> <%= render "articles/conduct_and_abuse_actions", page: "comments_index" %>
<% if has_vid?(@commentable) %> <%= render "articles/fitvids" %> <% end %>