From 460081bc2fc976f0e6564f676980d2161807c2f8 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sun, 5 Dec 2010 17:21:57 -0800 Subject: [PATCH] don't condense comments on show pages --- app/views/comments/_comments.html.haml | 2 +- app/views/shared/_stream_element.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/comments/_comments.html.haml b/app/views/comments/_comments.html.haml index a13a30d90..73a649060 100644 --- a/app/views/comments/_comments.html.haml +++ b/app/views/comments/_comments.html.haml @@ -4,7 +4,7 @@ %ul.comments{:id => post_id, :class => ("hidden" if comment_hashes.size == 0)} -if comment_hashes.size > 3 - .older_comments.hidden.inactive + .older_comments{:class => ("hidden inactive" if defined?(condensed) && condensed)} = render :partial => 'comments/comment', :collection => comment_hashes[0..-4], :as => :hash = render :partial => 'comments/comment', :collection => comment_hashes[-3, 3], :as => :hash -else diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index 889655486..0b902b48e 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -30,5 +30,5 @@ %span.time= link_to(how_long_ago(post), status_message_path(post)) = comment_toggle(comments.length) - = render "comments/comments", :post_id => post.id, :comment_hashes => comments + = render "comments/comments", :post_id => post.id, :comment_hashes => comments, :condensed => true