@@ -, +, @@
---
.../bootstrap/en/includes/item-status.inc | 29 ++++++++++---------
1 file changed, 15 insertions(+), 14 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc
@@ -9,9 +9,9 @@
[% IF ( item.itemlost ) %]
[% SET itemavailable = 0 %]
- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %]
- [% IF ( av_lib_include ) %]
- [% av_lib_include | html %]
+ [% itemlost_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %]
+ [% IF itemlost_lib %]
+ [% itemlost_lib | html %]
[% ELSE %]
Item lost
[% END %]
@@ -71,25 +71,27 @@
[% IF ( item.withdrawn ) %]
[% SET itemavailable = 0 %]
- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %]
- [% IF av_lib_include %]
- [% av_lib_include | html %]
+ [% withdrawn_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %]
+ [% IF withdrawn_lib %]
+ [% withdrawn_lib | html %]
[% ELSE %]
Item withdrawn
[% END %]
[% END %]
-[% IF NOT ( item.isa('Koha::Item') ) AND item.itemnotforloan %]
+[% SET restricted_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %]
+[% IF item.notforloan %]
[% SET itemavailable = 0 %]
- [% IF ( item.notforloanvalueopac ) %]
- [% item.notforloanvalueopac | html %] [% IF ( item.restrictedvalueopac ) %]([% item.restrictedvalueopac | html %])[% END %]
+ [% notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %]
+ [% IF notforloan_lib %]
+ [% notforloan_lib | html %] [% IF restricted_lib %]([% restricted_lib | html %])[% END %]
[% ELSE %]
- Not for loan [% IF ( item.restrictedvalueopac ) %]([% item.restrictedvalueopac | html %])[% END %]
+ Not for loan [% IF restricted_lib %]([% restricted_lib | html %])[% END %]
[% END %]
-[% ELSIF NOT ( item.isa('Koha::Item') ) AND item.notforloan_per_itemtype %]
+[% ELSIF item.itemtype.notforloan %]
[% SET itemavailable = 0 %]
- Not for loan [% IF ( item.restrictedvalueopac ) %]([% item.restrictedvalueopac | html %])[% END %]
+ Not for loan [% IF restricted_lib %]([% restricted_lib | html %])[% END %]
[% END %]
[% IF ( item.bundle_host ) %]
@@ -122,6 +124,5 @@
[% END %]
[% IF ( itemavailable ) %]
- [% IF NOT item.isa('Koha::Item') %][% SET restrictedvalueopac = item.restrictedvalueopac %][% END %]
- Available [% IF restrictedvalueopac %]([% restrictedvalueopac | html %])[% END %]
+ Available [% IF restricted_lib %]([% restricted_lib | html %])[% END %]
[% END %]
--