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
|
||||
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)
|
||||
authenticate_user!
|
||||
save_sort_order
|
||||
@stream = stream_klass.new(current_user, :max_time => max_time, :order => sort_order)
|
||||
|
||||
if params[:only_posts]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ require File.join(Rails.root, "lib", 'stream', "aspect")
|
|||
|
||||
class AspectsController < ApplicationController
|
||||
before_filter :authenticate_user!
|
||||
before_filter :save_sort_order, :only => :index
|
||||
before_filter :save_selected_aspects, :only => :index
|
||||
before_filter :ensure_page, :only => :index
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,6 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
#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
|
||||
= stream.title
|
||||
|
||||
|
|
|
|||
|
|
@ -845,10 +845,7 @@ en:
|
|||
no_applications: "You haven't registered any applications yet."
|
||||
|
||||
streams:
|
||||
recently: "recently:"
|
||||
commented_on: "commented on"
|
||||
posted: "posted"
|
||||
community_spotlight_stream: "Community Spotlight"
|
||||
community_spotlight_stream: "Community Spotlight"
|
||||
aspects_stream: "Aspects"
|
||||
mentioned_stream: "@Mentions"
|
||||
followed_tags_stream: "#Followed Tags"
|
||||
|
|
|
|||
Loading…
Reference in a new issue