From 5d28253536f6a15b39337957afe5fd06b2422b9d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 14 Jul 2023 16:41:21 +0100 Subject: [PATCH] Bug 29002: (follow-up) Use $patron_to_html function This didn't exist when we first wrote this code.. it's a useful addition now. Test plan 1) Follow the test plans for previous patches 2) Note the proper display of patron names in the bookings list table Signed-off-by: Martin Renvoize Signed-off-by: Janet McGowan Signed-off-by: Caroline Cyr La Rose Signed-off-by: Laurence Rault Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/bookings/list.tt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt index 5ab910abc8..24cd7e5eca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt @@ -58,6 +58,7 @@ [% INCLUDE 'columns_settings.inc' %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'select2.inc' %] + [% INCLUDE 'js-patron-format.inc' %] [% INCLUDE 'js-date-format.inc' %] [% Asset.js("js/place_booking_modal.js") | $raw %] [% Asset.js("js/cancel_booking_modal.js") | $raw %] @@ -231,14 +232,10 @@ "searchable": true, "orderable": true, "render": function(data, type, row, meta) { - var fullname; - if ( row.patron.firstname == null ) { - fullname = row.patron.surname; - } - else { - fullname = row.patron.firstname + " " + row.patron.surname; - } - return escape_str(fullname); + return $patron_to_html(row.patron, { + display_cardnumber: false, + url: true + }); } }, { -- 2.39.5