diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-21 13:24:24 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-21 13:24:24 -0400 |
commit | 0d50b1f18993827cb6862efeedea528b64fad164 (patch) | |
tree | 3e01bd704662742a8847bd281616e29f06249cfa /app/views/admin | |
parent | 35906f26e24467c52b6cf09346abe57444e5963a (diff) | |
download | thoughts-0d50b1f18993827cb6862efeedea528b64fad164.tar.gz thoughts-0d50b1f18993827cb6862efeedea528b64fad164.tar.bz2 thoughts-0d50b1f18993827cb6862efeedea528b64fad164.zip |
Added quote moderation panel
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/quotes/index.html.haml | 20 | ||||
-rw-r--r-- | app/views/admin/quotes/pending.html.haml | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/app/views/admin/quotes/index.html.haml b/app/views/admin/quotes/index.html.haml new file mode 100644 index 0000000..afe2c20 --- /dev/null +++ b/app/views/admin/quotes/index.html.haml | |||
@@ -0,0 +1,20 @@ | |||
1 | - title "Quotes" | ||
2 | = will_paginate @quotes | ||
3 | %table#entries | ||
4 | %tr | ||
5 | %th ID | ||
6 | %th Content | ||
7 | %th Submitter | ||
8 | %th Date submitted | ||
9 | %th | ||
10 | - @quotes.each do |quote| | ||
11 | %tr{ class: cycle("even", "odd") } | ||
12 | %td= quote.id | ||
13 | %td= quote_format(quote.content) | ||
14 | %td= quote.submitter | ||
15 | %td= quote.created_at.strftime("%B %d, %Y, %l:%M%P") | ||
16 | %td | ||
17 | %ul.admin-actions | ||
18 | %li= link_to "View", quote | ||
19 | %li= link_to "Delete", admin_quote_url(quote), method: :delete, data: { confirm: "Are you sure?" } | ||
20 | = will_paginate @quotes | ||
diff --git a/app/views/admin/quotes/pending.html.haml b/app/views/admin/quotes/pending.html.haml new file mode 100644 index 0000000..14d6cf8 --- /dev/null +++ b/app/views/admin/quotes/pending.html.haml | |||
@@ -0,0 +1,20 @@ | |||
1 | - title "Pending Quotes" | ||
2 | = will_paginate @quotes | ||
3 | %table#entries | ||
4 | %tr | ||
5 | %th ID | ||
6 | %th Content | ||
7 | %th Submitter | ||
8 | %th Date submitted | ||
9 | %th | ||
10 | - @quotes.each do |quote| | ||
11 | %tr{ class: cycle("even", "odd") } | ||
12 | %td= quote.id | ||
13 | %td= quote_format(quote.content) | ||
14 | %td= quote.submitter | ||
15 | %td= quote.created_at.strftime("%B %d, %Y, %l:%M%P") | ||
16 | %td | ||
17 | %ul.admin-actions | ||
18 | %li= link_to "Accept", accept_admin_quote_url(quote), method: :post, data: { confirm: "Are you sure you want to accept this quote?" } | ||
19 | %li= link_to "Reject", admin_quote_url(quote), method: :delete, data: { confirm: "Are you sure you want to reject this quote?" } | ||
20 | = will_paginate @quotes | ||