From 3812dcbeec3240804318eaefc997429bd89a75d0 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Tue, 30 Oct 2012 17:12:33 +0100 Subject: [PATCH] Bug 8988: item status uses authorized value description for intranet --- C4/Items.pm | 5 +++-- .../opac-tmpl/prog/en/includes/item-status.inc | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index c114e63..18a7cb1 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1277,13 +1277,14 @@ sub GetItemsInfo { # get notforloan complete status if applicable if ( my $code = C4::Koha::GetAuthValCode( 'items.notforloan', $data->{frameworkcode} ) ) { - $data->{notforloanvalue} = C4::Koha::GetAuthorisedValueByCode( $code, $data->{itemnotforloan} ); + $data->{notforloanvalue} = C4::Koha::GetKohaAuthorisedValueLib( $code, $data->{itemnotforloan} ); + $data->{notforloanvalueopac} = C4::Koha::GetKohaAuthorisedValueLib( $code, $data->{itemnotforloan}, 1 ); } # get restricted status and description if applicable if ( my $code = C4::Koha::GetAuthValCode( 'items.restricted', $data->{frameworkcode} ) ) { $data->{restricted} = C4::Koha::GetKohaAuthorisedValueLib( $code, $data->{restricted} ); - $data->{restrictedopac} = C4::Koha::GetKohaAuthorisedValueLib( $code, $data->{restricted}, 'opac' ); + $data->{restrictedopac} = C4::Koha::GetKohaAuthorisedValueLib( $code, $data->{restricted}, 1 ); } # my stack procedures 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 51c2e9f..98fdb38 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc @@ -25,8 +25,8 @@ [% END %] [% END %] [% ELSIF ( item.itemnotforloan ) %] - [% IF ( item.notforloanvalue ) %] - [% item.notforloanvalue %] [% IF ( item.restrictedopac ) %]([% item.restrictedopac %])[% END %] + [% IF ( item.notforloanvalueopac ) %] + [% item.notforloanvalueopac %] [% IF ( item.restrictedopac ) %]([% item.restrictedopac %])[% END %] [% ELSE %] Not for loan [% IF ( item.restrictedopac ) %]([% item.restrictedopac %])[% END %] [% END %] -- 1.7.9.5