<table id="rg-data-table" class="table table-bordered table-condensed table-striped" width="100%" cellspacing="0">
  <thead>
    <tr>
      [% FOREACH hdr IN headings %]
        <th>[% hdr | html_entity %]</th>
      [% END %]
    </tr>
  </thead>
  <tbody>
    [% FOREACH row IN results %]
    <tr>
      [% FOREACH col IN columns %]
      <td>
        [% FOREACH record IN row.item(col) %]
          [% IF column_options.$col._searchable %]
            [% record | none %]
          [% ELSE %]
            [% record | html_entity %]
          [% END %]
          [% '<br />' IF loop.size > 1 %]
        [% END %]
      </td>
      [% END %]
    </tr>
    [% END %]
  </tbody>
</table>

<script>
$(document).ready(function() {
  $('#rg-data-table').dataTable({
    "order": [],
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
  } );
} );
</script>
