From 07a26e1ebdde27cf6dc052db0506f9755376c39f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 14 Nov 2013 15:41:02 -0500 Subject: [PATCH] Bug 11179 [Follow-up] opac-course-details.pl shows item as available when it is checked out This follow-up applies the same fix to the Bootstrap theme. This patch also includes the changes to item-status.inc in the Bootstrap theme which were made to the prog theme in Bug 10820: display item status as lost if item is both lost and on loan. Signed-off-by: Liz Rea Bootstrap theme looking so nice. Also the patch works. Signed-off-by: Jonathan Druart --- .../bootstrap/en/includes/item-status.inc | 24 ++++++++++---------- .../bootstrap/en/modules/opac-course-details.tt | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc index 60fbe64..fa3a919 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc @@ -1,6 +1,17 @@ [% USE KohaAuthorisedValues %] -[% IF ( item.datedue ) %] +[% IF ( item.itemlost ) %] + [% av_lib_include = KohaAuthorisedValues.GetByCode( 'LOST', item.itemlost, 1 ) %] + [% IF ( av_lib_include ) %] + [% av_lib_include %] + [% ELSE %] + [% IF ( item.lostimageurl ) %] + [% item.lostimagelabel %] + [% ELSE %] + Item lost + [% END %] + [% END %] +[% ELSIF ( item.datedue || issue.date_due ) %] [% IF ( OPACShowCheckoutName ) %] Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %] [% ELSE %] @@ -13,17 +24,6 @@ On hold [% ELSIF ( item.withdrawn ) %] Item withdrawn -[% ELSIF ( item.itemlost ) %] - [% av_lib_include = KohaAuthorisedValues.GetByCode( 'LOST', item.itemlost, 1 ) %] - [% IF ( av_lib_include ) %] - [% av_lib_include %] - [% ELSE %] - [% IF ( item.lostimageurl ) %] - [% item.lostimagelabel %] - [% ELSE %] - Item lost - [% END %] - [% END %] [% ELSIF ( item.itemnotforloan ) %] [% IF ( item.notforloanvalueopac ) %] [% item.notforloanvalueopac %] [% IF ( item.restrictedopac ) %]([% item.restrictedopac %])[% END %] 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 9333511..622c2a6 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 @@ -67,7 +67,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 %] -- 1.7.10.4