Revert "Merge pull request #2428 from geckoxx/comment_stream"
This reverts commit8a27568273, reversing changes made to31ef2d60f7. Conflicts: app/helpers/stream_helper.rb app/views/aspects/index.html.haml config/locales/diaspora/en.yml config/routes.rb spec/lib/stream/comments_spec.rb
This commit is contained in:
parent
cec1f09202
commit
aa0aaa2f92
9 changed files with 1 additions and 74 deletions
|
|
@ -1,11 +0,0 @@
|
||||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
require File.join(Rails.root, 'lib','stream', 'comments')
|
|
||||||
|
|
||||||
class CommentStreamController < ApplicationController
|
|
||||||
def index
|
|
||||||
default_stream_action(Stream::Comments)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -22,8 +22,6 @@ module StreamHelper
|
||||||
public_stream_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
public_stream_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
||||||
elsif controller.instance_of?(AspectsController)
|
elsif controller.instance_of?(AspectsController)
|
||||||
aspects_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :a_ids => @stream.aspect_ids, :sort_order => session[:sort_order])
|
aspects_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :a_ids => @stream.aspect_ids, :sort_order => session[:sort_order])
|
||||||
elsif controller.instance_of?(CommentStreamController)
|
|
||||||
comment_stream_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
|
||||||
elsif controller.instance_of?(LikeStreamController)
|
elsif controller.instance_of?(LikeStreamController)
|
||||||
like_stream_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
like_stream_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,6 @@ class StatusMessage < Post
|
||||||
joins(:likes).where(:likes => {:author_id => person.id})
|
joins(:likes).where(:likes => {:author_id => person.id})
|
||||||
}
|
}
|
||||||
|
|
||||||
scope :commented_by, lambda { |person|
|
|
||||||
joins(:comments).where(:comments => {:author_id => person.id}).group("posts.id")
|
|
||||||
}
|
|
||||||
|
|
||||||
def self.user_tag_stream(user, tag_ids)
|
def self.user_tag_stream(user, tag_ids)
|
||||||
owned_or_visible_by_user(user).
|
owned_or_visible_by_user(user).
|
||||||
tag_stream(tag_ids)
|
tag_stream(tag_ids)
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,6 @@
|
||||||
%b
|
%b
|
||||||
= link_to t('streams.mentions.title'), mentions_path, :class => 'home_selector'
|
= link_to t('streams.mentions.title'), mentions_path, :class => 'home_selector'
|
||||||
|
|
||||||
.section
|
|
||||||
%ul.left_nav
|
|
||||||
%li
|
|
||||||
%b
|
|
||||||
= link_to t('streams.comment_stream.title'), comment_stream_path, :class => 'home_selector'
|
|
||||||
|
|
||||||
.section
|
.section
|
||||||
%ul.left_nav
|
%ul.left_nav
|
||||||
%li
|
%li
|
||||||
|
|
|
||||||
|
|
@ -889,10 +889,6 @@ en:
|
||||||
title: "@Mentions"
|
title: "@Mentions"
|
||||||
contacts_title: "People who mentioned you"
|
contacts_title: "People who mentioned you"
|
||||||
|
|
||||||
comment_stream:
|
|
||||||
title: "Commented Posts"
|
|
||||||
contacts_title: "People who posts you commented"
|
|
||||||
|
|
||||||
like_stream:
|
like_stream:
|
||||||
title: "Like Stream"
|
title: "Like Stream"
|
||||||
contacts_title: "People who Posts you like"
|
contacts_title: "People who Posts you like"
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,6 @@ Diaspora::Application.routes.draw do
|
||||||
resources :mentions, :only => [:index]
|
resources :mentions, :only => [:index]
|
||||||
resources "tag_followings", :only => [:create]
|
resources "tag_followings", :only => [:create]
|
||||||
|
|
||||||
get 'comment_stream' => 'comment_stream#index', :as => 'comment_stream'
|
|
||||||
|
|
||||||
get 'like_stream' => 'like_stream#index', :as => 'like_stream'
|
get 'like_stream' => 'like_stream#index', :as => 'like_stream'
|
||||||
|
|
||||||
get 'tags/:name' => 'tags#show', :as => 'tag'
|
get 'tags/:name' => 'tags#show', :as => 'tag'
|
||||||
|
|
@ -188,7 +186,7 @@ Diaspora::Application.routes.draw do
|
||||||
|
|
||||||
#Protocol Url
|
#Protocol Url
|
||||||
get 'protocol' => redirect("https://github.com/diaspora/diaspora/wiki/Diaspora%27s-federation-protocol")
|
get 'protocol' => redirect("https://github.com/diaspora/diaspora/wiki/Diaspora%27s-federation-protocol")
|
||||||
|
|
||||||
# Resque web
|
# Resque web
|
||||||
if AppConfig[:mount_resque_web]
|
if AppConfig[:mount_resque_web]
|
||||||
mount Resque::Server.new, :at => '/resque-jobs', :as => "resque_web"
|
mount Resque::Server.new, :at => '/resque-jobs', :as => "resque_web"
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
class Stream::Comments < Stream::Base
|
|
||||||
def link(opts={})
|
|
||||||
Rails.application.routes.url_helpers.comment_stream_path(opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
def title
|
|
||||||
I18n.translate("streams.comment_stream.title")
|
|
||||||
end
|
|
||||||
|
|
||||||
# @return [ActiveRecord::Association<Post>] AR association of posts
|
|
||||||
def posts
|
|
||||||
@posts ||= StatusMessage.commented_by(self.user.person)
|
|
||||||
end
|
|
||||||
|
|
||||||
def contacts_title
|
|
||||||
I18n.translate('streams.comment_stream.contacts_title')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
Diaspora.Pages.CommentStreamIndex = function() {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
this.subscribe("page/ready", function(evt, document) {
|
|
||||||
|
|
||||||
self.aspectNavigation = self.instantiate("AspectNavigation", document.find("ul#aspect_nav"));
|
|
||||||
self.stream = self.instantiate("Stream", document.find("#aspect_stream_container"));
|
|
||||||
self.infiniteScroll = self.instantiate("InfiniteScroll");
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
require 'spec_helper'
|
|
||||||
require File.join(Rails.root, 'spec', 'shared_behaviors', 'stream')
|
|
||||||
|
|
||||||
describe Stream::Comments do
|
|
||||||
before do
|
|
||||||
@stream = Stream::Comments.new(alice, :max_time => Time.now, :order => 'updated_at')
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'shared behaviors' do
|
|
||||||
it_should_behave_like 'it is a stream'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
Loading…
Reference in a new issue