diff --git a/app/controllers/article_homepages_controller.rb b/app/controllers/article_homepages_controller.rb index 732ef0f5d..50567dcfe 100644 --- a/app/controllers/article_homepages_controller.rb +++ b/app/controllers/article_homepages_controller.rb @@ -27,6 +27,7 @@ class ArticleHomepagesController < ApplicationController end def show + @user = User.find params[:user_id] respond_to do |format| format.html {render :layout => 'clear_base'} end diff --git a/app/views/article_homepages/_article_show.html.erb b/app/views/article_homepages/_article_show.html.erb index 145d24eea..861ea438f 100644 --- a/app/views/article_homepages/_article_show.html.erb +++ b/app/views/article_homepages/_article_show.html.erb @@ -1,7 +1,7 @@
+ <%= link_to(@user.show_name, user_path(@user), :class => 'sy_cgrey') %> + > + <% if @user.base_homepage %> + <%=link_to @user.base_homepage.title, homepage_user_path(@user.login), :class => 'sy_cgrey' %> + > + <% else %> + <%=link_to '编辑主页', user_homepages_path(:user_id => @user.id), :class => 'sy_cgrey' %> + > + <% end %> + <%=link_to @article.title, user_homepage_show_path(:user_id=> @article.user_id,:id=> @article), :class => 'sy_cgrey' %> +
<% end %> <% if @article.nil? %> <% if User.current == @user && @user.homepage.article_homepages.empty? %> @@ -30,7 +43,7 @@