2015-07-31 16:09:07 +08:00
|
|
|
<% if User.current.logged?%>
|
2015-08-29 14:34:59 +08:00
|
|
|
<% if User.current == target%>
|
2016-08-04 11:05:34 +08:00
|
|
|
<%= link_to("编辑个人资料", my_account_path, :class => "user_editinfo")%>
|
2015-08-29 14:34:59 +08:00
|
|
|
<% else%>
|
|
|
|
<%if(target.watched_by?(User.current))%>
|
2016-08-04 11:05:34 +08:00
|
|
|
<%= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "user_editinfo", :method => "delete",:remote => "true", :title => "取消关注"%>
|
2015-08-29 14:34:59 +08:00
|
|
|
<% else %>
|
2016-08-04 11:05:34 +08:00
|
|
|
<%= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "user_editinfo", :method => "post",:remote => "true", :title => "添加关注"%>
|
2015-08-29 14:34:59 +08:00
|
|
|
<% end %>
|
|
|
|
<% end%>
|
2015-07-09 15:27:49 +08:00
|
|
|
<% end %>
|