diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index b0ce8b58c5..130ff0a3f2 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -872,7 +872,7 @@ for my $row ( @big_array ) { { my ( undef, $subfield ) = GetMarcFromKohaField($kohafield); next unless $key eq $subfield; - $item_field->{field} = output_pref( { str => $row->{$key}, dateonly => 1 } ); + $item_field->{datatype} = 'date'; } push @item_fields, $item_field; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 463edf4e08..f8fff0ddd1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -1,6 +1,7 @@ [% USE raw %] [% USE Asset %] [% USE Koha %] +[% USE KohaDates %] [% USE ColumnsSettings %] [% INCLUDE 'doc-head-open.inc' %] Koha › Cataloging › [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %]) › Items @@ -45,6 +46,7 @@
[% IF ( item_loop ) %] + [% SET date_fields = [ 'dateaccessioned', 'onloan', 'datelastseen', 'datelastborrowed', 'replacementpricedate' ] %]
@@ -52,7 +54,11 @@ [% FOREACH item_header IN item_header_loop %] [% IF item_header.column_name %] - + [% IF item_valu.datatype == 'date' %] + + [% ELSE %] + + [% END %] [% END %] [% END %]
  + [% IF date_fields.grep(item_header.column_name).size %] + + [% ELSE %] + + [% END %] [% ELSE %] [% END %] @@ -106,7 +112,11 @@ [% END %] [% FOREACH item_valu IN item_loo.item_value %] - [% item_valu.field | html %][% item_valu.field | $KohaDates %][% item_valu.field | html %]