Comments Management

<%= form_tag polymorphic_path(mapping.plural, :action => :update_comments), :method => :put do %> <% bulk_actions = capture do -%>
<% options = %w(mark_spam not_spam destroy).inject([]) {|a,action| a << [t("governor_comments.#{action}"), action] } %> <%= select_tag :bulk_operation, options_for_select([['Action', ''], *options]) %> <%= submit_tag t('governor_comments.submit') %>
<% end %> <%= bulk_actions %> <% @comments.each do |c| %> <% end %>
Author Comment Article
<%= check_box_tag "comments[#{c.id}]" %> <%= link_to_if c.commenter.website.present?, c.commenter.name, c.commenter.website %> <% if c.commenter.email.present? %>
<%= mail_to c.commenter.email, 'Contact', :encode => :javascript %> <% end %>
<% if c.title %><%= c.title %>
<% end -%> <%= c.content %>
<%= link_to t('governor_comments.reply'), polymorphic_path(c.resource, :anchor => :new_comment) %> | <%= link_to t('governor_comments.edit'), polymorphic_path([c.resource, c], :action => :edit) %> | <% spam_action = (c.hidden? ? 'not' : 'mark') + '_spam' %> <%= link_to t(spam_action, :scope => 'governor_comments'), polymorphic_path([c.resource, c], :action => spam_action), :method => :put %> | <%= link_to t('governor_comments.destroy'), polymorphic_path([c.resource, c]), :method => :delete, :confirm => 'Are you sure you want to remove this comment? It has not been marked as spam.' %>
<%= link_to c.resource.title, c.resource %>
<%= bulk_actions %> <% end %>