@@ -, +, @@
restricted (OPAC details)
---
.../bootstrap/en/includes/item-status.inc | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc
@@ -90,19 +90,26 @@
[% END %]
[% END %]
+[% BLOCK restricted_info %]
+ [% IF item.restricted %]
+ [% SET restricted_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted, opac => 1 ) %]
+ [% IF restricted_lib %]
+ ([% restricted_lib | html %])
+ [% END %]
+ [% END %]
+[% END %]
-[% SET restricted_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted, opac => 1 ) %]
[% IF item.notforloan %]
[% SET itemavailable = 0 %]
[% notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan, opac => 1 ) %]
[% IF notforloan_lib %]
- [% notforloan_lib | html %] [% IF restricted_lib %]([% restricted_lib | html %])[% END %]
+ [% notforloan_lib | html %] [% PROCESS restricted_info %]
[% ELSE %]
- Not for loan [% IF restricted_lib %]([% restricted_lib | html %])[% END %]
+ Not for loan [% PROCESS restricted_info %]
[% END %]
[% ELSIF item.itemtype.notforloan %]
[% SET itemavailable = 0 %]
- Not for loan [% IF restricted_lib %]([% restricted_lib | html %])[% END %]
+ Not for loan [% PROCESS restricted_info %]
[% END %]
[% IF ( item.bundle_host ) %]
@@ -135,5 +142,5 @@
[% END %]
[% IF ( itemavailable ) %]
- Available [% IF restricted_lib %]([% restricted_lib | html %])[% END %]
+ Available [% PROCESS restricted_info %]
[% END %]
--