about summary refs log tree commit diff stats
path: root/app/views/blogs/_blog.html.haml
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-20 21:27:06 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-20 21:27:06 -0400
commit2a7a19c93ee0e0d77e4e388d43f36a721c7ab715 (patch)
treec5e775bca4600d111d01d1bd7998d3b6252462e6 /app/views/blogs/_blog.html.haml
parent74b1612e49ebd9cb29efb85f3afeb07f0e8d608a (diff)
downloadthoughts-2a7a19c93ee0e0d77e4e388d43f36a721c7ab715.tar.gz
thoughts-2a7a19c93ee0e0d77e4e388d43f36a721c7ab715.tar.bz2
thoughts-2a7a19c93ee0e0d77e4e388d43f36a721c7ab715.zip
Added post voting
Diffstat (limited to 'app/views/blogs/_blog.html.haml')
-rw-r--r--app/views/blogs/_blog.html.haml4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/blogs/_blog.html.haml b/app/views/blogs/_blog.html.haml index ec61bb5..1f86ae8 100644 --- a/app/views/blogs/_blog.html.haml +++ b/app/views/blogs/_blog.html.haml
@@ -19,3 +19,7 @@
19 %strong= blog.user.login.capitalize 19 %strong= blog.user.login.capitalize
20 on 20 on
21 = blog.visible_date.strftime("%B #{blog.visible_date.day.ordinalize}, %Y at %-I:%M:%S%P") 21 = blog.visible_date.strftime("%B #{blog.visible_date.day.ordinalize}, %Y at %-I:%M:%S%P")
22 .post-vote{ id: "blog-vote-section-#{blog.id}" }
23 %span.vote-link{ id: "blog-upvote-link-#{blog.id}" }= link_to_unless (not blog.published or blog.already_upvoted?(request.remote_ip)), "👍", upvote_blog_path(blog), remote: true, rel: "nofollow", class: "blog-upvote-link", method: :post
24 %span.post-rating{ id: "blog-rating-#{blog.id}" }= blog.upvotes - blog.downvotes
25 %span.vote-link{ id: "blog-downvote-link-#{blog.id}" }= link_to_unless (not blog.published or blog.already_downvoted?(request.remote_ip)), "👎", downvote_blog_path(blog), remote: true, rel: "nofollow", class: "blog-downvote-link", method: :post