<div class="listtop">[%- P.escape(title) %]</div>
<div style="padding-bottom: 15px">
- <table style="width: 100%">
+ <table style="width: 100%" id="record_list_[% type %]">
<thead>
<tr>
+ [%- IF edit_record_links %]
+ <th class="listheading">[% L.checkbox_tag('record_links_delete_checkall_' _ type) %]</th>
+ [%- END %]
[%- FOREACH column = TABLE_HEADER %]
<th class="listheading"[% IF column.alignment %] align="[% column.alignment %]"[% END %]>[%- P.escape(column.value) %]</th>
[%- END %]
<tbody>
[%- FOREACH row = TABLE_ROWS %]
<tr class="listrow[% loop.count % 2 %]">
- [%- FOREACH column = row %]
+ [%- IF edit_record_links %]
+ <td>[%- L.checkbox_tag('record_links_delete[]', 'value'=row.record_link.from_table _ '__' _ row.record_link.from_id _ '__' _ row.record_link.to_table _ '__' _ row.record_link.to_id, 'class'='record_links_delete') %]</td>
+ [%- END %]
+ [%- FOREACH column = row.columns %]
<td[% IF column.alignment %] align="[% column.alignment %]"[% END %]>
[%- IF column.link %]<a href="[% column.link %]">[%- END %]
[%- P.escape(column.value) %]
</tbody>
</table>
</div>
+
+[% IF edit_record_links %]
+<script type="text/javascript">
+$('#record_links_delete_checkall_[% type %]').checkall("#record_list_[% type %] tbody :checkbox");
+</script>
+[%- END %]