Fix #4525: Show mod report notices next to reported content.

This commit is contained in:
evazion
2021-01-15 19:54:21 -06:00
parent 37792bd5dd
commit b4530183f4
20 changed files with 153 additions and 57 deletions

View File

@@ -16,7 +16,6 @@ class ForumTopic < ApplicationRecord
has_many :forum_posts, foreign_key: "topic_id", dependent: :destroy, inverse_of: :topic
has_many :forum_topic_visits
has_one :forum_topic_visit_by_current_user, -> { where(user_id: CurrentUser.id) }, class_name: "ForumTopicVisit"
has_many :moderation_reports, through: :forum_posts
has_one :original_post, -> { order(id: :asc) }, class_name: "ForumPost", foreign_key: "topic_id", inverse_of: :topic
has_many :bulk_update_requests, :foreign_key => "forum_topic_id"
has_many :tag_aliases, :foreign_key => "forum_topic_id"

View File

@@ -50,7 +50,6 @@ class Post < ApplicationRecord
has_many :votes, :class_name => "PostVote", :dependent => :destroy
has_many :notes, :dependent => :destroy
has_many :comments, -> {order("comments.id")}, :dependent => :destroy
has_many :moderation_reports, through: :comments
has_many :children, -> {order("posts.id")}, :class_name => "Post", :foreign_key => "parent_id"
has_many :approvals, :class_name => "PostApproval", :dependent => :destroy
has_many :disapprovals, :class_name => "PostDisapproval", :dependent => :destroy