Listing Articles

<%= will_paginate %> <%= sortable_table_header :name => "Title", :sort => "title" %> <%= sortable_table_header :name => "Status", :sort => "published_at" %> <%= sortable_table_header :name => "Author", :sort => "created_by" %> <%= sortable_table_header :name => "Editor", :sort => "updated_by" %> <%= sortable_table_header :name => "Updated", :sort => "updated_at" %> <%= sortable_table_header :name => "Created", :sort => "created_at" %> <%= sortable_table_header :name => "Published At", :sort => "published_at" %> <%= sortable_table_header :name => "Published To", :sort => "published_to" %> <%= sortable_table_header :name => "Comments", :sort => "comments" %> <% @articles.each do |article| %> <% end %> <%= sortable_table_header :name => "Title", :sort => "title" %> <%= sortable_table_header :name => "Status", :sort => "published_at" %> <%= sortable_table_header :name => "Author", :sort => "created_by" %> <%= sortable_table_header :name => "Editor", :sort => "updated_by" %> <%= sortable_table_header :name => "Updated", :sort => "updated_at" %> <%= sortable_table_header :name => "Created", :sort => "created_at" %> <%= sortable_table_header :name => "Published At", :sort => "published_at" %> <%= sortable_table_header :name => "Published To", :sort => "published_to" %> <%= sortable_table_header :name => "Comments", :sort => "comments" %>
Actions
<%= link_to h( article.title ), admin_article_path(article) %> <%= content_status(article) %> <%= article.author %> <%= article.editor %> <%= article.updated_at.strftime('%d %b') %> <%= article.created_at.strftime('%d %b') %> <%= article.published_at.strftime('%d %b') unless article.published_at.nil? %> <%= article.published_to.strftime('%d %b') unless article.published_to.nil? %> <%= link_to pluralize(article.comments.count, 'Comment'), admin_article_comments_path(article) %> <%= link_to 'Show', article_url(article), :class => 'show' if article.published? %> <%= link_to 'Edit', admin_article_path(article), :class => 'edit' %> <%= link_to 'Destroy', admin_article_path(article), :confirm => 'Are you sure?', :method => :delete, :class => 'delete' %>
Actions
<%= will_paginate %>