From dc5e4e5b631116ce7ce16143ba56c5eb0385d986 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 31 Oct 2013 14:27:30 -0400 Subject: [PATCH] Bug 11179: make OPAC course details page display status of checked out items correctly If an item is listed for a course and is checked out, the item will still show as being available from the course details page which lists all the items that are part of a course. This is due to the way the course reserves system handles items and issues separately, while item-status.inc assumes the due date has been embedded in items.datedue Test Plan: 1) Create a course 2) Add an item to that course 3) Check the item out to a patron 4) View the course details from the opac 5) Note the status says "Available" 6) Apply this patch 7) Repeat step 4 8) Note the status no longer says "Available" Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc index d2651f080a..a3f0b79bc4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc @@ -11,7 +11,7 @@ Item lost [% END %] [% END %] -[% ELSIF ( item.datedue ) %] +[% ELSIF ( item.datedue || issue.date_due ) %] [% IF ( OPACShowCheckoutName ) %] Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %] [% ELSE %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt index 4721ae4a7b..a1da668f97 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt @@ -59,7 +59,7 @@ [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %] [% cr.item.itemcallnumber %] [% cr.item.copynumber %] - [% INCLUDE 'item-status.inc' item = cr.item %] + [% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %] [% cr.issue.date_due | $KohaDates %] [% cr.public_note %] -- 2.39.5