From e17b83470694f71c32b4c06b3b99a855b1889bd1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 31 Jul 2015 16:09:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=B5=84=E6=96=99=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=9C=A8=E5=A4=B4=E5=83=8F=E7=9A=84=E5=8F=B3=E4=B8=8B?= =?UTF-8?q?=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_user_watch_btn.html.erb | 17 ++++++++++------- app/views/layouts/base_users_new.html.erb | 4 +--- public/stylesheets/users.css | 4 +++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/views/layouts/_user_watch_btn.html.erb b/app/views/layouts/_user_watch_btn.html.erb index 234b81152..578319b68 100644 --- a/app/views/layouts/_user_watch_btn.html.erb +++ b/app/views/layouts/_user_watch_btn.html.erb @@ -1,8 +1,11 @@ -<% if(User.current.logged? && User.current!=target)%> - <%if(target.watched_by?(User.current))%> - 取消关注 - <% else %> - 关注 - <% end %> +<% if User.current.logged?%> + <% if User.current == target%> + 编辑资料 + <%else%> + <%if(target.watched_by?(User.current))%> + 取消关注 + <% else %> + 添加关注 + <% end %> + <% end%> <% end %> \ No newline at end of file diff --git a/app/views/layouts/base_users_new.html.erb b/app/views/layouts/base_users_new.html.erb index 1f8e10bc9..33973b047 100644 --- a/app/views/layouts/base_users_new.html.erb +++ b/app/views/layouts/base_users_new.html.erb @@ -146,9 +146,7 @@ (<%=@user.projects.count%>) - + <% else%>