diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index e4b7c07ed9fb7e3a2427576177e126c4b8cd2037..a05a5d14b6c2cd1b8049c8337e3073224343f47b 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -9,9 +9,8 @@ = render 'aspects/no_friends_message', :aspect => @aspect, :friend_count => @friends.count = render 'shared/publisher', :aspect => @aspect = render 'aspects/no_posts_message', :post_count => @posts.count, :friend_count => @friends.count - %ul#stream - - for post in @posts - = render 'shared/stream_element', :post => post + + = render 'shared/stream', :posts => @posts #pagination = will_paginate @posts diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index e4b7c07ed9fb7e3a2427576177e126c4b8cd2037..a05a5d14b6c2cd1b8049c8337e3073224343f47b 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -9,9 +9,8 @@ = render 'aspects/no_friends_message', :aspect => @aspect, :friend_count => @friends.count = render 'shared/publisher', :aspect => @aspect = render 'aspects/no_posts_message', :post_count => @posts.count, :friend_count => @friends.count - %ul#stream - - for post in @posts - = render 'shared/stream_element', :post => post + + = render 'shared/stream', :posts => @posts #pagination = will_paginate @posts diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 3cf1cead037d737804d2cdfca462816d89465dac..e95948ababfe8a559883b52b25798cb10abbb3dd 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -11,10 +11,9 @@ - if @contact || current_user.person == @person - if @posts.count > 0 - %ul#stream - - for post in @posts - = render 'shared/stream_element', :post => post - = will_paginate @posts + = render 'shared/stream', :posts => @posts + = will_paginate @posts + - else %h3= t('.no_posts') diff --git a/app/views/shared/_stream.haml b/app/views/shared/_stream.haml new file mode 100644 index 0000000000000000000000000000000000000000..5e31b2bd6cb63e3f2faf0a03ba1fbc2140721cb6 --- /dev/null +++ b/app/views/shared/_stream.haml @@ -0,0 +1,7 @@ +-# Copyright (c) 2010, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3 or later. See +-# the COPYRIGHT file. + +%ul#stream + - for post in posts + = render 'shared/stream_element', :post => post