%# We don't currently cache the support posts because they have permissions to deal with %>
<%= content_tag :div, id: dom_id(support_post), class: support_post_classes(support_post) do %>
<% if is_moderator_or_owner?(support_post) %>
<%= link_to icon("fas","edit"), simple_discussion.edit_support_thread_support_post_path(@support_thread, support_post),
class: "text-muted",
data: { toggle: "tooltip", placement: "left" },
title: t('edit_this_post')
%>
<%= link_to icon("fas","trash"), simple_discussion.support_thread_support_post_path(@support_thread, support_post),
class: "text-muted",
method: :delete,
data: { toggle: "tooltip", placement: "left", confirm: "Are you sure you want to delete this post?" },
title: t('edit_this_post')
%>
<% end %>
<%= avatar_tag(support_post.user.email) %>
<%= support_post.user.name %> <%= support_user_badge(support_post.user) %>
<%= t('commented_on') %>
<%= link_to support_post.created_at.strftime("%b %d, %Y"), simple_discussion.support_thread_path(@support_thread, anchor: "support_post_#{support_post.id}") %>:
<%= icon("fas","check") %> <%= t('solved') %>
<% if is_moderator_or_owner?(@support_thread) %>
<%= link_to t('undo'), simple_discussion.unsolved_support_thread_support_post_path(@support_thread, support_post), method: :put %>
<% end %>
<% elsif is_moderator_or_owner?(@support_thread) %>
<%= link_to simple_discussion.solved_support_thread_support_post_path(@support_thread, support_post), method: :put do %>
<%= icon("fas","fas","check") %>
<%= t('this_solved_my_question') %>
<% end %>
<% end %>
<% end %>