From 9e286ef8a5f01f717ce63b66c5adb01668f64a3b Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 8 Jan 2016 10:11:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E5=BD=93=E5=89=8D=E7=94=A8?= =?UTF-8?q?=E6=88=B7=EF=BC=8C=E9=BC=A0=E6=A0=87=E7=BB=8F=E8=BF=87=E8=AF=A5?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=A4=B4=E5=83=8F=E6=98=BE=E7=A4=BA=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E4=BF=A1=E6=81=AF=E6=97=B6=EF=BC=8C=E6=9C=89=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E8=B5=84=E6=96=99=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_show_detail_info.html.erb | 4 ++-- app/views/users/_watch_btn_for_picture.html.erb | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/views/users/_show_detail_info.html.erb b/app/views/users/_show_detail_info.html.erb index c0afeb255..44dfc3e68 100644 --- a/app/views/users/_show_detail_info.html.erb +++ b/app/views/users/_show_detail_info.html.erb @@ -4,7 +4,7 @@
-

<%= user %>

<%#= user.show_name %> +

<%= user %>

<%= user.show_name %>

<%= user.user_extensions.technical_title %>

@@ -30,8 +30,8 @@ <%= render :partial => 'users/watch_btn_for_picture', :locals => {:user => user} %>
- <%= link_to "私信", feedback_path(user), :class => 'greyBtn fl', :target => "_blank" %> <%= link_to "留言", feedback_path(user), :class => 'greyBtn fr', :target => "_blank" %> + <%= link_to "私信", feedback_path(user), :class => 'greyBtn fr', :style => 'margin-right:20px;', :target => "_blank" %> diff --git a/app/views/users/_watch_btn_for_picture.html.erb b/app/views/users/_watch_btn_for_picture.html.erb index e388dac40..e604be318 100644 --- a/app/views/users/_watch_btn_for_picture.html.erb +++ b/app/views/users/_watch_btn_for_picture.html.erb @@ -1,5 +1,9 @@ -<%if(user.watched_by?(User.current))%> - <%= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id),:class => "userFollow mr27 fl", :method => "delete",:remote => "true", :title => "取消关注"%> +<% if User.current == user %> + <%= link_to("编辑资料", my_account_path, :class => "fl UsersEditBtn") %> <% else %> - <%= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id),:class => "userFollow mr27 fl", :method => "post",:remote => "true", :title => "添加关注"%> + <%if(user.watched_by?(User.current))%> + <%= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id),:class => "userFollow mr27 fl", :method => "delete",:remote => "true", :title => "取消关注"%> + <% else %> + <%= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id),:class => "userFollow mr27 fl", :method => "post",:remote => "true", :title => "添加关注"%> + <% end %> <% end %> \ No newline at end of file