diaspora/app/views/comments/_comments.html.haml

14 lines
671 B
Text

-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%ul.comments{:id => post_id, :class => ("hidden" if comment_hashes.size == 0)}
-if comment_hashes.size > 3
.older_comments.hidden.inactive
= render :partial => 'comments/comment', :collection => comment_hashes[0..-4], :as => :hash
= render :partial => 'comments/comment', :collection => comment_hashes[-3, 3], :as => :hash
-else
= render :partial => 'comments/comment', :collection => comment_hashes, :as => :hash
%li.comment.show
= render 'comments/new_comment', :post_id => post_id