use JSON rather than Storable for the OPAC search history cookie
[koha.git] / opac / opac-detail.pl
index 722a401..9d0851f 100755 (executable)
@@ -50,6 +50,7 @@ use List::MoreUtils qw/any none/;
 use C4::Images;
 use Koha::DateUtils;
 use C4::HTML5Media;
+use C4::CourseReserves qw(GetItemCourseReservesInfo);
 
 BEGIN {
        if (C4::Context->preference('BakerTaylorEnabled')) {
@@ -1055,4 +1056,10 @@ if (C4::Context->preference('OpacHighlightedWords')) {
 }
 $template->{VARS}->{'trackclicks'} = C4::Context->preference('TrackClicks');
 
+if ( C4::Context->preference('UseCourseReserves') ) {
+    foreach my $i ( @items ) {
+        $i->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $i->{'itemnumber'} );
+    }
+}
+
 output_html_with_http_headers $query, $cookie, $template->output;