remove sort order option from the stream (commented at is too crazy and way to slow on large data sets)
This commit is contained in:
parent
d6b68d2f9b
commit
95aac2f352
4 changed files with 1 additions and 23 deletions
|
|
@ -138,19 +138,8 @@ class ApplicationController < ActionController::Base
|
||||||
@tags ||= current_user.followed_tags
|
@tags ||= current_user.followed_tags
|
||||||
end
|
end
|
||||||
|
|
||||||
def save_sort_order
|
|
||||||
if params[:sort_order].present?
|
|
||||||
session[:sort_order] = (params[:sort_order] == 'created_at') ? 'created_at' : 'updated_at'
|
|
||||||
elsif session[:sort_order].blank?
|
|
||||||
session[:sort_order] = 'created_at'
|
|
||||||
else
|
|
||||||
session[:sort_order] = (session[:sort_order] == 'created_at') ? 'created_at' : 'updated_at'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def default_stream_action(stream_klass)
|
def default_stream_action(stream_klass)
|
||||||
authenticate_user!
|
authenticate_user!
|
||||||
save_sort_order
|
|
||||||
@stream = stream_klass.new(current_user, :max_time => max_time, :order => sort_order)
|
@stream = stream_klass.new(current_user, :max_time => max_time, :order => sort_order)
|
||||||
|
|
||||||
if params[:only_posts]
|
if params[:only_posts]
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ require File.join(Rails.root, "lib", 'stream', "aspect")
|
||||||
|
|
||||||
class AspectsController < ApplicationController
|
class AspectsController < ApplicationController
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
before_filter :save_sort_order, :only => :index
|
|
||||||
before_filter :save_selected_aspects, :only => :index
|
before_filter :save_selected_aspects, :only => :index
|
||||||
before_filter :ensure_page, :only => :index
|
before_filter :ensure_page, :only => :index
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,6 @@
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
#aspect_stream_header
|
#aspect_stream_header
|
||||||
#sort_by
|
|
||||||
= t('streams.recently')
|
|
||||||
%span.controls
|
|
||||||
= link_to_if(session[:sort_order] == 'created_at', t('streams.commented_on'), stream.link(:sort_order => 'updated_at'))
|
|
||||||
·
|
|
||||||
= link_to_if(session[:sort_order] == 'updated_at', t('streams.posted'), stream.link(:sort_order => 'created_at' ))
|
|
||||||
|
|
||||||
%h3
|
%h3
|
||||||
= stream.title
|
= stream.title
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -845,10 +845,7 @@ en:
|
||||||
no_applications: "You haven't registered any applications yet."
|
no_applications: "You haven't registered any applications yet."
|
||||||
|
|
||||||
streams:
|
streams:
|
||||||
recently: "recently:"
|
community_spotlight_stream: "Community Spotlight"
|
||||||
commented_on: "commented on"
|
|
||||||
posted: "posted"
|
|
||||||
community_spotlight_stream: "Community Spotlight"
|
|
||||||
aspects_stream: "Aspects"
|
aspects_stream: "Aspects"
|
||||||
mentioned_stream: "@Mentions"
|
mentioned_stream: "@Mentions"
|
||||||
followed_tags_stream: "#Followed Tags"
|
followed_tags_stream: "#Followed Tags"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue