From 194081ca476ab8dcd54de68a78e6b7a42c9a4bc1 Mon Sep 17 00:00:00 2001
From: Robin Ward <robin.ward@gmail.com>
Date: Tue, 21 Jan 2014 17:22:43 -0500
Subject: [PATCH] FIX: Hidden posts were not being displayed with the correct
 messaging.

---
 app/assets/javascripts/discourse/views/post_view.js | 2 +-
 app/assets/stylesheets/desktop/topic-post.scss      | 5 ++++-
 lib/topic_view.rb                                   | 1 -
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/assets/javascripts/discourse/views/post_view.js b/app/assets/javascripts/discourse/views/post_view.js
index c12fa173e..3181db43c 100644
--- a/app/assets/javascripts/discourse/views/post_view.js
+++ b/app/assets/javascripts/discourse/views/post_view.js
@@ -11,7 +11,7 @@ Discourse.PostView = Discourse.GroupedView.extend(Ember.Evented, {
   templateName: 'post',
   classNameBindings: ['postTypeClass',
                       'selected',
-                      'post.hidden:deleted',
+                      'post.hidden:post-hidden',
                       'post.deleted'],
   postBinding: 'content',
 
diff --git a/app/assets/stylesheets/desktop/topic-post.scss b/app/assets/stylesheets/desktop/topic-post.scss
index 9ec7c3b46..a983d5989 100644
--- a/app/assets/stylesheets/desktop/topic-post.scss
+++ b/app/assets/stylesheets/desktop/topic-post.scss
@@ -509,13 +509,16 @@ iframe {
   }
 }
 
-
 .deleted {
   .topic-body {
   background-color: lighten(red, 45%);
   }
 }
 
+.post-hidden {
+  opacity: 0.5;
+}
+
 .moderator {
   .topic-body {
   background-color: lighten(yellow, 45%);
diff --git a/lib/topic_view.rb b/lib/topic_view.rb
index fecbff9f7..cfccb8c66 100644
--- a/lib/topic_view.rb
+++ b/lib/topic_view.rb
@@ -269,7 +269,6 @@ class TopicView
 
   def unfiltered_posts
     result = @topic.posts
-    result = result.where(hidden: false) unless @user.try(:staff?)
     result = result.with_deleted if @user.try(:staff?)
     result
   end