主页子页面链接
This commit is contained in:
parent
a9d4b45bff
commit
e8d7e64f80
|
@ -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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="homepageContentContainer" style="margin-top: 25px;">
|
||||
<div class="homepageMainContent">
|
||||
<div class="postRightContainer pr" style="padding: 25px 40px;">
|
||||
<% if User.current == @user %>
|
||||
<% if User.current == @user && @article == @user.base_homepage %>
|
||||
<div class="homepagePostSetting" style="top: -25px;">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
|
@ -13,6 +13,19 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% elsif !@article.nil? && @article != @user.base_homepage %>
|
||||
<p class="sy_cgrey" style="position:absolute; height:20px; left: 0px; top: -20px;">
|
||||
<%= 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' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% if @article.nil? %>
|
||||
<% if User.current == @user && @user.homepage.article_homepages.empty? %>
|
||||
|
@ -30,7 +43,7 @@
|
|||
</div>
|
||||
<div class="postThemeWrap">
|
||||
<div class="postDetailTitle fl mt5">
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;"><%= @article.title%></a>
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb break_word" style="overflow:hidden;"><%= @article.title%></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue