% # Clients of this partial must supply the following variables: # thread # user # page # per_page # Optionally, they can also supply the following variable: show_all ||= false %> <% can_subscribe = thread.can_subscribe?(user) can_edit = thread.can_be_edited_by?(user) %> <% if can_subscribe %> <%= render :partial => 'commontator/subscriptions/link', :locals => { :thread => thread, :user => user } %> <% end %> <% if can_edit %> <% filter_string = show_all ? 'filter' : 'show_all' 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 => "thread_#{thread.id.to_s}_#{filter_string}_link", :class => "thread_#{filter_string}_link", :remote => true %> <% end %> <%= link_to t("commontator.thread.actions.#{close_string}"), commontator.polymorphic_path([close_string, thread]), :confirm => (!is_closed ? t('commontator.thread.actions.confirm_close') : nil), :method => :put, :id => "thread_#{thread.id.to_s}_#{close_string}_link", :class => "thread_#{close_string}_link", :remote => true %> <% end %> <%= 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, :per_page => per_page } %> <% end %>