Bug 33568: Display library names instead of codes for recall

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2023-05-23 13:37:33 +02:00 committed by Katrin Fischer
parent b7bcb5c5d9
commit 7ee8395026
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
3 changed files with 18 additions and 2 deletions

View File

@ -461,6 +461,21 @@ sub set_fulfilled {
return $self;
}
=head3 strings_map
Returns a map of column name to string representations including the string.
=cut
sub strings_map {
my ($self) = @_;
return {
pickup_library_id => { str => $self->library->branchname, type => 'library' },
};
}
=head2 Internal methods
=head3 _type

View File

@ -431,6 +431,7 @@
- first_hold+strings
- first_hold.patron
- recall
- recall+strings
- recall.patron
- item_type
- in_bundle

View File

@ -2184,7 +2184,7 @@
embed.push('serialitem.serial');
[% END %]
[% IF Koha.Preference('UseRecalls') %]
embed.push('recall', 'recall.patron')
embed.push('recall', 'recall+strings', 'recall.patron')
[% END %]
embed.push('in_bundle', 'bundle_host');
[% IF Koha.Preference('UseCourseReserves') %]
@ -2441,7 +2441,7 @@
[% IF Koha.Preference('UseRecalls') %]
if ( row.recall ) {
if ( row.recall.waiting_date ) {
nodes += '<span>%s</span>'.format(_("Waiting at %s since %s").format(escape_str(row.recall.pickup_library_id), $date(row.recall.waiting_date))); # FIXME Display library names instead of codes
nodes += '<span>%s</span>'.format(_("Waiting at %s since %s").format(escape_str(row.recall.pickup_library_id.str), $date(row.recall.waiting_date)));
} else {
let patron_to_html = $patron_to_html(row.recall.patron);
nodes += '<span>%s</span>'.format(_("recalled by %s on %s").format(patron_to_html, $date(row.recall.created_date)))