socialforge/app/views/watchers/watch.js.erb

8 lines
378 B
Plaintext
Raw Normal View History

2016-10-28 17:47:21 +08:00
<% if @project %>
$('#fans_num').html('<%= @project.watcher_users.count %>');
// $('#project-'+'<%=@project.id%>'+'-watcher').html('取消关注');
$('#project-'+'<%=@project.id%>'+'-watcher').replaceWith("<%= escape_javascript watcher_link_for_project(@project, User.current)%>");
<% else %>
$('#fans_num').html('<%= j(@user.watcher_users.count) %>');
<% end %>