diaspora/app/views/comments/_comments.haml
2011-07-11 14:03:59 -07:00

18 lines
802 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.
- unless comments_expanded
%ul.show_comments{:class => ("hidden" if post.comments.size <= 3)}
%li
%b= comment_toggle( post)
%ul.comments{:id => post.id, :class => ('loaded' if post.comments.size <= 3)}
-if post.comments.size > 3 && !comments_expanded
= render :partial => 'comments/comment', :collection => post.last_three_comments, :locals => {:post => post}
-else
= render :partial => 'comments/comment', :collection => post.comments, :locals => {:post => post}
- unless @commenting_disabled
.new_comment_form_wrapper{:class => ( 'hidden' if post.comments.size == 0)}
= new_comment_form(post.id, current_user)