From 575f138797c2dadea9b7c252a2da39f9bedf2991 Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 6 Jan 2013 14:26:20 -0500 Subject: [PATCH] layout changes --- app/assets/stylesheets/specific/posts.css.scss | 4 ---- app/logical/post_sets/post.rb | 4 ++++ app/views/posts/index.html.erb | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/specific/posts.css.scss b/app/assets/stylesheets/specific/posts.css.scss index cc970ac63..c9542ee00 100644 --- a/app/assets/stylesheets/specific/posts.css.scss +++ b/app/assets/stylesheets/specific/posts.css.scss @@ -1,9 +1,5 @@ @import "../common/000_vars.css.scss"; -div.post-previews { - overflow: visible; -} - article.post-preview { height: 154px; width: 154px; diff --git a/app/logical/post_sets/post.rb b/app/logical/post_sets/post.rb index 0aeae4000..c686870a1 100644 --- a/app/logical/post_sets/post.rb +++ b/app/logical/post_sets/post.rb @@ -27,6 +27,10 @@ module PostSets end end + def has_explicit? + posts.any? {|x| x.rating == "e"} + end + def posts if tag_array.size > 2 && !CurrentUser.is_privileged? raise SearchError.new("Upgrade your account to search more than two tags at once") diff --git a/app/views/posts/index.html.erb b/app/views/posts/index.html.erb index 5df676a98..e77bfd0f4 100644 --- a/app/views/posts/index.html.erb +++ b/app/views/posts/index.html.erb @@ -27,6 +27,8 @@ <%= render "posts/partials/index/edit" %> <%= render "wiki_pages/excerpt", :post_set => @post_set %> <%= render "posts/partials/index/posts", :post_set => @post_set %> + + <%= render_rss_advertisement("short", @post_set.has_explicit?) %> <% content_for(:page_title) do %> @@ -39,7 +41,6 @@ <%= render "posts/partials/common/secondary_links" %> - <%= render_rss_advertisement("short", @post_set.posts.any? {|x| x.rating == "e"}) %>