73 lines
3.5 KiB
Plaintext
73 lines
3.5 KiB
Plaintext
<div class="homepageContentContainer" style="margin-top: 25px;">
|
|
<div class="homepageMainContent">
|
|
<div class="postRightContainer pr" style="padding: 25px 40px;">
|
|
<% if User.current == @user && @article == @user.base_homepage %>
|
|
<div class="homepagePostSetting" style="top: 0px;">
|
|
<ul>
|
|
<li class="homepagePostSettingIcon">
|
|
<ul class="homepagePostSettiongText">
|
|
<li>
|
|
<%= link_to(l(:button_conf_base_homepage), user_homepages_path(:user_id=>@user.id), :class => 'postOptionLink' )%>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<% elsif !@article.nil? && @article != @user.base_homepage %>
|
|
<p class="sy_cgrey" style="position:absolute; height:20px; left: 1px; top: -22px;">
|
|
<span class="fl">
|
|
<%= link_to(@user.show_name, user_path(@user), :class => 'sy_cgrey') %>
|
|
>
|
|
</span>
|
|
<% if @user.base_homepage %>
|
|
<span class="fl">
|
|
<%=link_to @user.base_homepage.title, homepage_user_path(@user.login), :class => 'sy_cgrey fl', :style => 'white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 300px;' %>
|
|
>
|
|
</span>
|
|
<% else %>
|
|
<span class="fl">
|
|
<%=link_to '编辑主页', user_homepages_path(:user_id => @user.id), :class => 'sy_cgrey' %>
|
|
>
|
|
</span>
|
|
<% end %>
|
|
<%=link_to @article.title, user_homepage_show_path(:user_id=> @article.user_id,:id=> @article), :class => 'sy_cgrey', :style => 'white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 300px;' %>
|
|
</p>
|
|
<% end %>
|
|
<% if @article.nil? %>
|
|
<% if User.current == @user && @user.homepage.article_homepages.empty? %>
|
|
<p class="nodata mt10" style="text-align: left;">您还没有创建属于自己的个人主页。<%=link_to '新建', new_user_homepage_article_homepage_path(:user_id=> @user.id, :homepage_id => @user.homepage.id), :target => "_blank", :class => 'linkBlue' %></p>
|
|
<% elsif User.current == @user %>
|
|
<p class="nodata mt10 mb0" style="text-align: left;">您还没有设置个人主页,其他用户无法查看哦</p>
|
|
<% else %>
|
|
<p class="nodata mt10 mb0" style="text-align: left;">该用户还未设置个人主页</p>
|
|
<% end %>
|
|
<% else %>
|
|
<div class="cl"></div>
|
|
<div class="postThemeContainer">
|
|
<div class="postDetailPortrait">
|
|
<%= link_to image_tag(url_to_avatar(@article.user),:width=>50,:height => 50,:alt=>'图像' ),user_path(@article.user) %>
|
|
</div>
|
|
<div class="postThemeWrap">
|
|
<div class="postDetailTitle fl mt5">
|
|
<a href="javascript:void(0);" class="f14 linkGrey4 fb break_word" style="overflow:hidden;"><%= @article.title%></a>
|
|
</div>
|
|
<div class="cl"></div>
|
|
|
|
<div class="postDetailDate"><%= format_time( @article.created_at)%></div>
|
|
<div class="cl"></div>
|
|
</div>
|
|
<div class="cl"></div>
|
|
</div>
|
|
<div class="break_word mt10" style="padding: 5px 5px 0 0" id="intro_content">
|
|
<%=@article.content.html_safe %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$(function(){
|
|
autoUrl('intro_content');
|
|
});
|
|
</script> |