diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-12 17:44:38 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-12 17:44:38 -0400 |
| commit | 17d660fd4b8516d6b446f7c41d7b076a29a242a1 (patch) | |
| tree | 115e7f3c1a3aa5bdc29dfa6d0c994eb795c658f6 /app/views/admin | |
| parent | 835af696703484208882a70cc5dd47c5838ecf58 (diff) | |
| download | thoughts-17d660fd4b8516d6b446f7c41d7b076a29a242a1.tar.gz thoughts-17d660fd4b8516d6b446f7c41d7b076a29a242a1.tar.bz2 thoughts-17d660fd4b8516d6b446f7c41d7b076a29a242a1.zip | |
Added comment deleting
Also I seem to have fixed the JS errors that were preventing the fancy stuff in the admin panel from working.
Diffstat (limited to 'app/views/admin')
| -rw-r--r-- | app/views/admin/comments/index.html.haml | 23 |
1 files changed, 23 insertions, 0 deletions
| diff --git a/app/views/admin/comments/index.html.haml b/app/views/admin/comments/index.html.haml new file mode 100644 index 0000000..7b25c05 --- /dev/null +++ b/app/views/admin/comments/index.html.haml | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | - title "Comments" | ||
| 2 | %table#entries | ||
| 3 | %tr | ||
| 4 | %th Text | ||
| 5 | %th Author | ||
| 6 | %th Blog post | ||
| 7 | %th Date published | ||
| 8 | %th | ||
| 9 | - @comments.each do |comment| | ||
| 10 | %tr{ class: cycle("even", "odd") } | ||
| 11 | %td= comment.body | ||
| 12 | %td | ||
| 13 | %ul | ||
| 14 | %li= comment.username | ||
| 15 | %li= comment.email | ||
| 16 | - unless comment.website.empty? | ||
| 17 | %li= comment.website | ||
| 18 | %td= link_to comment.blog.title, comment.blog | ||
| 19 | %td= comment.published_at.strftime("%B %d, %Y, %l:%M%P") | ||
| 20 | %td | ||
| 21 | %ul.admin-actions | ||
| 22 | %li= link_to "View", blog_url(comment.blog, anchor: "comment-#{comment.id}") | ||
| 23 | %li= link_to "Delete", admin_comment_url(comment), method: :delete, data: { confirm: "Are you sure?" } | ||
