<% if @root_comment.present? %> <% title truncate(strip_tags(@root_comment.processed_html), length: 100) + " — DEV" %> <% else %> <% title "Discussion of "+ @commentable.title + " — DEV" %> <% end %> <%= content_for :page_meta do %> "> " /> "> <% if @root_comment.present? %> <% else %> <% end %> <% if @commentable.class.name == "Article" %> <% 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.html_safe) %>
<% else %>
<%= truncate(strip_tags(@commentable.processed_html), length:150).html_safe %> [Read Full]
<% end %> <% end %>
<% end %>
<% if @root_comment %>

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

<% unless @root_comment.is_root? %> VIEW PARENT COMMENT <% end %> VIEW FULL DISCUSSION
<% else %> <%= render "form", commentable: @commentable, commentable_type: "Article" %> <% end %>
<% if @root_comment.present? %>
<% cache ["comment_root-view-root_#{user_signed_in?}", @root_comment] do %> <%= render("comment", comment:@root_comment, commentable:@commentable, is_view_root: true) %> <% end %>
<% else %> <% Comment.rooted_on(@commentable.id,@commentable_type).order("score DESC").each do |comment| %> <% cache ["comment_root_#{user_signed_in?}", comment] do %> <%= render("comment", comment:comment, commentable:@commentable, is_view_root: false) %> <% end %> <% end %> <% end %>
<%= render "articles/conduct_and_abuse_actions", page: "comments_index" %>
<% if has_vid?(@commentable) %> <%= render 'articles/fitvids' %> <% end %>