You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/watchers/watch.js.erb

14 lines
1.1 KiB

<% 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)%>");
<% elsif params[:user_watcher] == "user_fanslist" %>
$("#user_fans_list").html("<%= j (render :partial => "users/user_watcher_or_fans_list",
:locals => { :users => @user_fanlist, :user_count => @user_fanlist_count, :user_pages => @fans_pages, :action => "user_fanslist"}) %>");
$("#user_watcher_cout").html("我的关注 " + '<%= @user_watchlist_count %>');
<% elsif @collaborators.present? %>
$("#collaborators_list").html("<%= j(render :partial => 'shixuns/collaborators_list') %>");
<% else %>
$(".user_watch").replaceWith("<%= escape_javascript watcher_link_for_user(@users, User.current)%>");
$("#watcher_fan_list").html("<%= escape_javascript(render :partial => 'edu_user_watch_fan_list', :locals => {:current_user => (@user == User.current)}) %>");
<% end %>