2016-10-19 18:03:59 +08:00
|
|
|
<ul>
|
|
|
|
<% if User.current.logged?%>
|
2017-01-05 15:18:20 +08:00
|
|
|
<% if User.current == target %>
|
|
|
|
<!--<li style="width: 119px; float: left; border-right: 1px solid #ddd;"><%#= link_to("个人资料", my_account_path, :class => "user_editinfo") %></li>-->
|
2016-12-12 10:55:19 +08:00
|
|
|
<li><%= link_to '个人主页', homepage_user_path(@user), :class => "user_editinfo", :target => '_blank' %></li>
|
2016-10-19 18:03:59 +08:00
|
|
|
<li class="cl"></li>
|
|
|
|
<% else%>
|
2017-01-05 15:18:20 +08:00
|
|
|
<li style="width: 119px; float: left; border-right: 1px solid #ddd;">
|
|
|
|
<% if target.base_homepage.nil? %>
|
|
|
|
<a href="javascript:void(0)" class ="user_editinfo" style="color: #cccccc" title="该用户暂未设置主页">TA的主页</a>
|
|
|
|
<% else %>
|
|
|
|
<%=link_to "TA的主页", homepage_user_path(@user.login), :class => 'user_editinfo', :target => '_blank' %>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
<li style="width: 118px; float: left;">
|
2016-10-19 18:03:59 +08:00
|
|
|
<%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 %>
|
|
|
|
</li>
|
|
|
|
<li class="cl"></li>
|
2017-01-05 15:18:20 +08:00
|
|
|
<% end %>
|
2016-10-19 18:03:59 +08:00
|
|
|
<% end %>
|
|
|
|
</ul>
|