diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 10e5e6f06..698b0de48 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -563,6 +563,7 @@ class ApplicationController < ActionController::Base
uri = URI.parse(back_url)
# do not redirect user to another host or to the login or register page
if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
+ back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s)
redirect_to(back_url)
return
end
diff --git a/app/views/users/_user_show.html.erb b/app/views/users/_user_show.html.erb
index 7cbb20e40..9eabb2be5 100644
--- a/app/views/users/_user_show.html.erb
+++ b/app/views/users/_user_show.html.erb
@@ -30,9 +30,13 @@
编辑资料
<%else%>
<%if(user.watched_by?(User.current))%>
- 取消关注
+
+ <%=link_to "取消关注", watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id, :remote => "true"), :class => "fr qx_btn mr10", :method => "delete", :title => "取消关注" %>
+
<% else %>
- 添加关注
+
+ <%= link_to "添加关注", watch_path(:object_type=>'user',:object_id=>user.id,:target_id=>user.id, :remote => "true"), :class => "fr gz_btn mr10", :method => "post", :title => "添加关注" %>
+
<% end %>
<% end%>
<% end %>
diff --git a/app/views/users/user_resource.js.erb b/app/views/users/user_resource.js.erb
index 3ebb308b4..dcb22ccf3 100644
--- a/app/views/users/user_resource.js.erb
+++ b/app/views/users/user_resource.js.erb
@@ -1,4 +1,5 @@
$("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>');
$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>');
$("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
-$("#res_count").html(0);
\ No newline at end of file
+$("#res_count").html(0);
+$("#checkboxAll").attr('checked',false);
\ No newline at end of file