-[% USE KohaAuthorisedValues %]
+[% USE AuthorisedValues %]
+
+[%#-
+This include takes two parameters: an item structure
+and an optional loan (issue) structure. The issue
+structure is used by course reserves pages, which do
+not use an API to fetch items that populates item.datedue.
+-%]
[% IF ( item.itemlost ) %]
- [% av_lib_include = KohaAuthorisedValues.GetByCode( 'LOST', item.itemlost, 1 ) %]
+ [% av_lib_include = AuthorisedValues.GetByCode( 'LOST', item.itemlost, 1 ) %]
[% IF ( av_lib_include ) %]
[% av_lib_include %]
[% ELSE %]
[% END %]
[% END %]
[% ELSIF ( item.datedue || issue.date_due ) %]
+ [% IF inhouse_use %]
+ [% IF ( OPACShowCheckoutName ) %]
+ Currently in local use by [% item.cardnumber %] [% item.firstname %] [% item.surname %]
+ [% ELSE %]
+ Currently in local use
+ [% END %]
+ [% ELSE %]
[% IF ( OPACShowCheckoutName ) %]
Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %]
[% ELSE %]
Checked out
[% END %]
+ [% END %]
[% ELSIF ( item.transfertwhen ) %]
In transit from [% item.transfertfrom %]
to [% item.transfertto %] since [% item.transfertwhen %]
[% ELSIF ( item.notforloan_per_itemtype ) %]
Not for loan [% IF ( item.restrictedopac ) %]<span class="restricted">([% item.restrictedopac %])</span>[% END %]
[% ELSIF ( item.damaged ) %]
- [% av_lib_include = KohaAuthorisedValues.GetByCode( 'DAMAGED', item.damaged, 1 ) %]
+ [% av_lib_include = AuthorisedValues.GetByCode( 'DAMAGED', item.damaged, 1 ) %]
[% IF av_lib_include %]
[% av_lib_include %]
[% ELSE %]
Item damaged
[% END %]
+[% ELSIF item.on_order %]
+ On order
[% ELSE %]
Available [% IF ( item.restrictedopac ) %]<span class="restricted">([% item.restrictedopac %])</span>[% END %]
[% END %]