@@ -, +, @@ --- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 4 ++-- opac/opac-detail.pl | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -1450,7 +1450,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( itemdata_copynumber ) %]Copy[% END %] Status [% IF ( itemdata_itemnotes ) %]Notes[% END %] - Date due + [% IF ( itemdata_datedue ) %]Date due[% END %] [% IF ( OPACShowBarcode ) %]Barcode[% END %] [% IF holds_count.defined %] Item holds @@ -1480,7 +1480,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( itemdata_copynumber ) %][% ITEM_RESULT.copynumber %][% END %] [% INCLUDE 'item-status.inc' item = ITEM_RESULT %] [% IF ( itemdata_itemnotes ) %][% ITEM_RESULT.itemnotes %][% END %] - [% ITEM_RESULT.datedue | $KohaDates %] + [% IF ( itemdata_datedue ) %][% IF ITEM_RESULT.datedue %][% ITEM_RESULT.datedue | $KohaDates %][% END %][% END %] [% IF ( OPACShowBarcode ) %][% ITEM_RESULT.barcode %][% END %] [% IF holds_count.defined || show_priority %] --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -531,7 +531,7 @@ for my $itm (@items) { # get collection code description, too my $ccode = $itm->{'ccode'}; - $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) ); + $itm->{'ccode'} = $collections->{$ccode} if ( defined($ccode) && defined($collections) && exists( $collections->{$ccode} ) ); my $copynumber = $itm->{'copynumber'}; $itm->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumbers) && defined($copynumber) && exists( $copynumbers->{$copynumber} ) ); if ( defined $itm->{'location'} ) { @@ -541,7 +541,7 @@ for my $itm (@items) { $itm->{'imageurl'} = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} ); $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{'description'}; } - foreach (qw(ccode enumchron copynumber itemnotes uri)) { + foreach (qw(ccode enumchron copynumber itemnotes uri datedue)) { $itemfields{$_} = 1 if ($itm->{$_}); } @@ -610,6 +610,7 @@ my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($bib itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_datedue => $itemfields{datedue}, authorised_value_images => $biblio_authorised_value_images, subtitle => $subtitle, OpacStarRatings => C4::Context->preference("OpacStarRatings"), --