用户关注ajax刷新
This commit is contained in:
parent
3a25f44d83
commit
a111b9a3fd
|
@ -30,9 +30,13 @@
|
|||
<a href="<%= url_for(:controller => 'my', :action => 'account') %>" class="fr gz_btn mr10 ">编辑资料</a>
|
||||
<%else%>
|
||||
<%if(user.watched_by?(User.current))%>
|
||||
<a id="user_watch_id" href="<%= watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
|
||||
<a id="user_watch_id" href="javascript:void(0);">
|
||||
<%=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 => "取消关注" %>
|
||||
</a>
|
||||
<% else %>
|
||||
<a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>user.id,:target_id=>user.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">添加关注</a>
|
||||
<a id="user_watch_id" href="javascript:void(0);">
|
||||
<%= 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 => "添加关注" %>
|
||||
</a>
|
||||
<% end %>
|
||||
<% end%>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue