Merge branch 'cxt_course' into develop
This commit is contained in:
commit
d821683f68
|
@ -27,6 +27,7 @@ class ArticleHomepagesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
@user = User.find params[:user_id]
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {render :layout => 'clear_base'}
|
format.html {render :layout => 'clear_base'}
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="homepageContentContainer" style="margin-top: 25px;">
|
<div class="homepageContentContainer" style="margin-top: 25px;">
|
||||||
<div class="homepageMainContent">
|
<div class="homepageMainContent">
|
||||||
<div class="postRightContainer pr" style="padding: 25px 40px;">
|
<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;">
|
<div class="homepagePostSetting" style="top: -25px;">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
@ -13,6 +13,19 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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 %>
|
<% end %>
|
||||||
<% if @article.nil? %>
|
<% if @article.nil? %>
|
||||||
<% if User.current == @user && @user.homepage.article_homepages.empty? %>
|
<% if User.current == @user && @user.homepage.article_homepages.empty? %>
|
||||||
|
@ -30,7 +43,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="postThemeWrap">
|
<div class="postThemeWrap">
|
||||||
<div class="postDetailTitle fl mt5">
|
<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>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue