From fc391c109c696e5a14277b89d898a4ff0560742b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 17 Oct 2022 10:32:47 +0000 Subject: [PATCH] Bug 31842: Move data function to render in branches.tt This applies to dataTable columns: library_info, actions and opac_info. Set searchable to false for opac_info too. Test plan: Check if DT search for libraries works again. Signed-off-by: Marcel de Rooy Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer --- .../prog/en/modules/admin/branches.tt | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index dd7eace461..c7d3907362 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -546,7 +546,10 @@ Libraries › Administration › Koha "orderable": true }, { - "data": function( row, type, val, meta ) { + "data": "library_info", + "searchable": false, + "orderable": false, + "render": function( data, type, row, meta ) { const library_info = []; if ( row.address1 != null ) library_info.push(row.address1.escapeHtml()); if ( row.address2 != null ) library_info.push(row.address2.escapeHtml()); @@ -570,8 +573,6 @@ Libraries › Administration › Koha if ( row.notes != null ) library_info.push(_("Notes")+': '+row.notes.escapeHtml()); return library_info.join('
'); }, - "searchable": false, - "orderable": false }, { "data": "marc_org_code", @@ -614,7 +615,10 @@ Libraries › Administration › Koha "orderable": false }, { - "data": function( row, type, val, meta ) { + "data": "actions", + "searchable": false, + "orderable": false, + "render": function( data, type, row, meta ) { var result = ' '+_("Edit")+''; result += '
'; @@ -625,8 +629,6 @@ Libraries › Administration › Koha return result; }, - "searchable": false, - "orderable": false }, { "data": "address1", @@ -671,12 +673,13 @@ Libraries › Administration › Koha "orderable": false }, { - "data": function( row, type, val, meta ) { + "data": "opac_info", + "searchable": false, + "visible": false, + "orderable": false, + "render": function( data, type, row, meta ) { return ''; // provisional placeholder for opac_info }, - "searchable": true, - "visible": false, - "orderable": false }, { "data": "notes", -- 2.30.2