<% if User.current.logged?%>
    <% if User.current == target%>
        <%= link_to("编辑个人资料", my_account_path, :class => "user_editinfo")%>
    <% else%>
        <%if(target.watched_by?(User.current))%>
            <%= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "user_editinfo", :method => "delete",:remote => "true", :title => "取消关注"%>
        <% else %>
            <%= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "user_editinfo", :method => "post",:remote => "true", :title => "添加关注"%>
        <% end %>
    <% end%>
<% end %>