comments: add scores, rework comment menu.
* Add comment scores. * Rework voting buttons so that you can click the upvote/downvote buttons to toggle votes. * Hide the edit, delete, undelete, and report buttons behind a popup menu. * Show the upvote/downvote/reply buttons to logged out users. Redirect them to the login page instead.
This commit is contained in:
@@ -11,7 +11,7 @@ class CommentSectionComponent < ApplicationComponent
|
||||
@comments = @post.comments.order(id: :asc)
|
||||
@comments = @comments.includes(:creator)
|
||||
@comments = @comments.includes(:votes) if !current_user.is_anonymous?
|
||||
@comments = @comments.includes(:moderation_reports) if policy(ModerationReport).show?
|
||||
@comments = @comments.includes(:moderation_reports) if policy(ModerationReport).can_see_moderation_reports?
|
||||
@comments = @comments.last(limit) if limit.present?
|
||||
|
||||
@dtext_data = DText.preprocess(@comments.map(&:body))
|
||||
|
||||
Reference in New Issue
Block a user