{% extends "layout.html" %}
{% from "box_macros.html" import box %}

{% block content %}

<div>
  <h1 style="display: inline;">Waterfall</h1>
  <a style="float: right;" href="{{ help_url }}">waterfall help</a>
</div>

<table border="0" cellspacing="0">

<tr class="LastBuild">
  <td align="right" colspan="2" class="Project">
   last build
  </td>

{% for b in builders %}  
  <td align="center" class="{{ b.top_class }}">
    <a href="{{ b.url }}">{{ b.name }}</a><br/>
    {{ " ".join(b.top) }}
  </td>
{% endfor %}
</tr>

<tr class="Activity">
<td align="right" colspan="2">current activity</td>

{% for b in builders %}  
  <td align="center" class="{{ b.status_class }}">
    {{ "<br/>".join(b.status) }}
  </td>
{% endfor %}
</tr>

<tr>
<td align="center" class="Time">{{ tz }}</td>
<td align="center" class="Change"><a href="{{ changes_url }}">changes</a></td>

{% for b in builders %}
 <td align="center" class="Builder"><a href="{{ b.url }}">{{ b.name }}</a></td>
{% endfor %}
</tr>

{# waterfall contents goes here #}    
{% for i in range(gridlen) -%}
  <tr>
  {% for strip in grid -%}        
    {%- if strip[i] -%}{{ box(**strip[i]) }}
    {%- elif no_bubble -%}{{ box() }}
    {%- endif -%}
  {%- endfor -%}
  </tr>
{% endfor %}

</table>

{% if nextpage %}
 <a href="{{ nextpage }}">next page</a>
{% endif %}

{% if no_reload_page %}
 <a href="{{ no_reload_page }}">Stop Reloading</a> 
{% endif %}

{% endblock %}
