<table>
<tr>
  <th class="first"><%= order_link "Title", 'admin/content', 'list', 'title' %></th>
  <th><%= _("Categories") %></th>
  <th><%= _("Comments")%></th>
  <th><%= order_link "Date", 'admin/content', 'list', 'created_at' %></th>
  <th><%= _("Author")%></th>
  <th><%= order_link "Published", 'admin/content', 'list', 'state' %></th>
  <th><%= _("View")%></th>
  <th><%= _("Edit")%></th>
  <th class="last"><%= _("Delete")%></th>
</tr>
<% for article in @articles %>
<tr <%= alternate_class %>>
  <td class="first"> <%= link_to_permalink article, h(article.title) %></td>
  <td><%= article.categories.map { |c| link_to h(c.name), {:controller => 'admin/categories', :action => 'show', :id => c.id}}.join(", ") %></td>
  <td><%= link_to _(pluralize(article.comments.size, 'comment')), :controller => '/admin/comments', :article_id => article.id, :action => 'list' %></td>
  <td><%= article.published_at.strftime("%d/%m/%Y at %H:%M") %></td>
  <td><%= author_link(article)%></td>
  <td class="operation"><%= (article.published?) ? image_tag('admin/checked.png', :alt => "online", :title => _("Online")) : image_tag('admin/cancel.png', :alt => "offline", :title => _("Offline")) %></td>
  <td class="operation"><%= link_to_show article %></td>
  <td class="operation"><%= link_to_edit article %></td>
  <td class="operation last"><%= link_to_destroy article %></td>
</tr>
<% end %>
</table>
