@@ -, +, @@ --- admin/columns_settings.yml | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) --- a/admin/columns_settings.yml +++ a/admin/columns_settings.yml @@ -272,6 +272,8 @@ modules: columnname: holdings_checkbox cannot_be_toggled: 1 cannot_be_modified: 1 + - + columnname: holdings_cover_image - columnname: holdings_itype - @@ -327,6 +329,8 @@ modules: columnname: otherholdings_checkbox cannot_be_toggled: 1 cannot_be_modified: 1 + - + columnname: otherholdings_cover_image - columnname: otherholdings_itype - --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -284,7 +284,7 @@ [% IF (StaffDetailItemSelection) %][% END %] [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %] - Cover image + Cover image [% END %] [% IF ( item_level_itypes ) %]Item type[% END %] Current library @@ -1270,8 +1270,12 @@ Note that permanent location is a code, and location may be an authval. $(document).ready(function() { var ids = ['holdings_table', 'otherholdings_table']; var columns_settings = [ [% TablesSettings.GetColumns('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetColumns('catalogue', 'detail','otherholdings_table','json') | $raw %] ]; + var has_images = ["[% itemloop_has_images %]", "[% otheritemloop_has_images %]"]; for (var i in ids) { var id = ids[i]; + if ( !has_images[i] ) { // remove the cover_image column + columns_settings.splice(1,1); + } var dt_parameters = { 'sDom': 't', 'bPaginate': false, --