From d365294db7edd79f01b51ac30413707a556f84bb Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 13 Oct 2023 13:13:28 -0400 Subject: Added pending comment page to admin panel --- app/views/admin/comments/pending.haml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 app/views/admin/comments/pending.haml (limited to 'app/views/admin/comments/pending.haml') 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 @@ +- title "Pending Comments" += will_paginate @comments +%table#entries + %tr + %th Text + %th Author + %th Blog post + %th Date updated + %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 "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?" } += will_paginate @comments -- cgit 1.4.1