Skip to content
Extraits de code Groupes Projets
Valider aa7343d7 rédigé par danielgrippi's avatar danielgrippi Validation de Dennis Collinson
Parcourir les fichiers

add profile streams to backbone. this breaks hovercards, atm.

parent 42ce3b27
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -84,6 +84,8 @@ class PeopleController < ApplicationController ...@@ -84,6 +84,8 @@ class PeopleController < ApplicationController
end end
def show def show
@backbone = true
@person = Person.find_from_id_or_username(params) @person = Person.find_from_id_or_username(params)
if remote_profile_with_no_user_session? if remote_profile_with_no_user_session?
...@@ -124,13 +126,13 @@ class PeopleController < ApplicationController ...@@ -124,13 +126,13 @@ class PeopleController < ApplicationController
end end
if params[:only_posts] if params[:only_posts]
render :partial => 'shared/stream', :locals => {:posts => @stream.stream_posts} respond_to do |format|
format.html{ render :partial => 'shared/stream', :locals => {:posts => @stream.stream_posts} }
end
else else
respond_to do |format| respond_to do |format|
format.all { respond_with @person, :locals => {:post_type => :all} } format.all { respond_with @person, :locals => {:post_type => :all} }
format.json { format.json{ render :json => @stream.stream_posts.to_json(:include => {:author => {:include => :profile}}) }
render :json => @person.to_json(:includes => params[:includes])
}
end end
end end
end end
......
...@@ -27,14 +27,15 @@ ...@@ -27,14 +27,15 @@
= render 'people/sub_header', :person => @person, :contact => @contact = render 'people/sub_header', :person => @person, :contact => @contact
/ hackity hack until we get a photo stream / hackity hack until we get a photo stream
- if (@posts && @posts.length > 0) || (@stream && @stream.stream_posts.length > 0) - if @backbone && (@posts && @posts.length > 0) || (@stream && @stream.stream_posts.length > 0)
-if @post_type == :photos -if @post_type == :photos
= render 'photos/index', :photos => @posts = render 'photos/index', :photos => @posts
- else - else
#main_stream.stream #main_stream.stream
= render 'shared/stream', :posts => @stream.stream_posts - if !@backbone
#pagination = render 'shared/stream', :posts => @stream.stream_posts
=link_to(t('more'), next_page_path, :class => 'paginate') #pagination
=link_to(t('more'), next_page_path, :class => 'paginate')
- else - else
#main_stream #main_stream
......
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