about summary refs log tree commit diff stats
path: root/app/views/admin/comments/index.html.haml
blob: 8cfa0bbbf143c4dfbad243fc528aa2b545d586b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- title "Comments"
= will_paginate @comments
%table#entries
  %tr
    %th Text
    %th Author
    %th Blog post
    %th Date published
    %th
  - @comments.each do |comment|
    %tr{ class: cycle("even", "odd") }
      %td= comment.body
      %td
        %ul
          %li= comment.username
          %li= comment.email
          - unless comment.website.empty?
            %li= comment.website
      %td= link_to comment.blog.title, comment.blog
      %td= comment.published_at.strftime("%B %d, %Y, %l:%M%P")
      %td
        %ul.admin-actions
          %li= link_to "View", blog_url(comment.blog, anchor: "comment-#{comment.id}")
          %li= link_to "Delete", admin_comment_url(comment), method: :delete, data: { confirm: "Are you sure?" }
= will_paginate @comments