Koha::Template::Plugin::TablesSettings
[% USE TablesSettings %]
. . .
[% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %]
<th id="column" data-colname="column">Column title</th>
[% END %]
. . .
[% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %]
<td>[% row.column %]</td>
[% END %]
. . .
<script>
var table_settings = [% TablesSettings.GetTableSettings( 'module', 'page', 'table', 'json' ) | $raw %];
var table = $("#id").kohaTable({ "autoWidth": false }, table_settings );
</script>
This plugin allows to get the column configuration for a table. It should be used both in table markup and as the input for datatables visibility settings to take full effect.
[% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %]
<th id="column" data-colname="column">Column title</th>
[% END %]
Used to fetch an individual columns display status so we can fully hide a column in the markup for cases where it may contain confidential information and should be fully hidden rather than just hidden from display.
[% SET table_settings = GetTableSettings( module, page, table ) %]
This method is used to retrieve the tables settings (like table_settings.default_display_length and table_settings.default_sort_order). They can be passed to the DataTable constructor (for iDisplayLength and order parameters)