diaspora/app/views/shared/_stream_element.html.haml
2010-11-29 12:10:41 -08:00

35 lines
1.3 KiB
Text

-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%li.message{:data=>{:guid=>post.id}}
%a{:href => "/people/#{person.id}"}
%img{:src => image_or_default(person), :class => "avatar", :alt => person.real_name, :title => person.real_name, "data-person_id" => person.id}
.content
.from
%a{:href => "/people/#{person.id}"}=person.real_name
- if current_user.owns?(post)
.aspect
%ul
- if post.public?
%li= t('the_world')
- else
- for aspect in aspects.select{|a| post.aspect_ids.include?(a.id)}
%li
%a{:href => "/aspects/#{aspect.id}"}=aspect.name
.right
= render 'shared/reshare', :current_user => current_user, :post => post if post.is_a? StatusMessage
= link_to t('delete'), object_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete"
= render 'status_messages/status_message', :post => post
.info
%span.time= link_to(how_long_ago(post), status_message_path(post))
= comment_toggle(comments.length)
= render "comments/comments", :post_id => post.id, :comment_hashes => comments