<%= table_for @contents, :class => "articles list tree" do |t| columns = [:content] columns << :category if @section.categories.any? columns << :comments if defined?(Comment) columns += [:published, :actions] t.column *columns t.row do |r, content| r.add_class "level_#{content.level}" r.cell content_status(content) + link_to(content.title, [:edit, :admin, @site, @section, content], :class => content.state) r.cell content.category_titles.join(", ") if @section.categories.any? r.cell content.accept_comments? && content.comments.present? ? link_to(content.comments.size, admin_comments_path) : t(:"adva.common.none") if defined?(Comment) r.cell published_at_formatted(content) r.cell link_to("Edit", [:edit, :admin, @site, @section, content], :class => "edit content") + link_to("Delete", [:admin, @site, @section, content], :method => :delete, :class => "delete content") end t.empty :p, :class => 'empty' do raw params[:filters] ? t(:'adva.content.no_filtered_contents') : t(:'adva.contents.no_contents', :section => @section.title) + "\n" + link_to(t(:'adva.contents.links.create_now'), [:new, :admin, @site, @section, :content]) end end %> <%= content_for :sidebar do -%> <% end -%>