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