Bug 14879: Move the date displays to the template
There is no special need to format the date in the perl script. 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:
parent
66d2ded1d2
commit
c43b7b63a7
2 changed files with 5 additions and 8 deletions
|
@ -205,9 +205,6 @@ foreach my $item (@items) {
|
|||
$item->{imageurl} = defined $item->{itype} ? getitemtypeimagelocation('intranet', $itemtypes->{ $item->{itype} }{imageurl})
|
||||
: '';
|
||||
|
||||
foreach (qw(datelastseen onloan)) {
|
||||
$item->{$_} = output_pref({ dt => dt_from_string( $item->{$_} ), dateonly => 1 });
|
||||
}
|
||||
$item->{datedue} = format_sqldatetime($item->{datedue});
|
||||
# item damaged, lost, withdrawn loops
|
||||
$item->{itemlostloop} = GetAuthorisedValues($authvalcode_items_itemlost, $item->{itemlost}) if $authvalcode_items_itemlost;
|
||||
|
@ -236,7 +233,7 @@ foreach my $item (@items) {
|
|||
|
||||
if ( defined $reservedate ) {
|
||||
$item->{backgroundcolor} = 'reserved';
|
||||
$item->{reservedate} = output_pref({ dt => dt_from_string($reservedate ), dateonly => 1 });
|
||||
$item->{reservedate} = $reservedate;
|
||||
$item->{ReservedForBorrowernumber} = $reservedfor;
|
||||
$item->{ReservedForSurname} = $ItemBorrowerReserveInfo->{'surname'};
|
||||
$item->{ReservedForFirstname} = $ItemBorrowerReserveInfo->{'firstname'};
|
||||
|
@ -250,7 +247,7 @@ foreach my $item (@items) {
|
|||
# Check the transit status
|
||||
my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber});
|
||||
if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) {
|
||||
$item->{transfertwhen} = output_pref({ dt => dt_from_string($transfertwhen ), dateonly => 1 });
|
||||
$item->{transfertwhen} = $transfertwhen;
|
||||
$item->{transfertfrom} = $branches->{$transfertfrom}{branchname};
|
||||
$item->{transfertto} = $branches->{$transfertto}{branchname};
|
||||
$item->{nocancel} = 1;
|
||||
|
|
|
@ -652,7 +652,7 @@ function verify_images() {
|
|||
: due [% item.datedue %]
|
||||
</span>
|
||||
[% ELSIF ( item.transfertwhen ) %]
|
||||
<span class="intransit">In transit from [% item.transfertfrom %] to [% item.transfertto %] since [% item.transfertwhen %]</span>
|
||||
<span class="intransit">In transit from [% item.transfertfrom %] to [% item.transfertto %] since [% item.transfertwhen | $KohaDates %]</span>
|
||||
[% END %]
|
||||
|
||||
[% IF ( item.itemlost ) %]
|
||||
|
@ -713,7 +713,7 @@ function verify_images() {
|
|||
since [% item.waitingdate | $KohaDates %]
|
||||
[% ELSE %]
|
||||
[% IF ( item.reservedate ) %]
|
||||
(placed [% item.reservedate %])
|
||||
(placed [% item.reservedate | $KohaDates %])
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
@ -735,7 +735,7 @@ function verify_images() {
|
|||
[% END %]
|
||||
|
||||
</td>
|
||||
<td class="datelastseen">[% item.datelastseen %]</td>
|
||||
<td class="datelastseen">[% item.datelastseen | $KohaDates %]</td>
|
||||
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type %]&itemnumber=[% item.itemnumber %]&biblionumber=[% item.biblionumber %]&bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a></td>
|
||||
[% IF ( volinfo ) %]
|
||||
<td class="enumchron">
|
||||
|
|
Loading…
Reference in a new issue