<table class="issues striped">
  <tr>
    <th class="date">Created</th>
    <th class="title">Title</th>
    <th class="assinged">Assigned</th>
    <th class="author">Author</th>
    <th class="actions"></th>
  </tr>

  <% issues.each do |issue| %>
    <tr>
      <td><%= issue.created_at.strftime("%Y-%m-%d %H:%M:%S") %></td>
      <td><%= namelink issue %></td>
      <td><%= namelink issue.assigned %></td>
      <td><%= namelink issue.author %></td>
      <td class="actions">
        <% if issue.can_update? cuser %>
          <%= link_to icon('pencil'), edit_issue_path(issue) %>
        <% end %>
        <% if issue.can_destroy? cuser %>
          <%= link_to icon('times'), issue, confirm: 'Are you sure?', method: :delete %>
        <% end %>
      </td>
    </tr>
  <% end %>
</table>
