设为主页后页面未刷新
This commit is contained in:
parent
e5cfcdc038
commit
70c7b0d12c
|
@ -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
|
||||
|
||||
|
|
|
@ -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 %>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
$("#user_homepages").html('<%= escape_javascript(render :partial => 'articles') %>');
|
|
@ -1 +0,0 @@
|
|||
$("#user_homepages").html('<%= escape_javascript(render :partial => 'articles') %>');
|
Loading…
Reference in New Issue