取消博客的设为首页功能
This commit is contained in:
parent
d97ea3fb09
commit
e999cac944
|
@ -59,23 +59,23 @@
|
||||||
:class => 'postOptionLink'
|
:class => 'postOptionLink'
|
||||||
) if User.current.admin? || User.current.id == @article.author.id %>
|
) if User.current.admin? || User.current.id == @article.author.id %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<!--<li>-->
|
||||||
<% if @article.id == @article.blog.homepage_id %>
|
<%# if @article.id == @article.blog.homepage_id %>
|
||||||
<%= link_to(
|
<%#= link_to(
|
||||||
l(:button_cancel_homepage),
|
l(:button_cancel_homepage),
|
||||||
{:controller => 'blogs',:action => 'cancel_homepage',:user_id=>@article.author_id,:id=>@article.blog_id, :article_id => @article.id},
|
{:controller => 'blogs',:action => 'cancel_homepage',:user_id=>@article.author_id,:id=>@article.blog_id, :article_id => @article.id},
|
||||||
:method => :post,
|
:method => :post,
|
||||||
:class => 'postOptionLink'
|
:class => 'postOptionLink'
|
||||||
) if User.current && User.current.id == @article.blog.author_id %>
|
) if User.current && User.current.id == @article.blog.author_id %>
|
||||||
<% else %>
|
<%# else %>
|
||||||
<%= link_to(
|
<%#= link_to(
|
||||||
l(:button_set_homepage),
|
l(:button_set_homepage),
|
||||||
{:controller => 'blogs',:action => 'set_homepage',:user_id=>@article.author_id,:id=>@article.blog_id, :article_id => @article.id},
|
{:controller => 'blogs',:action => 'set_homepage',:user_id=>@article.author_id,:id=>@article.blog_id, :article_id => @article.id},
|
||||||
:method => :post,
|
:method => :post,
|
||||||
:class => 'postOptionLink'
|
:class => 'postOptionLink'
|
||||||
) if User.current && User.current.id == @article.blog.author_id %>
|
) if User.current && User.current.id == @article.blog.author_id %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
</li>
|
<!--</li>-->
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to activity.title.subject.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title fl"%>
|
<%= link_to activity.title.subject.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title fl"%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if activity.blog.homepage_id and activity.id == activity.blog.homepage_id %>
|
<%# if activity.blog.homepage_id and activity.id == activity.blog.homepage_id %>
|
||||||
<span class="font_normal ml10 fr">[已设为首页]</span>
|
<!--<span class="font_normal ml10 fr">[已设为首页]</span>-->
|
||||||
<% end %>
|
<%# end %>
|
||||||
<% if activity.sticky == 1 %>
|
<% if activity.sticky == 1 %>
|
||||||
<span class="fl ml10 red-cir-btn">顶</span>
|
<span class="fl ml10 red-cir-btn">顶</span>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
|
@ -93,9 +93,9 @@
|
||||||
<%# cache (act) do %>
|
<%# cache (act) do %>
|
||||||
<% case user_activity.act_type.to_s %>
|
<% case user_activity.act_type.to_s %>
|
||||||
<% when 'BlogComment' %>
|
<% when 'BlogComment' %>
|
||||||
<% if !(act.blog.homepage_id and act.id == act.blog.homepage_id) %>
|
<%# if !(act.blog.homepage_id and act.id == act.blog.homepage_id) %>
|
||||||
<%= render :partial => 'user_blog', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
<%= render :partial => 'user_blog', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# end %>
|
<%# end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--显示个人主页-->
|
<!--显示个人主页-->
|
||||||
<% if @user.blog.homepage_id and BlogComment.where("id=?", @user.blog.homepage_id).count > 0 %>
|
<%# if @user.blog.homepage_id and BlogComment.where("id=?", @user.blog.homepage_id).count > 0 %>
|
||||||
<% homepage = BlogComment.find(@user.blog.homepage_id) %>
|
<%# homepage = BlogComment.find(@user.blog.homepage_id) %>
|
||||||
<%= render :partial => 'blogs/homepage', :locals => {:activity => homepage, :user_activity_id => homepage.id} %>
|
<%#= render :partial => 'blogs/homepage', :locals => {:activity => homepage, :user_activity_id => homepage.id} %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0,:type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id)} %>
|
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0,:type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id)} %>
|
||||||
|
|
Loading…
Reference in New Issue