博客列表

排序: <%= link_to "时间", {:controller => 'blogs', :action => 'index', :id =>@user, :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %> <% if @type.to_i == 1 %> <%= link_to "", {:controller => 'blogs', :action => 'index', :id =>@user, :type => @type, :sort => @b_sort, :order => 1 }, :class => "#{@b_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %> <% end %> <%= link_to "人气", {:controller => 'blogs', :action => 'index', :id =>@user, :type => @type, :sort => @b_sort, :order => 2 }, :class => "sortTxt", :remote => true %> <% if @type.to_i == 2 %> <%= link_to "", {:controller => 'blogs', :action => 'index', :id =>@user, :type => @type, :sort => @b_sort, :order => 2 }, :class => "#{@b_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %> <% end %>
<% if topics.any? %> <% topics.each do |activity| %>
  • <% if activity.parent_id.nil? %> <%= link_to activity.title.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" %> <% 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"%> <% end %> <% if activity.blog.homepage_id and activity.id == activity.blog.homepage_id %> [已设为首页] <% end %> <% if activity.sticky == 1 %> <% end%> <% if activity.locked %> <% end %>
  • <% count=0 %> <% if activity.parent %> <% count=activity.parent.children.count%> <% else %> <% count=activity.children.count%> <% end %>
  • 发帖时间:<%= format_time(activity.created_on) %> 更新时间:<%= format_time(activity.updated_on) %>

    <%= count>0 ? "#{count}" :"0" %> 回复 | <%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" :"0" %>

<% end %>
    <%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>
<% else %>

<%= l(:label_no_data) %>

<% end %>