Sha256: c632c246da2c2fea936a46c47f41cfa01e843372133ac2d2b4f8db787e8c355b

Contents?: true

Size: 1.73 KB

Versions: 12

Compression:

Stored size: 1.73 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', :title => 'Mark this coment as spam' %></td>
<% end -%>
      <td><%= link_to 'Delete', admin_comment_path(comment), :confirm => 'Are you sure you want to delete this comment?', :method => :delete, :class => 'delete', :title => 'Delete this comment' %></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

12 entries across 12 versions & 1 rubygems

Version Path
beef-articles-0.5.2 app/views/admin/comments/index.html.erb
beef-articles-0.5.1 app/views/admin/comments/index.html.erb
beef-articles-0.4.18 app/views/admin/comments/index.html.erb
beef-articles-0.4.17 app/views/admin/comments/index.html.erb
beef-articles-0.4.16 app/views/admin/comments/index.html.erb
beef-articles-0.4.15 app/views/admin/comments/index.html.erb
beef-articles-0.4.14 app/views/admin/comments/index.html.erb
beef-articles-0.4.13 app/views/admin/comments/index.html.erb
beef-articles-0.4.12 app/views/admin/comments/index.html.erb
beef-articles-0.4.11 app/views/admin/comments/index.html.erb
beef-articles-0.4.10 app/views/admin/comments/index.html.erb
beef-articles-0.4.9 app/views/admin/comments/index.html.erb