View | Details | Raw Unified | Return to bug 32445
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status-schema-org.inc (-9 lines)
Lines 1-9 Link Here
1
[% IF ( item.damaged or item.checkout.date_due or item.itemlost or item.transfertwhen or item.waiting ) %]
2
    <link property="availability" href="http://schema.org/OutOfStock" />
3
[% ELSIF ( item.withdrawn ) %]
4
    <link property="availability" href="http://schema.org/Discontinued" />
5
[% ELSIF ( item.itemnotforloan or item.notforloan_per_itemtype ) %]
6
    <link property="availability" href="http://schema.org/InStoreOnly" />
7
[% ELSE %]
8
    <link property="availability" href="http://schema.org/InStock" />
9
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc (-7 / +21 lines)
Lines 12-17 Link Here
12
    [% STOP %]
12
    [% STOP %]
13
[% END %]
13
[% END %]
14
14
15
[% SET transfer = item.get_transfer %]
16
[% IF transfer AND transfer.in_transit %]
17
    [% SET transfertwhen = transfer.datesent %]
18
    [% SET transfertfrom = transfer.frombranch %]
19
    [% SET transfertto = transfer.tobranch %]
20
[% END %]
21
22
[% SET waiting = item.holds.waiting.count %]
23
[% IF include_schema_org %]
24
    [% IF item.damaged or item.checkout.date_due or item.itemlost or transfertwhen or waiting %]
25
        <link property="availability" href="http://schema.org/OutOfStock" />
26
    [% ELSIF item.withdrawn %]
27
        <link property="availability" href="http://schema.org/Discontinued" />
28
    [% ELSIF item.notforloan or item.itemtype.notforloan %]
29
        <link property="availability" href="http://schema.org/InStoreOnly" />
30
    [% ELSE %]
31
        <link property="availability" href="http://schema.org/InStock" />
32
    [% END %]
33
[% END %]
34
15
[% IF ( item.itemlost ) %]
35
[% IF ( item.itemlost ) %]
16
    [% SET itemavailable = 0 %]
36
    [% SET itemavailable = 0 %]
17
    [% itemlost_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %]
37
    [% itemlost_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %]
Lines 47-65 Link Here
47
    [% END %]
67
    [% END %]
48
[% END %]
68
[% END %]
49
69
50
[% SET transfer = item.get_transfer %]
51
[% IF transfer AND transfer.in_transit %]
52
    [% SET transfertwhen = transfer.datesent %]
53
    [% SET transfertfrom = transfer.frombranch %]
54
    [% SET transfertto = transfer.tobranch %]
55
[% END %]
56
[% IF transfertwhen %] [%# transfertwhen is set in C4::Search, do not have it for course reserves %]
70
[% IF transfertwhen %] [%# transfertwhen is set in C4::Search, do not have it for course reserves %]
57
    [% SET itemavailable = 0 %]
71
    [% SET itemavailable = 0 %]
58
    <span class="item-status intransit">In transit from [% Branches.GetName( transfertfrom ) | html %]
72
    <span class="item-status intransit">In transit from [% Branches.GetName( transfertfrom ) | html %]
59
    to [% Branches.GetName( transfertto ) | html %] since [% transfertwhen | $KohaDates %]</span>
73
    to [% Branches.GetName( transfertto ) | html %] since [% transfertwhen | $KohaDates %]</span>
60
[% END %]
74
[% END %]
61
75
62
[% IF item.holds.waiting.count OR item.holds.processing.count %]
76
[% IF waiting OR item.holds.processing.count %]
63
    [% SET itemavailable = 0 %]
77
    [% SET itemavailable = 0 %]
64
    <span class="item-status onhold">On hold</span>
78
    <span class="item-status onhold">On hold</span>
65
[% END %]
79
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-2 / +1 lines)
Lines 1372-1378 Link Here
1372
                    </td>
1372
                    </td>
1373
                [% END # /IF itemdata_uri %]
1373
                [% END # /IF itemdata_uri %]
1374
                [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber | html %]</td>[% END %]
1374
                [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber | html %]</td>[% END %]
1375
                <td class="status">[% INCLUDE 'item-status-schema-org.inc' item = ITEM_RESULT %][% INCLUDE 'item-status.inc' item = ITEM_RESULT.object %]</td>
1375
                <td class="status">[% INCLUDE 'item-status.inc' item = ITEM_RESULT.object include_schema_org = 1 %]</td>
1376
                [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | $raw %]</td>[% END %]
1376
                [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | $raw %]</td>[% END %]
1377
                [% IF ITEM_RESULT.checkout %]
1377
                [% IF ITEM_RESULT.checkout %]
1378
                    <td class="date_due" data-order="[% ITEM_RESULT.checkout.date_due | html %]">[% ITEM_RESULT.checkout.date_due | $KohaDates as_due_date => 1 %]</td>
1378
                    <td class="date_due" data-order="[% ITEM_RESULT.checkout.date_due | html %]">[% ITEM_RESULT.checkout.date_due | $KohaDates as_due_date => 1 %]</td>
1379
- 

Return to bug 32445