diaspora/app/views/comments/_comments.haml

22 lines
930 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 defined?(always_expanded) && always_expanded
%ul.show_comments{:class => ("hidden" if comments.size == 0)}
%li
= image_tag 'icons/spechbubble_2.png', :class => 'more_comments_icon'
%b= comment_toggle(comments.size)
%ul.comments{:id => post_id, :class => ("hidden" if comments.size == 0 && !defined?(force_open))}
-if comments.size > 3
.older_comments{:class => ("hidden inactive" if defined?(condensed) && condensed)}
= render :partial => 'comments/comment', :collection => comments[0..-4]
= render :partial => 'comments/comment', :collection => comments[-3, 3]
-else
= render :partial => 'comments/comment', :collection => comments
- unless @commenting_disabled
%li.comment.show
= new_comment_form(post_id)