about summary refs log tree commit diff stats
path: root/app/views/admin/comments/pending.haml
blob: 5352b128b2af6f6675f25edd458d05df5e898a9b (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
26
27
28
29
30
31
32
- title "Pending Comments"
= will_paginate @comments
= form_tag mass_admin_comments_url, method: :post do
  #action-box
    = select_tag "mass_action", options_for_select(["Delete", "Mark Spam"]), include_blank: true
    = submit_tag "Mass action", data: { confirm: "Are you sure you want to do this action?" }
  %table#entries
    %tr
      %th= check_box_tag "check_all"
      %th Text
      %th Author
      %th Blog post
      %th Date updated
      %th
    - @comments.each do |comment|
      %tr{ class: cycle("even", "odd") }
        %td= check_box_tag "comment_ids[]", comment.id, class: "comment_ids"
        %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.created_at.strftime("%B %d, %Y, %l:%M%P")
        %td
          %ul.admin-actions
            %li= link_to "Accept", accept_admin_comment_url(comment), method: :post, data: { confirm: "Are you sure you want to accept this comment?" }
            %li= link_to "Reject", reject_admin_comment_url(comment), method: :post, data: { confirm: "Are you sure you want to reject this comment?" }
            %li= link_to "Mark Spam", mark_spam_admin_comment_url(comment), method: :post, data: { confirm: "Are you sure you want to mark this comment as spam?" }
= will_paginate @comments