From 70c7b0d12c8e6fefbf1c2089e731f44ca5350111 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 19 Oct 2016 20:44:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E4=B8=BA=E4=B8=BB=E9=A1=B5=E5=90=8E?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=9C=AA=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homepages_controller.rb | 12 ------------ app/views/homepages/_article_list.html.erb | 2 -- app/views/homepages/cancel_homepage.js.erb | 1 - app/views/homepages/set_homepage.js.erb | 1 - 4 files changed, 16 deletions(-) delete mode 100644 app/views/homepages/cancel_homepage.js.erb delete mode 100644 app/views/homepages/set_homepage.js.erb diff --git a/app/controllers/homepages_controller.rb b/app/controllers/homepages_controller.rb index 71b1504d5..1ca35d0a0 100644 --- a/app/controllers/homepages_controller.rb +++ b/app/controllers/homepages_controller.rb @@ -41,12 +41,6 @@ class HomepagesController < ApplicationController @articles = @user.homepage.article_homepages.where("id != #{@user.base_homepage.id}").reorder("updated_at desc").all @articles.insert(0, @user.base_homepage) unless @user.base_homepage.nil? end - @limit = 20 - @is_remote = true - @atta_count = @articles.count - @atta_pages = Paginator.new @atta_count, @limit, 1 - @offset ||= @atta_pages.offset - @articles = paginateHelper @articles,@limit redirect_to user_homepages_path(:user_id => @user.id) end @@ -59,12 +53,6 @@ class HomepagesController < ApplicationController @articles = @user.homepage.article_homepages.where("id != #{@user.base_homepage.id}").reorder("updated_at desc").all @articles.insert(0, @user.base_homepage) unless @user.base_homepage.nil? end - @limit = 20 - @is_remote = true - @atta_count = @articles.count - @atta_pages = Paginator.new @atta_count, @limit, 1 - @offset ||= @atta_pages.offset - @articles = paginateHelper @articles,@limit redirect_to user_homepages_path(:user_id => @user.id) end diff --git a/app/views/homepages/_article_list.html.erb b/app/views/homepages/_article_list.html.erb index 08a891be7..2115ad5f6 100644 --- a/app/views/homepages/_article_list.html.erb +++ b/app/views/homepages/_article_list.html.erb @@ -37,7 +37,6 @@ l(:button_cancel_base_homepage), {:controller => 'homepages',:action => 'cancel_homepage',:user_id=>activity.user_id,:id=>activity.homepage_id, :article_id => activity.id}, :method => :post, - :remote => true, :class => 'postOptionLink' ) if User.current && User.current.id == activity.homepage.user_id %> <% else %> @@ -45,7 +44,6 @@ l(:button_set_base_homepage), {:controller => 'homepages',:action => 'set_homepage',:user_id=>activity.user_id,:id=>activity.homepage_id, :article_id => activity.id}, :method => :post, - :remote => true, :class => 'postOptionLink' ) if User.current && User.current.id == activity.homepage.user_id %> <% end %> diff --git a/app/views/homepages/cancel_homepage.js.erb b/app/views/homepages/cancel_homepage.js.erb deleted file mode 100644 index 7df0ea83e..000000000 --- a/app/views/homepages/cancel_homepage.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#user_homepages").html('<%= escape_javascript(render :partial => 'articles') %>'); \ No newline at end of file diff --git a/app/views/homepages/set_homepage.js.erb b/app/views/homepages/set_homepage.js.erb deleted file mode 100644 index 7df0ea83e..000000000 --- a/app/views/homepages/set_homepage.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#user_homepages").html('<%= escape_javascript(render :partial => 'articles') %>'); \ No newline at end of file