From 78ccfe6a03b6a0bcea1d4eed70dc1d51cdbd2c77 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Wed, 12 Aug 2015 16:28:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=B3=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_show.html.erb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/views/users/_user_show.html.erb b/app/views/users/_user_show.html.erb index 8e3d27666..7cbb20e40 100644 --- a/app/views/users/_user_show.html.erb +++ b/app/views/users/_user_show.html.erb @@ -23,8 +23,19 @@ - <%= l(:label_x_has_fans,:count=>user.watcher_users.count)%> - <%= l(:label_has_watchers,:count=>User.watched_by(user.id).count) %> + <%= l(:label_x_has_fans,:count=>user.watcher_users.count, :remote => true)%> + <%= l(:label_has_watchers,:count=>User.watched_by(user.id).count, :remote => true) %> + <% if User.current.logged?%> + <% if User.current == user%> + 编辑资料 + <%else%> + <%if(user.watched_by?(User.current))%> + 取消关注 + <% else %> + 添加关注 + <% end %> + <% end%> + <% end %>