开始修复关注不更新fans的bug

This commit is contained in:
william 2013-08-10 16:16:02 +08:00
parent aafc00ec77
commit 96b4e44553
2 changed files with 4 additions and 5 deletions

View File

@ -47,12 +47,11 @@
</table>
<div id="praise_tread">
<div style="padding-left: 3px"><%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @user,:show_flag => false,:user_id => User.current.id}%></div>
</div>
<div style="padding-left: 2px">
<%= l(:label_user_watcher) %> (<strong class="font_small_watch"><%= link_to User.watched_by(@user.id).count, :controller=>"users",:action=>"user_watchlist" %></strong>) &nbsp;
<%= l(:label_user_fans) %> (<strong class="font_small_watch"><%= link_to @user.watcher_users.count,:controller=>"users",:action=>"user_fanslist" %></strong>)
<div>
<%= l(:label_user_watcher) %> (<strong class="font_small_watch"><%= User.watched_by(@user.id).count %></strong>) &nbsp;
<%= l(:label_user_fans) %>(<strong class="font_small_watch"><span id="fans_num"><%= @user.watcher_users.count %></span></strong>)
</div>
</div>
<div class="user_underline"></div>
@ -93,7 +92,6 @@
<!--fans-->
<div class="user_fans">
<div class="font_title_left">
<strong><%= l(:label_user_fans) %></strong>
</div>
<div class="left_wf">
<table>

View File

@ -0,0 +1 @@
$('#fans_num').html('<%= j(@user.watcher_users.count) %>')