diff --git a/C4/Search.pm b/C4/Search.pm index d66746e1e0..772f745bea 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1619,6 +1619,7 @@ sub searchResults { foreach my $code ( keys %subfieldstosearch ) { $item->{$code} = $field->subfield( $subfieldstosearch{$code} ); } + $item->{description} = $itemtypes{ $item->{itype} }{description}; # Hidden items if ($is_opac) { @@ -1649,6 +1650,7 @@ sub searchResults { $onloan_items->{$key}->{branchname} = $item->{branchname}; $onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} }; $onloan_items->{$key}->{itemcallnumber} = $item->{itemcallnumber}; + $onloan_items->{$key}->{description} = $item->{description}; $onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} ); # if something's checked out and lost, mark it as 'long overdue' if ( $item->{itemlost} ) { @@ -1733,6 +1735,7 @@ sub searchResults { $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value; $other_items->{$key}->{count}++ if $item->{$hbranch}; $other_items->{$key}->{location} = $shelflocations->{ $item->{location} }; + $other_items->{$key}->{description} = $item->{description}; $other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} ); } # item is available @@ -1740,7 +1743,7 @@ sub searchResults { $can_place_holds = 1; $available_count++; $available_items->{$prefix}->{count}++ if $item->{$hbranch}; - foreach (qw(branchname itemcallnumber hideatopac)) { + foreach (qw(branchname itemcallnumber hideatopac description)) { $available_items->{$prefix}->{$_} = $item->{$_}; } $available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 6d7b6b3687..8377ed40f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -255,16 +255,12 @@ function verify_images() { [% FOREACH itemloo IN itemloop %]
[% UNLESS ( item_level_itypes ) %]
- [% UNLESS ( noItemTypeImages ) %][% IF ( SEARCH_RESULT.imageurl ) %]
-
- [% END %][% END %]
+ [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %]
+
+ [% END %]
+ [% SEARCH_RESULT.description %]
[% END %]
[% SEARCH_RESULT.summary %]
[% UNLESS ( item_level_itypes ) %]
- [% UNLESS ( noItemTypeImages ) %][% IF ( SEARCH_RESULT.imageurl ) %]
+ [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %]
- [% END %][% END %]
+ [% END %]
[% END %]
[% IF ( SEARCH_RESULT.author ) %]
@@ -531,41 +532,56 @@ YAHOO.util.Event.onContentReady("searchheader", function () {