名片中的取消关注和添加关注

This commit is contained in:
cxt 2016-05-05 11:09:53 +08:00
parent 06586f9e4b
commit f4cb6f120c
1 changed files with 2 additions and 2 deletions

View File

@ -2,8 +2,8 @@
<%= link_to("编辑资料", my_account_path, :class => "fl UsersEditBtn") %>
<% else %>
<%if(user.watched_by?(User.current))%>
<%= link_to "取消关注",Setting.host_name + "/watch?object_type=user&object_id="+user.id.to_s + "&target_id="+user.id.to_s,:class => "userFollow mr27 fl", :method => "delete",:remote => "true", :title => "取消关注"%>
<%= link_to "取消关注",watch_path(:host=> Setting.host_name,:object_type=> 'user',:object_id=>user.id.to_s,:target_id=>user.id.to_s),:class => "userFollow mr27 fl", :method => "delete",:remote => "true", :title => "取消关注"%>
<% else %>
<%= link_to "添加关注",Setting.host_name + "/watch?object_type=user&object_id="+user.id.to_s + "&target_id="+user.id.to_s,:class => "userFollow mr27 fl", :method => "post",:remote => "true", :title => "添加关注"%>
<%= link_to "添加关注",watch_path(:host=> Setting.host_name,:object_type=> 'user',:object_id=>user.id.to_s,:target_id=>user.id.to_s),:class => "userFollow mr27 fl", :method => "post",:remote => "true", :title => "添加关注"%>
<% end %>
<% end %>