@@ -, +, @@
---
koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc | 7 +++++--
.../opac-tmpl/bootstrap/en/modules/opac-course-details.tt | 2 +-
opac/opac-course-details.pl | 5 +----
3 files changed, 7 insertions(+), 7 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc
@@ -39,8 +39,11 @@
Checked out
[% END %]
[% END %]
- [%# FIXME We should move avail_for_recall to a Koha::Item method %]
- [% IF !item.isa('Koha::Item') AND item.avail_for_recall %]Recall[% END %]
+ [% IF show_recall_link %]
+ [% IF datedue && logged_in_user.borrowernumber != issue.borrowernumber %]
+ Recall
+ [% END %]
+ [% END %]
[% END %]
[% IF item.isa('Koha::Item') %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt
+++ a/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 %] |
+ [% INCLUDE 'item-status.inc' item=cr.course_item issue=cr.issue show_recall_link=1 %] |
[% cr.issue.date_due | $KohaDates as_due_date => 1 %] |
[% IF ( cr.public_note ) %]
[% cr.public_note | $raw %]
--- a/opac/opac-course-details.pl
+++ a/opac/opac-course-details.pl
@@ -46,10 +46,7 @@ my $course_reserves = GetCourseReserves( course_id => $course_id, include_items
if ( C4::Context->preference('UseRecalls') ) {
foreach my $cr ( @$course_reserves ) {
- if ( $cr->{issue}->{date_due} and $cr->{issue}->{borrowernumber} and $borrowernumber != $cr->{issue}->{borrowernumber} ) {
- $cr->{course_item}->{avail_for_recall} = 1;
- $cr->{course_item}->{biblionumber} = Koha::Items->find( $cr->{itemnumber} )->biblionumber;
- }
+ $cr->{course_item} = Koha::Items->find($cr->{itemnumber});
}
}
--
|