Bug 29983: Format dates in templates using KohaDates (and display the time part)

The time part is displayed on the checkout list

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-08-01 15:43:51 +02:00 committed by Tomas Cohen Arazi
parent e56c0dead6
commit 69d491bd1d
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 2 additions and 7 deletions

View file

@ -311,11 +311,6 @@ if ($noreport) {
my $pattrs = $borrowernumber_to_attributes{$data->{borrowernumber}} || {}; # patron attrs for this borrower my $pattrs = $borrowernumber_to_attributes{$data->{borrowernumber}} || {}; # patron attrs for this borrower
# $pattrs is a hash { attrcode => [ [value,displayvalue], [value,displayvalue]... ] } # $pattrs is a hash { attrcode => [ [value,displayvalue], [value,displayvalue]... ] }
my $return_claim_created_on = $data->{return_claim_created_on};
if ( defined $return_claim_created_on ) {
$return_claim_created_on = output_pref({ dt => dt_from_string($return_claim_created_on ) });
}
my @patron_attr_value_loop; # template array [ {value=>v1}, {value=>v2} ... } ] my @patron_attr_value_loop; # template array [ {value=>v1}, {value=>v2} ... } ]
for my $pattr_filter (grep { ! $_->{isclone} } @patron_attr_filter_loop) { for my $pattr_filter (grep { ! $_->{isclone} } @patron_attr_filter_loop) {
my @displayvalues = map { $_->[1] } @{ $pattrs->{$pattr_filter->{code}} }; # grab second value from each subarray my @displayvalues = map { $_->[1] } @{ $pattrs->{$pattr_filter->{code}} }; # grab second value from each subarray
@ -355,7 +350,7 @@ if ($noreport) {
itemcallnumber => $data->{itemcallnumber}, itemcallnumber => $data->{itemcallnumber},
replacementprice => $data->{replacementprice}, replacementprice => $data->{replacementprice},
itemnotes_nonpublic => $data->{itemnotes_nonpublic}, itemnotes_nonpublic => $data->{itemnotes_nonpublic},
return_claim_created_on => $return_claim_created_on, return_claim_created_on => $data->{return_claim_created_on},
return_claim_id => $data->{return_claim_id}, return_claim_id => $data->{return_claim_id},
enumchron => $data->{enumchron}, enumchron => $data->{enumchron},
itemtype => $data->{itype}, itemtype => $data->{itype},

View file

@ -122,7 +122,7 @@
<td>[% overdueloo.itemnotes_nonpublic | html %]</td> <td>[% overdueloo.itemnotes_nonpublic | html %]</td>
<td> <td>
[% IF ( overdueloo.return_claim_created_on ) %] [% IF ( overdueloo.return_claim_created_on ) %]
<span class="badge">[% overdueloo.return_claim_created_on | html %]</span> <span class="badge">[% overdueloo.return_claim_created_on | $KohaDates with_hours => 1 %]</span>
[% ELSIF Koha.Preference('ClaimReturnedLostValue') %] [% ELSIF Koha.Preference('ClaimReturnedLostValue') %]
<a class="btn btn-default btn-xs claim-returned-btn" data-itemnumber=[% overdueloo.itemnum | html %]> <a class="btn btn-default btn-xs claim-returned-btn" data-itemnumber=[% overdueloo.itemnum | html %]>
<i class="fa fa-exclamation-circle"></i> Claim returned <i class="fa fa-exclamation-circle"></i> Claim returned