diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status-schema-org.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status-schema-org.inc deleted file mode 100644 index 66e4f3656e..0000000000 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status-schema-org.inc +++ /dev/null @@ -1,9 +0,0 @@ -[% IF ( item.damaged or item.checkout.date_due or item.itemlost or item.transfertwhen or item.waiting ) %] - -[% ELSIF ( item.withdrawn ) %] - -[% ELSIF ( item.itemnotforloan or item.notforloan_per_itemtype ) %] - -[% ELSE %] - -[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc index 7adeb1e0f2..0573b90e06 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc @@ -12,6 +12,26 @@ [% STOP %] [% END %] +[% SET transfer = item.get_transfer %] +[% IF transfer AND transfer.in_transit %] + [% SET transfertwhen = transfer.datesent %] + [% SET transfertfrom = transfer.frombranch %] + [% SET transfertto = transfer.tobranch %] +[% END %] + +[% SET waiting = item.holds.waiting.count %] +[% IF include_schema_org %] + [% IF item.damaged or item.checkout.date_due or item.itemlost or transfertwhen or waiting %] + + [% ELSIF item.withdrawn %] + + [% ELSIF item.notforloan or item.itemtype.notforloan %] + + [% ELSE %] + + [% END %] +[% END %] + [% IF ( item.itemlost ) %] [% SET itemavailable = 0 %] [% itemlost_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %] @@ -47,19 +67,13 @@ [% END %] [% END %] -[% SET transfer = item.get_transfer %] -[% IF transfer AND transfer.in_transit %] - [% SET transfertwhen = transfer.datesent %] - [% SET transfertfrom = transfer.frombranch %] - [% SET transfertto = transfer.tobranch %] -[% END %] [% IF transfertwhen %] [%# transfertwhen is set in C4::Search, do not have it for course reserves %] [% SET itemavailable = 0 %] In transit from [% Branches.GetName( transfertfrom ) | html %] to [% Branches.GetName( transfertto ) | html %] since [% transfertwhen | $KohaDates %] [% END %] -[% IF item.holds.waiting.count OR item.holds.processing.count %] +[% IF waiting OR item.holds.processing.count %] [% SET itemavailable = 0 %] On hold [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 7fde0c96a7..e97198aed4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1372,7 +1372,7 @@ [% END # /IF itemdata_uri %] [% IF ( itemdata_copynumber ) %]