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 <martin.renvoize@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2023-07-14 16:41:21 +01:00 committed by Tomas Cohen Arazi
parent e6224e960f
commit 5d28253536
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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
});
}
},
{