1[% IF results.count == 0 %]
2<div class="span3 alert alert-info">The aren't enough jobs to report.</div>
3[% ELSE %]
4<table id="asd-data-table" class="table table-bordered table-condensed table-hover" width="100%" cellspacing="0">
5  <thead>
6    <tr>
7      <th class="nd_center-cell">Action</th>
8      <th class="nd_center-cell">Device</th>
9      <th class="nd_center-cell">Started</th>
10      <th class="nd_center-cell">Finished</th>
11      <th class="nd_center-cell">Time Elapsed</th>
12    </tr>
13  </thead>
14  <tbody>
15    [% WHILE (row = results.next) %]
16    <tr>
17      <td class="nd_center-cell">[% row.action.ucfirst | html_entity %]</td>
18      <td class="nd_center-cell"><a class="nd_linkcell"
19        href="[% uri_for('/device') | none %]?q=[% row.device | uri %]">[% row.device | html_entity %]</a></td>
20      <td class="nd_center-cell">[% row.started  | html_entity %]</td>
21      <td class="nd_center-cell">[% row.finished | html_entity %]</td>
22      <td class="nd_center-cell">[% row.elapsed  | html_entity %]</td>
23    </tr>
24    [% END %]
25  </tbody>
26</table>
27[% END %]
28
29<script>
30$(document).ready(function() {
31    $('#asd-data-table').dataTable({
32        "paging":   false,
33        "searching": false,
34        "info":     false,
35        "order": [[ 4, 'desc' ], [ 0, 'asc' ], [ 1, 'asc' ] ],
36        "pageLength": 12
37    });
38} );
39</script>
40