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

aspects streams now ajax

parent f6701f22
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -7,6 +7,7 @@ class AspectsController < ApplicationController
respond_to :html
respond_to :json, :only => :show
respond_to :js
def index
@posts = current_user.visible_posts(:_type => "StatusMessage").paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC'
......
......@@ -15,10 +15,9 @@
= render 'aspects/no_contacts_message', :aspect => @aspect, :contact_count => @contacts.count
= render 'aspects/no_posts_message', :post_count => @post_hashes.length, :contact_count => @contacts.count
= render 'shared/stream', :posts => @post_hashes
%ul{:class => 'stream', :id => 'main_stream'}
= render 'shared/stream', :posts => @post_hashes
#pagination
= will_paginate @posts
.span-8.last
= render 'aspects/all_aspects_contacts'
......
$('#main_stream').html("<%= escape_javascript(render('shared/stream', :posts => @post_hashes)) %>");
......@@ -23,8 +23,5 @@
= render 'aspects/no_contacts_message', :aspect => @aspect, :contact_count => @aspect_contacts_count, :options => false
= render 'aspects/no_posts_message', :post_count => @post_count, :contact_count=> @aspect_contacts_count
= render 'shared/stream', :posts => @post_hashes
#pagination
= will_paginate @posts
%ul{:class => 'stream', :id => 'main_stream'}
= render 'shared/stream', :posts => @post_hashes
$('#main_stream').html("<%= escape_javascript(render('shared/stream', :posts => @post_hashes)) %>");
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- for post_hash in posts
= render 'shared/stream_element', post_hash.merge(:aspects => @aspects, :commenting_disabled => defined?(@commenting_disabled))
%ul{:class => 'stream', :id => 'main_stream'}
- for post_hash in posts
= render 'shared/stream_element', post_hash.merge(:aspects => @aspects, :commenting_disabled => defined?(@commenting_disabled))
.pagination
= will_paginate @posts
......@@ -14,6 +14,7 @@ javascripts:
- public/javascripts/vendor/fileuploader.js
- public/javascripts/view.js
- public/javascripts/stream.js
- public/javascripts/application.js
mobile:
- public/javascripts/vendor/jquery144.min.js
- public/javascripts/custom-mobile-scripting.js
......
$(function () {
$('#main_stream .pagination a').live('click', function () {
$.getScript(this.href);
return false;
}
);
});
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