@@ -, +, @@ --- C4/Items.pm | 25 ++++++++++++++++++++ .../prog/en/modules/catalogue/detail.tmpl | 2 + .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 +- 3 files changed, 28 insertions(+), 1 deletions(-) --- a/C4/Items.pm +++ a/C4/Items.pm @@ -1355,6 +1355,31 @@ sub GetItemsInfo { } $data->{itypenotforloan} = $data->{notforloan} if (C4::Context->preference('item-level_itypes')); + # get restricted status and description if applicable + my $restrictedstatus = $dbh->prepare( + 'SELECT authorised_value + FROM marc_subfield_structure + WHERE kohafield="items.restricted" + ' + ); + + $restrictedstatus->execute; + my ($authorised_valuecode) = $restrictedstatus->fetchrow; + if ($authorised_valuecode) { + $restrictedstatus = $dbh->prepare( + "SELECT lib,lib_opac FROM authorised_values + WHERE category=? + AND authorised_value=?" + ); + $restrictedstatus->execute( $authorised_valuecode, + $data->{restricted} ); + + if ( my $rstdata = $restrictedstatus->fetchrow_hashref ) { + $data->{restricted} = $rstdata->{'lib'}; + $data->{restrictedopac} = $rstdata->{'lib_opac'}; + } + } + # my stack procedures my $stackstatus = $dbh->prepare( 'SELECT authorised_value --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -297,6 +297,8 @@ function verify_images() { Available + + () --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -411,7 +411,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { - + () --