Skip to content
Extraits de code Groupes Projets
Valider f1330407 rédigé par Raphael Sofaer's avatar Raphael Sofaer
Parcourir les fichiers

The specs are green on my dev machine, let's see if CI is still red

parent efe79eb3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -31,7 +31,7 @@ class ApisController < ApplicationController #We should start with this versione
def home_timeline
set_defaults
timeline = current_user.visible_posts(:max_time => params[:max_time],
:per_page => params[:per_page],
:limit => params[:per_page],
:order => "#{params[:order]} DESC").includes(:comments, :photos, :likes, :dislikes)
respond_with timeline do |format|
format.json{ render :json => timeline.to_json(:format => :twitter) }
......
......@@ -21,7 +21,7 @@
.content
.from
= person_link(post.author, :class => 'author')
%time.timeago{:datetime => post.created_at, :integer => post.created_at.to_i}
%time.time.timeago{:datetime => post.created_at, :integer => post.created_at.to_i}
= render 'status_messages/status_message', :post => post, :photos => post.photos
.info
......@@ -33,7 +33,7 @@
%span.aspect_badges
= aspect_badges(aspects_with_post(all_aspects, post), :link => true)
%span.timeago
%span.timeago.time
= link_to(how_long_ago(post), status_message_path(post))
- unless (defined?(@commenting_disabled) && @commenting_disabled)
......
......@@ -12,6 +12,6 @@
= render 'status_messages/status_message', :post => post, :photos => post.photos
.info
%span.time
%span.time{:integer => post.created_at.to_i}
= t('ago', :time => time_ago_in_words(post.created_at))
= link_to "#{t('comments', :count => post.comments.length)} →", status_message_path(post), :class => 'comment_link right'
......@@ -7,10 +7,8 @@ var InfiniteScroll = {
itemSelector : ".stream_element",
// selector for all items you'll retrieve
pathParse : function( pathStr, nextPage ){
console.log(pathStr);
console.log(nextPage);
var newPath = pathStr.replace("?", "?only_posts=true&");
var last_time = $('#main_stream .stream_element').last().find('time.timeago').attr('integer');
var last_time = $('#main_stream .stream_element').last().find('.time').attr('integer');
return newPath.replace( /max_time=\d+/, 'max_time=' + last_time);
},
bufferPx: 500,
......
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