Merge branch 'cxt_course' into develop

This commit is contained in:
cxt 2016-10-20 16:20:42 +08:00
commit d821683f68
2 changed files with 16 additions and 2 deletions

View File

@ -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

View File

@ -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') %>
&nbsp;&gt;&nbsp;
<% if @user.base_homepage %>
<%=link_to @user.base_homepage.title, homepage_user_path(@user.login), :class => 'sy_cgrey' %>
&nbsp;&gt;&nbsp;
<% else %>
<%=link_to '编辑主页', user_homepages_path(:user_id => @user.id), :class => 'sy_cgrey' %>
&nbsp;&gt;&nbsp;
<% 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>