<%= render partial: 'commontator/subscriptions/link',
locals: { thread: thread, user: user } %>
<% end %>
<% if can_edit %>
<%
if show_all
filter_class = filter_string = 'filter'
else
filter_string = 'show_all'
filter_class = 'show-all'
end
is_closed = thread.is_closed?
close_string = is_closed ? 'reopen' : 'close'
%>
<% if thread.is_filtered? %>
<%= link_to t("commontator.thread.actions.#{filter_string}"),
commontator.thread_path(thread, show_all: (show_all ? nil : true)),
id: "commontator-thread-#{thread.id}-#{filter_class}-link",
class: filter_class,
remote: true %>
<% end %>
<%= link_to t("commontator.thread.actions.#{close_string}"),
commontator.polymorphic_path([close_string, thread]),
data: is_closed ? {} :
{ confirm: t('commontator.thread.actions.confirm_close') },
method: :put,
id: "commontator-thread-#{thread.id}-#{close_string}-link",
class: close_string,
remote: true %>
<% end %>
<% if can_subscribe %>
<%= t "commontator.thread.status.#{thread.is_closed? ? 'closed' : 'open'}",
closer_name: (thread.is_closed? ? Commontator.commontator_name(thread.closer) : '') %>
<% if thread.config.comment_order == :l %>
<%= render partial: 'commontator/threads/reply', locals: { thread: thread, user: user } %>
<% end %>
<%=
render partial: 'commontator/comments/list', locals: {
user: user, nested_comments: nested_comments
}
%>
<%=
page_entries_info(comments) unless [ :i, :b ].include? thread.config.comment_reply_style
%>
<%=
name = t('commontator.thread.status.pages') \
if [ :i, :b ].include?(thread.config.comment_reply_style)
will_paginate comments,
renderer: Commontator::LinkRenderer,
name: name,
remote: true,
params: { controller: 'commontator/threads',
action: 'show',
id: thread.id }
%>