revert hidden post redirect
This commit is contained in:
@@ -16,12 +16,6 @@ class PostsController < ApplicationController
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
@post = Post.find(params[:id])
|
@post = Post.find(params[:id])
|
||||||
|
|
||||||
if !Danbooru.config.can_user_see_post?(CurrentUser.user, @post)
|
|
||||||
redirect_to(:back, :notice => "Post #{@post.id} is not available")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
@post_flag = PostFlag.new(:post_id => @post.id)
|
@post_flag = PostFlag.new(:post_id => @post.id)
|
||||||
@post_appeal = PostAppeal.new(:post_id => @post.id)
|
@post_appeal = PostAppeal.new(:post_id => @post.id)
|
||||||
respond_with(@post)
|
respond_with(@post)
|
||||||
|
|||||||
@@ -49,7 +49,9 @@
|
|||||||
|
|
||||||
<menu id="post-sections">
|
<menu id="post-sections">
|
||||||
<li><a href="#comments">Comments</a></li>
|
<li><a href="#comments">Comments</a></li>
|
||||||
<li><a href="#edit" id="post-edit-link">Edit</a></li>
|
<% if Danbooru.config.can_user_see_post?(CurrentUser.user, @post) %>
|
||||||
|
<li><a href="#edit" id="post-edit-link">Edit</a></li>
|
||||||
|
<% end %>
|
||||||
<li><a href="#share">Share</a></li>
|
<li><a href="#share">Share</a></li>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
@@ -61,9 +63,11 @@
|
|||||||
<%= render :partial => "notes/note", :collection => @post.notes.active %>
|
<%= render :partial => "notes/note", :collection => @post.notes.active %>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="edit" style="display: none;">
|
<% if Danbooru.config.can_user_see_post?(CurrentUser.user, @post) %>
|
||||||
<%= render "posts/partials/show/edit", :post => @post %>
|
<section id="edit" style="display: none;">
|
||||||
</section>
|
<%= render "posts/partials/show/edit", :post => @post %>
|
||||||
|
</section>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<section id="share" style="display: none;">
|
<section id="share" style="display: none;">
|
||||||
<%= render "posts/partials/show/share", :post => @post %>
|
<%= render "posts/partials/show/share", :post => @post %>
|
||||||
|
|||||||
Reference in New Issue
Block a user