socialforge/app/views/layouts/_user_watch_btn.html.erb

7 lines
506 B
Plaintext

<% if User.current.logged?%>
<%if(target.watched_by?(User.current))%>
<%= link_to "",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "homepageFollow", :method => "delete",:remote => "true", :title => "取消关注"%>
<% else %>
<%= link_to "",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "homepageFollowCancel", :method => "post",:remote => "true", :title => "添加关注"%>
<% end %>
<% end %>