@@ -, +, @@ using forEach loop different home libraries. (gear icon). table. You cannot. button, it should work. are still properly hidden and the Columns tool works colums can properly hide. --- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1370,10 +1370,9 @@ Note that permanent location is a code, and location may be an authval. var ids = ['holdings_table', 'otherholdings_table']; var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %] ]; var has_images = ["[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]"]; - for (var i in ids) { - var id = ids[i]; - if ( !has_images[i] ) { // remove the cover_image column - table_settings.splice(1,1); + ids.forEach( function(item, index) { + if ( !has_images[index] ) { + table_settings[index].columns.splice(1,1); } var dt_parameters = { 'sDom': 't', @@ -1382,8 +1381,8 @@ Note that permanent location is a code, and location may be an authval. "bKohaColumnsUseNames": true, "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', }; - var table = KohaTable(id, dt_parameters, table_settings[i], 'with_filters'); - } + var table = KohaTable(item, dt_parameters, table_settings[index], 'with_filters'); + }); [% IF Koha.Preference('AcquisitionDetails') %] var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %]; --