Stream is its own partial, which takes a collection of posts
This commit is contained in:
parent
32d953f457
commit
f594fa1d80
4 changed files with 14 additions and 10 deletions
|
|
@ -9,9 +9,8 @@
|
||||||
= render 'aspects/no_friends_message', :aspect => @aspect, :friend_count => @friends.count
|
= render 'aspects/no_friends_message', :aspect => @aspect, :friend_count => @friends.count
|
||||||
= render 'shared/publisher', :aspect => @aspect
|
= render 'shared/publisher', :aspect => @aspect
|
||||||
= render 'aspects/no_posts_message', :post_count => @posts.count, :friend_count => @friends.count
|
= render 'aspects/no_posts_message', :post_count => @posts.count, :friend_count => @friends.count
|
||||||
%ul#stream
|
|
||||||
- for post in @posts
|
= render 'shared/stream', :posts => @posts
|
||||||
= render 'shared/stream_element', :post => post
|
|
||||||
|
|
||||||
#pagination
|
#pagination
|
||||||
= will_paginate @posts
|
= will_paginate @posts
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,8 @@
|
||||||
= render 'aspects/no_friends_message', :aspect => @aspect, :friend_count => @friends.count
|
= render 'aspects/no_friends_message', :aspect => @aspect, :friend_count => @friends.count
|
||||||
= render 'shared/publisher', :aspect => @aspect
|
= render 'shared/publisher', :aspect => @aspect
|
||||||
= render 'aspects/no_posts_message', :post_count => @posts.count, :friend_count => @friends.count
|
= render 'aspects/no_posts_message', :post_count => @posts.count, :friend_count => @friends.count
|
||||||
%ul#stream
|
|
||||||
- for post in @posts
|
= render 'shared/stream', :posts => @posts
|
||||||
= render 'shared/stream_element', :post => post
|
|
||||||
|
|
||||||
#pagination
|
#pagination
|
||||||
= will_paginate @posts
|
= will_paginate @posts
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,9 @@
|
||||||
- if @contact || current_user.person == @person
|
- if @contact || current_user.person == @person
|
||||||
|
|
||||||
- if @posts.count > 0
|
- if @posts.count > 0
|
||||||
%ul#stream
|
= render 'shared/stream', :posts => @posts
|
||||||
- for post in @posts
|
= will_paginate @posts
|
||||||
= render 'shared/stream_element', :post => post
|
|
||||||
= will_paginate @posts
|
|
||||||
- else
|
- else
|
||||||
%h3= t('.no_posts')
|
%h3= t('.no_posts')
|
||||||
|
|
||||||
|
|
|
||||||
7
app/views/shared/_stream.haml
Normal file
7
app/views/shared/_stream.haml
Normal 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
|
||||||
Loading…
Reference in a new issue