Sha256: d3e6397a9bb5924871f90c708f909377f8541ff8979f49822167ed1b396f9822

Contents?: true

Size: 1.58 KB

Versions: 5

Compression:

Stored size: 1.58 KB

Contents

<%=
  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, @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, @section, content], :class => "edit content") +
        link_to("Delete", [:admin, @section, content], method: :delete, class: "delete content", data: { confirm: "Are you sure you want to delete this 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, @section, :content])
    end
  end
%>

<%= content_for :sidebar do -%>
  <!--
  <div class="tabs">
    <ul>
      <li class="active"><a href="#filters" onclick="return false;">Filters</a></li>
    </ul>
    <div class="tab active" id="tab_filters">
      <%= filter_for(Article, :categories => @section.categories) %>
    </div>
  </div>
  -->
<% end -%>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
adva-0.1.4 app/views/admin/page/contents/index.html.erb
adva-0.1.3 app/views/admin/page/contents/index.html.erb
adva-0.1.2 app/views/admin/page/contents/index.html.erb
adva-0.1.1 app/views/admin/page/contents/index.html.erb
adva-0.1.0 app/views/admin/page/contents/index.html.erb