{% extends "zumanji/layout.html" %}

{% block content %}
  <h3>Latest Builds</h3>
  <table class="table table-striped table-bordered">
    <thead>
      <tr>
        <th style="width:60px; text-align:right;">ID</th>
        <th style="width:150px;">Project</th>
        <th>Revision</th>
        <th style="width:180px;">Datetime</th>
        <th style="width:100px; text-align:center;">Tests</th>
        <th style="width:100px; text-align:center;">Duration</th>
      </tr>
    </thead>
    <tbody>
      {% for build in build_list %}
        <tr>
          <td style="text-align:right;"><a href="{% url zumanji:view_build project_label=build.project.label, build_id=build.id %}">B{{ build.id }}</a></td>
          <td><a href="{% url zumanji:view_project project_label=build.project.label %}">{{ build.project.label }}</a></td>
          <td>{{ build.revision.label }}</td>
          <td>{{ build.datetime }}</td>
          <td style="text-align:center;">{{ build.num_tests }}</td>
          <td style="text-align:center;">{{ build.total_duration|floatformat:3 }} s</td>
        </tr>
      {% endfor %}
    </tbody>
  </table>
{% endblock %}