进入他人的首页,增加“TA的主页”入口
This commit is contained in:
parent
283c880531
commit
230e8c3605
|
@ -1,18 +1,18 @@
|
|||
<ul>
|
||||
<% if User.current.logged?%>
|
||||
<% if User.current == target%>
|
||||
<!-- <li style="width: 119px; float: left; border-right: 1px solid #ddd;"><%#= link_to("个人资料", my_account_path, :class => "user_editinfo") %></li>-->
|
||||
<% if User.current == target %>
|
||||
<!--<li style="width: 119px; float: left; border-right: 1px solid #ddd;"><%#= link_to("个人资料", my_account_path, :class => "user_editinfo") %></li>-->
|
||||
<li><%= link_to '个人主页', homepage_user_path(@user), :class => "user_editinfo", :target => '_blank' %></li>
|
||||
<li class="cl"></li>
|
||||
<% else%>
|
||||
<!-- <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="该用户暂未设置主页">主页</a>
|
||||
<%# else %>
|
||||
<%#=link_to "主页", homepage_user_path(@user.login), :class => 'user_editinfo', :target => '_blank' %>
|
||||
<%# end %>
|
||||
</li>-->
|
||||
<li>
|
||||
<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;">
|
||||
<%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 %>
|
||||
|
@ -20,6 +20,6 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<li class="cl"></li>
|
||||
<% end%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
Loading…
Reference in New Issue