个人主页的链接改成登录名

This commit is contained in:
cxt 2016-10-20 13:32:33 +08:00
parent f085b79999
commit 59f0101a62
3 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@
<ul class="list-file pr" onmouseover='$("#message_setting_<%= activity.id%>").show();' onmouseout='$("#message_setting_<%= activity.id%>").hide();'>
<li><span class="item_list fl"></span>
<% if activity.homepage.article_id and activity.id == activity.homepage.article_id %>
<%= link_to activity.title.to_s.html_safe, homepage_user_path(activity.user_id), :class=> "list-title fl", :target => '_blank' %>
<%= link_to activity.title.to_s.html_safe, homepage_user_path(activity.user.login), :class=> "list-title fl", :target => '_blank' %>
<span class="red_homework_btn_cir ml5">主页</span>
<% else %>
<%= link_to activity.title.to_s.html_safe, user_homepage_show_path(:user_id=>activity.user_id,:id=>activity), :class=> "list-title fl", :target => '_blank' %>

View File

@ -2,14 +2,14 @@
<% 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>
<li style="width: 118px; float: left;"><%= link_to '个人主页', homepage_user_path(@user), :class => "user_editinfo" %></li>
<li style="width: 118px; float: left;"><%= link_to '个人主页', homepage_user_path(@user.login), :class => "user_editinfo" %></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), :class => 'user_editinfo', :target => '_blank' %>
<%=link_to "主页", homepage_user_path(@user.login), :class => 'user_editinfo', :target => '_blank' %>
<% end %>
</li>
<li style="width: 118px; float: left;">

View File

@ -182,7 +182,7 @@
<li style="height:auto;">
<% if @user.homepage && !@user.homepage.article_homepages.empty? %>
<% if @user.base_homepage %>
<%=link_to '查看', homepage_user_path(@user), :class => 'linkBlue',:target => '_blank' %>
<%=link_to '查看', homepage_user_path(@user.login), :class => 'linkBlue',:target => '_blank' %>
<% else %>
<%=link_to '查看', user_homepages_path(:user_id => @user.id),:target => '_blank', :class => 'linkBlue' %>
<% end %>