about summary refs log tree commit diff stats
path: root/app/views/admin/comments
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-13 13:13:28 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-13 13:13:28 -0400
commitd365294db7edd79f01b51ac30413707a556f84bb (patch)
tree817396db46ac064962362970bea8e005a9cf2660 /app/views/admin/comments
parentdd9b9ac1c2f032e02757e7e4fa4aa588234933d4 (diff)
downloadthoughts-d365294db7edd79f01b51ac30413707a556f84bb.tar.gz
thoughts-d365294db7edd79f01b51ac30413707a556f84bb.tar.bz2
thoughts-d365294db7edd79f01b51ac30413707a556f84bb.zip
Added pending comment page to admin panel
Diffstat (limited to 'app/views/admin/comments')
-rw-r--r--app/views/admin/comments/pending.haml25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/views/admin/comments/pending.haml b/app/views/admin/comments/pending.haml new file mode 100644 index 0000000..6abf371 --- /dev/null +++ b/app/views/admin/comments/pending.haml
@@ -0,0 +1,25 @@
1- title "Pending Comments"
2= will_paginate @comments
3%table#entries
4 %tr
5 %th Text
6 %th Author
7 %th Blog post
8 %th Date updated
9 %th
10 - @comments.each do |comment|
11 %tr{ class: cycle("even", "odd") }
12 %td= comment.body
13 %td
14 %ul
15 %li= comment.username
16 %li= comment.email
17 - unless comment.website.empty?
18 %li= comment.website
19 %td= link_to comment.blog.title, comment.blog
20 %td= comment.published_at.strftime("%B %d, %Y, %l:%M%P")
21 %td
22 %ul.admin-actions
23 %li= link_to "Accept", accept_admin_comment_url(comment), method: :post, data: { confirm: "Are you sure you want to accept this comment?" }
24 %li= link_to "Reject", reject_admin_comment_url(comment), method: :post, data: { confirm: "Are you sure you want to reject this comment?" }
25= will_paginate @comments