ELCI5T2ALF37VXYM5POHPO3CAMMPRB65BXGDRVUAZG53NKKLGIEAC
$c->stash->{builds} = [$c->model('DB::Builds')->all];
$c->stash->{allBuilds} = [$c->model('DB::Builds')->all];
# Get the latest build for each unique job.
# select * from builds as x where timestamp == (select max(timestamp) from builds where name == x.name);
$c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef, {order_by => "name", where => "timestamp == (select max(timestamp) from builds where name == me.name)"})];
[% FOREACH build IN builds -%]
<tr>
<td>
[% IF build.buildstatus == 0 %]
<img src="static/images/success.gif" />
[% ELSE %]
<img src="static/images/failure.gif" />
[% END %]
</td>
<td><a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a></td>
<td>[% build.name %]</td>
<td>[% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td>
<td>[% build.description %]</td>
</tr>
[% FOREACH build IN allBuilds -%]
[% INCLUDE "short-build-info.tt" %]