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

18 lines
895 B
Text

-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
.comment_stream
- unless comments_expanded || all_comments?
%ul.show_comments{:class => ("hidden" if post.comments.size <= 3)}
%li
= comment_toggle( post)
%ul.comments{:class => ('loaded' if post.comments.size <= 3)}
-if post.comments.size > 3 && !comments_expanded && ! all_comments?
= render :partial => 'comments/comment', :collection => post.comments.including_author.last(3), :locals => {:post => post}
-else
= render :partial => 'comments/comment', :collection => post.comments.including_author, :locals => {:post => post}
- unless commenting_disabled?(post)
.new_comment_form_wrapper{:class => comment_form_wrapper_class(post)}
= new_comment_form(post.id, current_user)