@@ -, +, @@ --- cataloguing/additem.pl | 2 +- .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) --- a/cataloguing/additem.pl +++ a/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; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ a/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 %]