votes: show votes when hovering over post score.
Make it so you can hover over a post's score to see the list of public upvotes. Also show the upvote count, the downvote count, and the upvote ratio.
This commit is contained in:
@@ -193,10 +193,10 @@ module ApplicationHelper
|
||||
to_sentence(links, **options)
|
||||
end
|
||||
|
||||
def link_to_user(user, text = nil)
|
||||
def link_to_user(user, text = nil, classes: nil, **options)
|
||||
return "anonymous" if user.blank?
|
||||
|
||||
user_class = "user user-#{user.level_string.downcase}"
|
||||
user_class = "user user-#{user.level_string.downcase} #{classes}"
|
||||
user_class += " user-post-approver" if user.can_approve_posts?
|
||||
user_class += " user-post-uploader" if user.can_upload_free?
|
||||
user_class += " user-banned" if user.is_banned?
|
||||
|
||||
@@ -20,6 +20,10 @@ module ComponentsHelper
|
||||
render PostVotesComponent.new(post: post, **options)
|
||||
end
|
||||
|
||||
def render_post_votes_tooltip(post, **options)
|
||||
render PostVotesTooltipComponent.new(post: post, **options)
|
||||
end
|
||||
|
||||
def render_post_navbar(post, **options)
|
||||
render PostNavbarComponent.new(post: post, **options)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user