From 3ca24eb6a05318c42b3ff7acba248d4df6305daa Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 4 Jan 2023 09:09:06 +0100 Subject: [PATCH] Bug 32445: (follow-up) Fix availability display on opac-course-details This is reverting a change made by commit 52b5cdf79b53eb29173e92a7dfe0f76df135e7d9 Bug 19532: Recalls on OPAC Is it correct? I let a comment on bug 19532 comment 928 to ask for clarification. Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- .../opac-tmpl/bootstrap/en/modules/opac-course-details.tt | 2 +- opac/opac-course-details.pl | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt index 8e4aa87c01..2f6cd53383 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt @@ -87,7 +87,7 @@ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode, opac => 1 ) | html %] [% cr.item.itemcallnumber | html %] [% cr.item.copynumber | html %] - [% INCLUDE 'item-status.inc' item=cr.course_item issue=cr.issue show_recall_link=1 %] + [% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue show_recall_link=Koha.Preference('UseRecalls') %] [% cr.issue.date_due | $KohaDates as_due_date => 1 %] [% IF ( cr.public_note ) %] [% cr.public_note | $raw %] diff --git a/opac/opac-course-details.pl b/opac/opac-course-details.pl index 6154549c06..415cade52f 100755 --- a/opac/opac-course-details.pl +++ b/opac/opac-course-details.pl @@ -44,12 +44,6 @@ die("No course_id given") unless ($course_id); my $course = GetCourse($course_id); my $course_reserves = GetCourseReserves( course_id => $course_id, include_items => 1, include_count => 1 ); -if ( C4::Context->preference('UseRecalls') ) { - foreach my $cr ( @$course_reserves ) { - $cr->{course_item} = Koha::Items->find($cr->{itemnumber}); - } -} - $template->param( course => $course, course_reserves => $course_reserves, -- 2.30.2