-#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

.stream-element{data: {guid: post.id}, class: post.respond_to?(:nsfw) && post.nsfw ? "shield-active" : ""}
  - if post.is_a?(Reshare)
    = render "reshares/reshare", reshare: post, post: post.absolute_root

  .nsfw-hidden
    = render "shared/photo_area", post: post

  .content
    = render "shared/post_info", post: post

  - unless post.is_a?(Reshare)
    = render "shared/nsfw_shield", post: post

  .nsfw-hidden
    - if post.is_a?(StatusMessage)
      = render "status_messages/status_message", post: post, photos: post.photos

  - expanded_info = defined?(expanded_info) && expanded_info
  .bottom-bar.nsfw-hidden{class: ("inactive" unless expanded_info)}
    .post-actions-container
      != show_comments_link(post, expanded_info ? "active" : "")
      = render partial: "comments/post_stats", locals: {post: post}
    - if expanded_info
      .comment-container
        %ul.comments
          = render partial: "comments/comment", collection: post.comments.for_a_stream, locals: {post: post}

    .ajax-loader.hidden
      .loader
        .spinner

    .add-comment-switcher{class: ("hidden" unless expanded_info)}
      = render partial: "comments/new_comment", locals: {post_id: post.id}
