@@ -, +, @@ items.restricted - Before applying patch - Configure OpacHiddenItems with: restricted: [1] - Find a record with more than one item and mark one of the items as "Restricted Access" (assume standard sample data - check authorised value if status doesn't exist) - Verify the item is still shown in OPAC. - Apply patch - Verify that the item is now hidden - Verify that the status still displays nicely in the staff detail page - Delete OpacHiddenItems - Verify that the status is showing nicely in the OPAC detail page --- C4/Items.pm | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) --- a/C4/Items.pm +++ a/C4/Items.pm @@ -1047,8 +1047,8 @@ sub GetItemsInfo { # get restricted status and description if applicable $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $data->{frameworkcode}, kohafield => 'items.restricted', authorised_value => $data->{restricted} }); - $data->{restricted} = $descriptions->{lib} // ''; - $data->{restrictedopac} = $descriptions->{opac_description} // ''; + $data->{restrictedvalue} = $descriptions->{lib} // ''; + $data->{restrictedvalueopac} = $descriptions->{opac_description} // ''; # my stack procedures $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $data->{frameworkcode}, kohafield => 'items.stack', authorised_value => $data->{stack} }); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -497,7 +497,7 @@ [% END %] [% IF ( item.restricted ) %] - ([% item.restricted | html %]) + ([% item.restrictedvalue | html %]) [% END %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc @@ -65,13 +65,13 @@ [% IF NOT ( item.isa('Koha::Item') ) AND item.itemnotforloan %] [% SET itemavailable = 0 %] [% IF ( item.notforloanvalueopac ) %] - [% item.notforloanvalueopac | html %] [% IF ( item.restrictedopac ) %]([% item.restrictedopac | html %])[% END %] + [% item.notforloanvalueopac | html %] [% IF ( item.restrictedvalueopac ) %]([% item.restrictedvalueopac | html %])[% END %] [% ELSE %] - Not for loan [% IF ( item.restrictedopac ) %]([% item.restrictedopac | html %])[% END %] + Not for loan [% IF ( item.restrictedvalueopac ) %]([% item.restrictedvalueopac | html %])[% END %] [% END %] [% ELSIF NOT ( item.isa('Koha::Item') ) AND item.notforloan_per_itemtype %] [% SET itemavailable = 0 %] - Not for loan [% IF ( item.restrictedopac ) %]([% item.restrictedopac | html %])[% END %] + Not for loan [% IF ( item.restrictedvalueopac ) %]([% item.restrictedvalueopac | html %])[% END %] [% END %] [% IF ( item.damaged ) %] @@ -90,6 +90,6 @@ [% END %] [% IF ( itemavailable ) %] - [% IF NOT item.isa('Koha::Item') %][% SET restrictedopac = item.restrictedopac %][% END %] - Available [% IF restrictedopac %]([% restrictedopac | html %])[% END %] + [% IF NOT item.isa('Koha::Item') %][% SET restrictedvalueopac = item.restrictedvalueopac %][% END %] + Available [% IF restrictedvalueopac %]([% restrictedvalueopac | html %])[% END %] [% END %] --