<h4 class="header">
  <%= link_to _("Latest Jobs"), job_invocations_path(:order=>'start_at DESC') %>
</h4>
<% if JobInvocation.latest_jobs.any? %>
  <table class="<%= table_css_classes('table-fixed') %>">
    <tr>
      <th class="col-md-5"><%= _("Name") %></th>
      <th class="col-md-2"><%= _("State") %></th>
      <th class="col-md-3"><%= _("Started") %></th>
    </tr>
    <% JobInvocation.latest_jobs.each do |invocation| %>
      <tr>
        <td class="ellipsis"><%= link_to_if_authorized invocation_description(invocation, keep_tooltip: false), hash_for_job_invocation_path(invocation).merge(:auth_object => invocation, :permission => :view_job_invocations, :authorizer => authorizer) %></td>
        <td><%= link_to_invocation_task_if_authorized(invocation) %></td>
        <td><%= time_in_words_span(invocation.start_at) %></td>
      </tr>
    <% end %>
  </table>
<% else %>
  <p class="ca"><%= _("No jobs available") %></p>
<% end %>
