Sha256: 30831f2405a33f8494576eab2223b59c2f9e2301dadf79009c101c697f3f4f40

Contents?: true

Size: 1.66 KB

Versions: 9

Compression:

Stored size: 1.66 KB

Contents

<h1>Listing comments<%= " for \"#{@commentable.title}\"" if @commentable -%></h1>

<table>
  <thead>
    <tr>
<% if @commentable.nil? -%>
      <th>Article</th>
<% end -%>
      <%= sortable_table_header :name => "Name",  :sort => "name" %>
      <%= sortable_table_header :name => "Comment",  :sort => "comment" %>
      <%= sortable_table_header :name => "Created",  :sort => "created_at" %>
      <th colspan="<% spam_markable? ? 3 : 2 %>">Actions</th>
    </tr>
  </thead>
  <tbody>
<% @comments.each do |comment| %>
    <tr id="comment-<%= comment.id %>">
<% if @commentable.nil? -%>
      <td class="title"><%= link_to comment.commentable.title, [:admin, comment.commentable] %></td>
<% end -%>
      <td><%= mail_to comment.email, comment.name %></td>
      <td><%=h comment.comment %></td>
      <td class="date"><%= comment.created_at.to_formatted_s(:short) %></td>
<% if spam_markable? %>
      <td><%= link_to 'Spam', admin_comment_path(comment, :spam => true), :confirm => 'Are you sure you want to delete this comment and mark it as spam?', :method => :delete, :class => 'spam' %></td>
<% end -%>
      <td><%= link_to 'Destroy', admin_comment_path(comment), :confirm => 'Are you sure you want to delete this comment?', :method => :delete, :class => 'delete' %></td>
    </tr>
<% end %>
  </tbody>
  <tfoot>
    <tr>
<% if spam_markable? -%>
      <th>Article</th>
<% end -%>
      <%= sortable_table_header :name => "Name",  :sort => "name" %>
      <%= sortable_table_header :name => "Comment",  :sort => "comment" %>
      <%= sortable_table_header :name => "Created",  :sort => "created_at" %>
      <th colspan="<% spam_markable? ? 3 : 2 %>">Actions</th>
    </tr>
  </tfoot>
</table>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
beef-articles-0.4.8 app/views/admin/comments/index.html.erb
beef-articles-0.4.7 app/views/admin/comments/index.html.erb
beef-articles-0.4.6 app/views/admin/comments/index.html.erb
beef-articles-0.4.5 app/views/admin/comments/index.html.erb
beef-articles-0.4.4 app/views/admin/comments/index.html.erb
beef-articles-0.4.3 app/views/admin/comments/index.html.erb
beef-articles-0.4.2 app/views/admin/comments/index.html.erb
beef-articles-0.4.1 app/views/admin/comments/index.html.erb
beef-articles-0.4.0 app/views/admin/comments/index.html.erb