{
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;
[% USE raw %]
[% USE Asset %]
[% USE Koha %]
+[% USE KohaDates %]
[% USE ColumnsSettings %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Cataloging › [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %]) › Items</title>
<div id="cataloguing_additem_itemlist">
[% IF ( item_loop ) %]
+ [% SET date_fields = [ 'dateaccessioned', 'onloan', 'datelastseen', 'datelastborrowed', 'replacementpricedate' ] %]
<div>
<table id="itemst">
<thead>
<th> </th>
[% FOREACH item_header IN item_header_loop %]
[% IF item_header.column_name %]
- <th data-colname="[% item_header.column_name | html %]">
+ [% IF date_fields.grep(item_header.column_name).size %]
+ <th class="title-string" data-colname="[% item_header.column_name | html %]">
+ [% ELSE %]
+ <th data-colname="[% item_header.column_name | html %]">
+ [% END %]
[% ELSE %]
<th>
[% END %]
</td>
[% END %]
[% FOREACH item_valu IN item_loo.item_value %]
- <td>[% item_valu.field | html %]</td>
+ [% IF item_valu.datatype == 'date' %]
+ <td><span title="[% item_valu.field | html %]">[% item_valu.field | $KohaDates %]</span></td>
+ [% ELSE %]
+ <td>[% item_valu.field | html %]</td>
+ [% END %]
[% END %]
</tr>
[% END %]