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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc (-21 / +15 lines)
Lines 7-12 Link Here
7
[%#- structure is used by course reserves pages, which do -%]
7
[%#- structure is used by course reserves pages, which do -%]
8
[%#- not use an API to fetch items that populates item.datedue. -%]
8
[%#- not use an API to fetch items that populates item.datedue. -%]
9
9
10
[% UNLESS item.isa('Koha::Item') %]
11
    <div>Programming error, item-status.inc must be called with a Koha::Item object.<div>
12
    [% STOP %]
13
[% END %]
14
10
[% IF ( item.itemlost ) %]
15
[% IF ( item.itemlost ) %]
11
    [% SET itemavailable = 0 %]
16
    [% SET itemavailable = 0 %]
12
    [% itemlost_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %]
17
    [% itemlost_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %]
Lines 17-29 Link Here
17
    [% END %]
22
    [% END %]
18
[% END %]
23
[% END %]
19
24
20
[% IF item.isa('Koha::Item') %]
25
[% SET datedue = item.checkout.date_due %]
21
    [% SET datedue = item.checkout.date_due %]
26
[% SET onsite_checkout = item.checkout.onsite_checkout %]
22
    [% SET onsite_checkout = item.checkout.onsite_checkout %]
27
23
[% ELSE %]
24
    [% SET datedue = item.datedue || issue.date_due %]
25
    [% SET onsite_checkout = item.onsite_checkout %]
26
[% END %]
27
[% IF datedue %]
28
[% IF datedue %]
28
    [% SET itemavailable = 0 %]
29
    [% SET itemavailable = 0 %]
29
    [% IF onsite_checkout %]
30
    [% IF onsite_checkout %]
Lines 46-62 Link Here
46
    [% END %]
47
    [% END %]
47
[% END %]
48
[% END %]
48
49
49
[% IF item.isa('Koha::Item') %]
50
[% SET transfer = item.get_transfer %]
50
    [% SET transfer = item.get_transfer %]
51
[% IF transfer AND transfer.in_transit %]
51
    [% IF transfer AND transfer.in_transit %]
52
    [% SET transfertwhen = transfer.datesent %]
52
        [% SET transfertwhen = transfer.datesent %]
53
    [% SET transfertfrom = transfer.frombranch %]
53
        [% SET transfertfrom = transfer.frombranch %]
54
    [% SET transfertto = transfer.tobranch %]
54
        [% SET transfertto = transfer.tobranch %]
55
    [% END %]
56
[% ELSE %]
57
        [% SET transfertwhen = item.transfertwhen %]
58
        [% SET transfertfrom = item.transfertfrom %]
59
        [% SET transfertto = item.transfertto %]
60
[% END %]
55
[% END %]
61
[% IF transfertwhen %] [%# transfertwhen is set in C4::Search, do not have it for course reserves %]
56
[% IF transfertwhen %] [%# transfertwhen is set in C4::Search, do not have it for course reserves %]
62
    [% SET itemavailable = 0 %]
57
    [% SET itemavailable = 0 %]
Lines 64-70 Link Here
64
    to [% Branches.GetName( transfertto ) | html %] since [% transfertwhen | $KohaDates %]</span>
59
    to [% Branches.GetName( transfertto ) | html %] since [% transfertwhen | $KohaDates %]</span>
65
[% END %]
60
[% END %]
66
61
67
[% IF (item.isa('Koha::Item') AND item.holds.waiting.count) OR (item.isa('Koha::Item') AND item.holds.processing.count) OR (NOT item.isa('Koha::Item') AND item.waiting) OR (NOT item.isa('Koha::Item') AND item.processing) %]
62
[% IF item.holds.waiting.count OR item.holds.processing.count %]
68
    [% SET itemavailable = 0 %]
63
    [% SET itemavailable = 0 %]
69
    <span class="item-status onhold">On hold</span>
64
    <span class="item-status onhold">On hold</span>
70
[% END %]
65
[% END %]
Lines 108-114 Link Here
108
    [% END %]
103
    [% END %]
109
[% END %]
104
[% END %]
110
105
111
[% IF Koha.Preference('OPACAcquisitionDetails') AND ( item.isa('Koha::Item') ) AND ( item.orders.filter_by_active.count ) %]
106
[% IF Koha.Preference('OPACAcquisitionDetails') AND item.orders.filter_by_active.count %]
112
    [% SET itemavailable = 0 %]
107
    [% SET itemavailable = 0 %]
113
    <span class="item-status onorder">On order</span>
108
    <span class="item-status onorder">On order</span>
114
[% END %]
109
[% END %]
115
- 

Return to bug 32445