Skip to content
Extraits de code Groupes Projets
Valider 1a642e04 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

Merge branch 'master' of github.com:diaspora/diaspora

parents 4a39d1a5 1a481d43
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -13,6 +13,7 @@ module SocketsHelper ...@@ -13,6 +13,7 @@ module SocketsHelper
begin begin
user = User.find_by_id uid user = User.find_by_id uid
v = render_to_string(:partial => type_partial(object), :locals => {:post => object, :current_user => user}) unless object.is_a? Retraction v = render_to_string(:partial => type_partial(object), :locals => {:post => object, :current_user => user}) unless object.is_a? Retraction
v = render_to_string(:partial => 'shared/stream_element', :locals => {:post => object, :current_user => user}) unless object.is_a? Retraction
rescue Exception => e rescue Exception => e
Rails.logger.error("web socket view rendering failed for object #{object.inspect}.") Rails.logger.error("web socket view rendering failed for object #{object.inspect}.")
raise e raise e
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
= render 'aspects/no_posts_message' = render 'aspects/no_posts_message'
%ul#stream %ul#stream
- for post in @posts - for post in @posts
= render type_partial(post), :post => post = render 'shared/stream_element', :post => post
#pagination #pagination
= will_paginate @posts = will_paginate @posts
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
= render 'aspects/no_posts_message' = render 'aspects/no_posts_message'
%ul#stream %ul#stream
- for post in @posts - for post in @posts
= render type_partial(post), :post => post = render 'shared/stream_element', :post => post
#pagination #pagination
= will_paginate @posts = will_paginate @posts
......
...@@ -2,35 +2,9 @@ ...@@ -2,35 +2,9 @@
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
%li.message{:data=>{:guid=>post.id}} = link_to (image_tag post.url(:thumb_large)), object_path(post), :class => 'stream_photo'
= person_image_link(post.person) %p.photo_description
= post.caption
.content
.from
= link_to post.person.real_name, post.person
.aspect
%ul
- if post.public?
%li= t('.the_world')
- else
- for aspect in current_user.aspects_with_post( post.id )
%li= link_to aspect.name, aspect
- if current_user.owns?(post)
.right
= link_to t('delete'), photo_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete"
=t('.posted_a_photo')
%br
%br
= link_to (image_tag post.url(:thumb_large)), object_path(post)
.info
%span.time= link_to(how_long_ago(post), photo_path(post))
= link_to "#{t('.show_comments')} (#{post.comments.count})", '#', :class => "show_post_comments"
= render "comments/comments", :post => post
= link_to "view all of #{post.person.real_name}'s photos", person_photos_path(post.person), :class => "small_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{:id => post.id, :class => ("mine" if current_user.owns?(post))}
= person_image_link(post.person)
= yield post_yield_tag(post)
= = render type_partial(post), :post => post
-# 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}}
= person_image_link(post.person)
.content
.from
= link_to post.person.real_name, post.person
.aspect
%ul
- if post.public?
%li= t('.the_world')
- else
- for aspect in current_user.aspects_with_post( post.id )
%li= link_to aspect.name, aspect
- if current_user.owns?(post)
.right
= link_to t('delete'), photo_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete"
= render type_partial(post), :post => post
.info
%span.time= link_to(how_long_ago(post), photo_path(post))
= link_to "#{t('.show_comments')} (#{post.comments.count})", '#', :class => "show_post_comments"
= render "comments/comments", :post => post
...@@ -2,32 +2,4 @@ ...@@ -2,32 +2,4 @@
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
%li.message{ :data=>{:guid=>post.id}, :class => ("mine" if current_user.owns?(post))} = markdownify(post.message)
= person_image_link(post.person)
.content
.from
= link_to post.person.real_name, post.person
.aspect
%ul
- if post.public?
the world
- else
- for aspect in current_user.aspects_with_post( post.id )
%li= link_to aspect.name, aspect
- if current_user.owns?(post)
.right
= render "shared/reshare", :post => post, :current_user => current_user
= link_to t('delete'), status_message_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete"
= markdownify(post.message)
.info
%span.time= link_to(how_long_ago(post), object_path(post))
= link_to "#{t('.show_comments')} (#{post.comments.count})", '#', :class => "show_post_comments"
= render "comments/comments", :post => post
...@@ -62,6 +62,9 @@ en: ...@@ -62,6 +62,9 @@ en:
search: "Search" search: "Search"
logout: "logout" logout: "logout"
shared: shared:
stream_element:
show_comments: "show comments"
the_world: "the world"
aspect_nav: aspect_nav:
all_aspects: "All Aspects" all_aspects: "All Aspects"
manage: "Manage" manage: "Manage"
...@@ -186,10 +189,8 @@ en: ...@@ -186,10 +189,8 @@ en:
editing: "Editing" editing: "Editing"
delete_photo: "Delete Photo" delete_photo: "Delete Photo"
photo: photo:
show_comments: "show comments"
posted_a_new_photo_to: "posted a new photo to" posted_a_new_photo_to: "posted a new photo to"
posted_a_photo: "posted a photo" posted_a_photo: "posted a photo"
the_world: "the world"
new: new:
new_photo: "New Photo" new_photo: "New Photo"
back_to_list: "Back to List" back_to_list: "Back to List"
...@@ -232,8 +233,6 @@ en: ...@@ -232,8 +233,6 @@ en:
new_status_message: new_status_message:
tell_me_something_good: "tell me something good" tell_me_something_good: "tell me something good"
oh_yeah: "oh yeah!" oh_yeah: "oh yeah!"
status_message:
show_comments: "show comments"
show: show:
status_message: "Status Message" status_message: "Status Message"
comments: "comments" comments: "comments"
......
...@@ -315,6 +315,25 @@ li.message ...@@ -315,6 +315,25 @@ li.message
:weight normal :weight normal
:size 14px :size 14px
.stream_photo
:float left
:margin
:top 6px
.photo_description
:margin
:top 6px
:padding
:left 220px
:min-height 185px
:color #888
:font
:style italic
.small_text
:font
:size 10px
div.info div.info
:color #999 :color #999
:font-size smaller :font-size smaller
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter