1<table id="data-table" class="table table-bordered table-condensed table-striped" width="100%" cellspacing="0"> 2 <thead> 3 <tr> 4 <th class="nd_center-cell">Creation</th> 5 <th class="nd_center-cell">User</th> 6 <th class="nd_center-cell">User IP</th> 7 <th class="nd_center-cell">Action</th> 8 <th class="nd_center-cell">Reason</th> 9 <th class="nd_center-cell">Log</th> 10 <th class="nd_center-cell">Action</th> 11 </tr> 12 </thead> 13 <tbody> 14 <tr> 15 <td class="nd_center-cell">-</td> 16 <td class="nd_center-cell">[% session.logged_in_user | html_entity %]</td> 17 <td class="nd_center-cell">-</td> 18 <td class="nd_center-cell">comment</td> 19 <td class="nd_center-cell">Other</td> 20 <td class="nd_center-cell"><input data-form="add" class="span4" name="log" type="text" placeholder="Add comment..."></td> 21 <input data-form="add" name="ip" type="hidden" value="[% params.q | html_entity %]"> 22 <input data-form="add" name="port" type="hidden" value="[% params.f | html_entity %]"> 23 <td class="nd_center-cell"> 24 <button class="btn btn-small nd_adminbutton" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button> 25 </td> 26 </tr> 27 28 [% WHILE (row = results.next) %] 29 <tr> 30 <td class="nd_center-cell">[% row.creation_stamp | html_entity %]</td> 31 <td class="nd_center-cell">[% row.username | html_entity %]</td> 32 <td class="nd_center-cell">[% row.userip | html_entity %]</td> 33 <td class="nd_center-cell">[% row.action | html_entity %]</td> 34 <td class="nd_center-cell">[% settings.port_control_reasons.item(row.reason) || row.reason | html_entity %]</td> 35 <td class="nd_center-cell">[% row.log || '-' | html_entity %]</td> 36 <td class="nd_center-cell"></td> 37 </tr> 38 [% END %] 39 </tbody> 40</table> 41 42<script> 43$(document).ready(function() { 44 $('#data-table').dataTable({ 45 sort: false, 46[% INCLUDE 'ajax/datatabledefaults.tt' -%] 47 } ); 48} ); 49</script> 50