diff --git a/app/logical/post_sets/post.rb b/app/logical/post_sets/post.rb index dee3371d6..071e95f62 100644 --- a/app/logical/post_sets/post.rb +++ b/app/logical/post_sets/post.rb @@ -77,6 +77,18 @@ module PostSets posts.any? {|x| x.rating == "e"} end + def hidden_posts + posts.select { |p| !p.visible? } + end + + def banned_posts + posts.select(&:is_banned?) + end + + def censored_posts + hidden_posts - banned_posts + end + def use_sequential_paginator? unknown_post_count? && !CurrentUser.is_gold? end diff --git a/app/views/posts/partials/index/_posts.html.erb b/app/views/posts/partials/index/_posts.html.erb index d71e5912a..6efa892fb 100644 --- a/app/views/posts/partials/index/_posts.html.erb +++ b/app/views/posts/partials/index/_posts.html.erb @@ -9,6 +9,18 @@ <% end %> + <% if post_set.hidden_posts.present? %> +
+ <% end %> + <% unless @random.present? %> <%= numbered_paginator(post_set.posts) %> <% end %>