From 33403b61d7190d02d26c35adba927f384bdc76b7 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 Signed-off-by: Owen Leonard Passed-QA-by: Marcel de Rooy Signed-off-by: Jared Camins-Esakov --- C4/Items.pm | 5 +++-- koha-tmpl/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 c114e6363f..18a7cb107a 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 51c2e9fe9a..98fdb38c7d 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 %] -- 2.39.5