Stream is its own partial, which takes a collection of posts

This commit is contained in:
danielvincent 2010-11-07 10:38:00 -08:00
parent 32d953f457
commit f594fa1d80
4 changed files with 14 additions and 10 deletions

View file

@ -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

View file

@ -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

View file

@ -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')

View file

@ -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