<table class="articles archive striped">
  <tr>
    <th class="title">Title</th>
    <th class="date">Date</th>
    <th class="author">Author</th>
    <th class="actions"></th>
  </tr>

  <% articles.each do |article| %>
    <tr>
      <td><%= namelink article, 35 %></td>
      <td><%= shortdate article.created_at %></td>
      <td><%= namelink article.user %></td>
      <td class="actions">
        <% if article.can_update? cuser %>
          <%= link_to icon('pencil'), edit_article_path(article) %>
          <% end; if article.can_destroy? cuser %>
          <%= link_to icon('times'), article, confirm: 'Are you sure?', method: :delete %>
        <% end %>
      </td>
    </tr>
  <% end %>
</table>