posts/show: load flag/appeal/replacement dialogs via ajax (#3922).

This commit is contained in:
evazion
2018-09-26 17:17:46 -05:00
parent d1e9f9c3ce
commit f886f2fdb3
18 changed files with 74 additions and 148 deletions

View File

@@ -23,9 +23,7 @@ class PostsController < ApplicationController
def show
@post = Post.find(params[:id])
@post_flag = PostFlag.new(:post_id => @post.id)
@post_appeal = PostAppeal.new(:post_id => @post.id)
include_deleted = @post.is_deleted? || (@post.parent_id.present? && @post.parent.is_deleted?) || CurrentUser.user.show_deleted_children?
@parent_post_set = PostSets::PostRelationship.new(@post.parent_id, :include_deleted => include_deleted)
@children_post_set = PostSets::PostRelationship.new(@post.id, :include_deleted => include_deleted)