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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-34 / +17 lines)
Lines 2315-2330 nav { Link Here
2315
    }
2315
    }
2316
}
2316
}
2317
2317
2318
#holds {
2319
    margin: 0 auto;
2320
    max-width: 800px;
2321
}
2322
2323
.holdrow {
2318
.holdrow {
2324
    border-bottom: 1px solid #CCC;
2319
    border-bottom: 1px solid #CCC;
2325
    clear: both;
2320
    clear: both;
2326
    margin-bottom: .5em;
2321
    margin-bottom: .5em;
2327
    padding: 0 1em 1em 1em;
2322
    padding: 1em 0;
2328
2323
2329
    fieldset {
2324
    fieldset {
2330
        border: 0;
2325
        border: 0;
Lines 2348-2353 nav { Link Here
2348
.toggle-hold-options {
2343
.toggle-hold-options {
2349
    background-color: #EEE;
2344
    background-color: #EEE;
2350
    clear: both;
2345
    clear: both;
2346
    color: #01547C;
2351
    display: block;
2347
    display: block;
2352
    font-weight: bold;
2348
    font-weight: bold;
2353
    margin: 1em 0;
2349
    margin: 1em 0;
Lines 2358-2398 nav { Link Here
2358
    clear: both;
2354
    clear: both;
2359
}
2355
}
2360
2356
2361
#idreambooksreadometer {
2357
.holdbiblio {
2362
    float: right;
2358
    border: 1px solid #DDD;
2359
    display: flex;
2360
    float: none;
2361
    font-size: 1rem;
2362
    font-weight: bold;
2363
    gap: 1rem;
2364
    margin: .5rem 0;
2365
    padding: 1rem;
2363
}
2366
}
2364
2367
2365
.idreambookslegend {
2368
.holdrow[disabled] {
2366
    font-size: small;
2369
    opacity: .8;
2367
}
2368
2370
2369
.idreambookssummary {
2371
    .holdcontrols * {
2370
    a {
2372
        pointer-events: none;
2371
        color: #707070;
2372
        text-decoration: none;
2373
    }
2374
2375
    img {
2376
        vertical-align: middle;
2377
    }
2373
    }
2378
}
2374
}
2379
2375
2380
.idbresult {
2381
    color: #29ADE4;
2382
    margin: .5em;
2383
    padding: .5em;
2384
    text-align: center;
2385
2376
2386
    img {
2377
.confirmjs_hold {
2387
        padding-right: 6px;
2378
    display: block;
2388
        vertical-align: middle;
2389
    }
2390
2391
    a,
2392
    a:visited {
2393
        color: #29ADE4;
2394
        text-decoration: none;
2395
    }
2396
}
2379
}
2397
2380
2398
.js-show {
2381
.js-show {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt (-455 / +462 lines)
Lines 27-514 Link Here
27
27
28
    <div class="container">
28
    <div class="container">
29
        <div id="holds" class="maincontent">
29
        <div id="holds" class="maincontent">
30
            <h1>Placing a hold</h1>
30
            <div class="row">
31
            [% IF ( message ) %]
31
                <div class="col-lg-8 offset-lg-2">
32
                <div id="holdmessages" class="alert">
32
                    <h1>Placing a hold</h1>
33
                    <p>Sorry, you cannot place holds.</p>
33
                    [% IF ( message ) %]
34
                    <ul>
34
                        <div id="holdmessages" class="alert">
35
                        [% IF ( GNA ) %]
35
                            <p>Sorry, you cannot place holds.</p>
36
                            <li id="gna">
36
                            <ul>
37
                                According to our records, we don't have up-to-date contact information. Please contact the library.
37
                                [% IF ( GNA ) %]
38
                                <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]<span>Update your contact information</span>[% ELSE %]<span>Go to your contact information</span>[% END %]</a>
38
                                    <li id="gna">
39
                                [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
39
                                        According to our records, we don't have up-to-date contact information. Please contact the library.
40
                            </li>
40
                                        <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]<span>Update your contact information</span>[% ELSE %]<span>Go to your contact information</span>[% END %]</a>
41
                        [% END %]
41
                                        [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
42
                                    </li>
43
                                [% END %]
42
44
43
                        [% IF ( lost ) %]
45
                                [% IF ( lost ) %]
44
                            <li id="lost">
46
                                    <li id="lost">
45
                                Your library card has been marked as lost or stolen.<br />
47
                                        Your library card has been marked as lost or stolen.<br />
46
                                <em>If this is an error, please take your library card to the circulation desk at your local library and the error will be corrected.</em>
48
                                        <em>If this is an error, please take your library card to the circulation desk at your local library and the error will be corrected.</em>
47
                            </li>
49
                                    </li>
48
                        [% END %]
50
                                [% END %]
49
51
50
                        [% IF ( debarred ) %]
52
                                [% IF ( debarred ) %]
51
                            <li id="debarred">
53
                                    <li id="debarred">
52
                                Your account has been frozen.
54
                                        Your account has been frozen.
53
                                [% IF debarred_comment %]
55
                                        [% IF debarred_comment %]
54
                                    Comment:<br />
56
                                            Comment:<br />
55
                                    <span id="userdebarred_comment">
57
                                            <span id="userdebarred_comment">
56
                                        <strong>
58
                                                <strong>
57
                                            [% IF debarred_comment.search('OVERDUES_PROCESS') %]
59
                                                    [% IF debarred_comment.search('OVERDUES_PROCESS') %]
58
                                                Restriction added by overdues process [% debarred_comment.remove('OVERDUES_PROCESS ') | html_line_break %]
60
                                                        Restriction added by overdues process [% debarred_comment.remove('OVERDUES_PROCESS ') | html_line_break %]
59
                                            [% ELSE %]
61
                                                    [% ELSE %]
60
                                                [% FOR restriction IN logged_in_user.restrictions %]
62
                                                        [% FOR restriction IN logged_in_user.restrictions %]
61
                                                    <div class="patron_restriction">
63
                                                            <div class="patron_restriction">
62
                                                        [%- restriction.type.display_text | html -%][%- IF restriction.comment -%]: <span class="restriction_comment">[% restriction.comment | html_line_break %]</span>, frozen until:
64
                                                                [%- restriction.type.display_text | html -%][%- IF restriction.comment -%]: <span class="restriction_comment">[% restriction.comment | html_line_break %]</span>, frozen until:
63
                                                        <span class="restriction_expiration">
65
                                                                <span class="restriction_expiration">
64
                                                        [%- IF restriction.expiration -%]
66
                                                                [%- IF restriction.expiration -%]
65
                                                            [%- restriction.expiration | $KohaDates -%]
67
                                                                    [%- restriction.expiration | $KohaDates -%]
66
                                                        [%- ELSE -%]
68
                                                                [%- ELSE -%]
67
                                                            <strong>Indefinite</strong>
69
                                                                    <strong>Indefinite</strong>
68
                                                        [%- END -%]
70
                                                                [%- END -%]
69
                                                        </span>
71
                                                                </span>
72
                                                            [% END %]
73
                                                            </div>
74
                                                        [% END %]
70
                                                    [% END %]
75
                                                    [% END %]
71
                                                    </div>
76
                                                </strong>
72
                                                [% END %]
77
                                            </span>
73
                                            [% END %]
78
                                        [% END %]
74
                                        </strong>
79
75
                                    </span>
80
                                        [% IF debarred_date && debarred_date != '9999-12-31' %]
81
                                            End date:
82
                                            <span id="userdebarred_date">[% debarred_date | $KohaDates %]</span>
83
                                        [% END %]
84
                                        <br /><em>Usually the reason for freezing an account is old overdues or damage fees. If shows your account to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your charges page</a>
85
                                    </li>
76
                                [% END %]
86
                                [% END %]
77
87
78
                                [% IF debarred_date && debarred_date != '9999-12-31' %]
88
                                [% IF ( too_much_oweing ) %]
79
                                    End date:
89
                                    <li id="too_much_oweing">
80
                                    <span id="userdebarred_date">[% debarred_date | $KohaDates %]</span>
90
                                        You have unpaid fines. Amount: [% too_much_oweing | $Price %].
91
                                    </li>
81
                                [% END %]
92
                                [% END %]
82
                                <br /><em>Usually the reason for freezing an account is old overdues or damage fees. If shows your account to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your charges page</a>
83
                            </li>
84
                        [% END %]
85
93
86
                        [% IF ( too_much_oweing ) %]
94
                                [% IF ( too_many_reserves ) %]
87
                            <li id="too_much_oweing">
95
                                    <li id="too_many_reserves">
88
                                You have unpaid fines. Amount: [% too_much_oweing | $Price %].
96
                                        Sorry, you cannot place more than [% too_many_reserves | html %] holds.
89
                            </li>
97
                                    </li>
90
                        [% END %]
98
                                [% END %]
91
99
92
                        [% IF ( too_many_reserves ) %]
100
                                [% IF ( bad_biblionumber ) %]
93
                            <li id="too_many_reserves">
101
                                    <li id="bad_biblionumber">
94
                                Sorry, you cannot place more than [% too_many_reserves | html %] holds.
102
                                        ERROR: No record found for record ID [% bad_biblionumber | html %].
95
                            </li>
103
                                    </li>
96
                        [% END %]
104
                                [% END %]
97
105
98
                        [% IF ( bad_biblionumber ) %]
106
                                [% IF ( no_items_selected ) %]
99
                            <li id="bad_biblionumber">
107
                                    <li id="no_items_selected">
100
                                ERROR: No record found for record ID [% bad_biblionumber | html %].
108
                                        You must select at least one item.
101
                            </li>
109
                                    </li>
102
                        [% END %]
110
                                [% END %]
103
111
104
                        [% IF ( no_items_selected ) %]
112
                                [% IF ( no_branch_selected ) %]
105
                            <li id="no_items_selected">
113
                                    <li id="no_branch_selected">
106
                                You must select at least one item.
114
                                        You must select a library for pickup.
107
                            </li>
115
                                    </li>
108
                        [% END %]
116
                                [% END %]
109
117
110
                        [% IF ( no_branch_selected ) %]
118
                                [% IF ( no_biblionumber ) %]
111
                            <li id="no_branch_selected">
119
                                    <li id="no_biblionumber">
112
                                You must select a library for pickup.
120
                                    ERROR: No record ID specified.
113
                            </li>
121
                                </li>
114
                        [% END %]
122
                                [% END %]
115
123
116
                        [% IF ( no_biblionumber ) %]
124
                                [% IF ( bad_data ) %]
117
                            <li id="no_biblionumber">
125
                                    <li id="bad_data">
118
                               ERROR: No record ID specified.
126
                                        ERROR: Internal error: incomplete hold request.
119
                           </li>
127
                                    </li>
120
                        [% END %]
128
                                [% END %]
121
129
122
                        [% IF ( bad_data ) %]
130
                                [% IF ( expired_patron ) %]
123
                            <li id="bad_data">
131
                                    <li id="expired_patron">
124
                                ERROR: Internal error: incomplete hold request.
132
                                        Your library card has expired. Please contact your librarian if you wish to renew your card.
125
                            </li>
133
                                    </li>
126
                        [% END %]
134
                                [% END %]
127
135
128
                        [% IF ( expired_patron ) %]
136
                                [% IF ( no_pickup_locations ) %]
129
                            <li id="expired_patron">
137
                                    <li id="no_pickup_locations">
130
                                Your library card has expired. Please contact your librarian if you wish to renew your card.
138
                                        None of the libraries are available for pickup location.
131
                            </li>
139
                                    </li>
140
                                [% END %]
141
                            </ul>
142
                        </div> <!-- /.message -->
143
                    [% ELSE # /IF message %]
144
145
                        [% IF ( none_available && multi_hold ) %]
146
                            <div id="none_available" class="alert">
147
                                Sorry, none of these titles can be placed on hold.
148
                            </div>
132
                        [% END %]
149
                        [% END %]
133
150
134
                        [% IF ( no_pickup_locations ) %]
151
                    [% END # / IF message %]
135
                            <li id="no_pickup_locations">
152
136
                                None of the libraries are available for pickup location.
153
                    [% UNLESS ( message ) %]
137
                            </li>
154
                        [% UNLESS ( none_available ) %]
155
                            <h2>Confirm holds for:[% INCLUDE 'patron-title.inc' patron = logged_in_user %] ([% logged_in_user.cardnumber | html %])</h2>
156
                        [% END # / UNLESS none_available %]
157
158
                        [% IF ( new_reserves_allowed ) %]
159
                            <div id="new_reserves_allowed" class="alert">
160
                                <strong>Sorry,</strong> you can only place [% new_reserves_allowed | html %] more holds. Please uncheck the checkboxes for the items you wish to not place holds on.
161
                            </div>
138
                        [% END %]
162
                        [% END %]
139
                    </ul>
163
140
                </div> <!-- /.message -->
164
                    <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
141
            [% ELSE # /IF message %]
165
                        [% INCLUDE 'csrf-token.inc' %]
142
166
                        <legend class="sr-only">Hold requests</legend>
143
                [% IF ( none_available && multi_hold ) %]
167
                        <input type="hidden" name="op" value="cud-place_reserve" />
144
                    <div id="none_available" class="alert">
168
                        <!-- These values are set dynamically by js -->
145
                        Sorry, none of these titles can be placed on hold.
169
                            <input type="hidden" name="biblionumbers" id="biblionumbers"/>
146
                    </div>
170
                            <input type="hidden" name="selecteditems" id="selections"/>
147
                [% END %]
171
                            <div id="bigloop">
148
172
149
            [% END # / IF message %]
173
                                [% FOREACH bibitemloo IN bibitemloop %]
150
174
                                    <fieldset id="holdrow_[% bibitemloo.biblionumber | html %]" class="holdrow">
151
            [% UNLESS ( message ) %]
175
                                        [% IF bibitemloo.forced_hold_level %]
152
                [% UNLESS ( none_available ) %]
176
                                            <div class="alert alert-info forced_hold_level">
153
                    <h2>Confirm holds for:[% INCLUDE 'patron-title.inc' patron = logged_in_user %] ([% logged_in_user.cardnumber | html %])</h2>
177
                                                [% IF bibitemloo.forced_hold_level == 'item' %]
154
                [% END # / UNLESS none_available %]
178
                                                    <span>You already have at least one item level hold on this title.
155
179
                                                    All further holds must be item level.</span>
156
                [% IF ( new_reserves_allowed ) %]
180
                                                [% ELSE %]
157
                    <div id="new_reserves_allowed" class="alert">
181
                                                    <span>You already have at least one record level hold on this title.
158
                        <strong>Sorry,</strong> you can only place [% new_reserves_allowed | html %] more holds. Please uncheck the checkboxes for the items you wish to not place holds on.
182
                                                    All further holds must be record level.</span>
159
                    </div>
183
                                                [% END %]
160
                [% END %]
184
                                            </div>
161
162
            <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
163
                [% INCLUDE 'csrf-token.inc' %]
164
                <legend class="sr-only">Hold requests</legend>
165
                <input type="hidden" name="op" value="cud-place_reserve" />
166
                <!-- These values are set dynamically by js -->
167
                    <input type="hidden" name="biblionumbers" id="biblionumbers"/>
168
                    <input type="hidden" name="selecteditems" id="selections"/>
169
                    <div id="bigloop">
170
171
                        [% FOREACH bibitemloo IN bibitemloop %]
172
                            <div class="holdrow">
173
                                [% IF bibitemloo.forced_hold_level %]
174
                                    <div class="alert alert-info forced_hold_level">
175
                                        [% IF bibitemloo.forced_hold_level == 'item' %]
176
                                            <span>You already have at least one item level hold on this title.
177
                                            All further holds must be item level.</span>
178
                                        [% ELSE %]
179
                                            <span>You already have at least one record level hold on this title.
180
                                            All further holds must be record level.</span>
181
                                        [% END %]
185
                                        [% END %]
182
                                    </div>
183
                                [% END %]
184
186
185
                                [% IF ( bibitemloo.reserve_charge ) %]
187
                                        [% IF ( bibitemloo.reserve_charge ) %]
186
                                    <div class="alert" id="reserve_fee">
188
                                            <div class="alert alert-warning" id="reserve_fee">
187
                                        [% IF Koha.Preference('HoldFeeMode') == 'any_time_is_collected' %]
189
                                                [% IF Koha.Preference('HoldFeeMode') == 'any_time_is_collected' %]
188
                                            <span>You will be charged a hold fee of [% bibitemloo.reserve_charge | $Price %] when you collect this item</span>
190
                                                    <span>You will be charged a hold fee of [% bibitemloo.reserve_charge | $Price %] when you collect this item</span>
189
                                        [% ELSE %]
191
                                                [% ELSE %]
190
                                            <span>You will be charged a hold fee of [% bibitemloo.reserve_charge | $Price %] for placing this hold</span>
192
                                                    <span>You will be charged a hold fee of [% bibitemloo.reserve_charge | $Price %] for placing this hold</span>
193
                                                [% END %]
194
                                            </div>
191
                                        [% END %]
195
                                        [% END %]
192
                                    </div>
193
                                [% END %]
194
196
195
                                <p>
197
                                        <legend id="holdbiblio_[% bibitemloo.biblionumber | html %]" class="holdbiblio">
196
                                    [% IF ( bibitemloo.holdable ) %]
198
                                            [% IF ( bibitemloo.holdable ) %]
197
                                        <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
199
                                                <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
198
                                        <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber | html %]"/>
200
                                                <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber | html %]"/>
199
                                        <span class="confirmjs_hold" title="[% bibitemloo.biblionumber | html %]" style="padding:.3em"></span>
200
                                        <span class="confirm_nonjs">
201
                                            <input type="radio" class="confirmbox checkitem [% bibitemloo.biblionumber | html %]" name="[% bibitemloo.biblionumber | html %]" checked="checked" id="single_[% bibitemloo.biblionumber | html %]" value="any" />
202
                                            <label class="confirm_label" for="single_[% bibitemloo.biblionumber | html %]">Place a hold on </label>
203
                                        </span>
204
                                    [% END # / bibitemloo.holdable %]
205
206
                                    [% INCLUDE 'biblio-title.inc' biblio=bibitemloo link=> 1%]
207
208
                                    [% IF ( bibitemloo.author ) %],  by [% bibitemloo.author | html %][% END %]
209
                                </p>
210
211
                                [% UNLESS ( bibitemloo.holdable ) %]
212
                                    [% IF ( bibitemloo.ageRestricted ) %]
213
                                        <div class="alert alert-warning">Sorry, you are too young to place a hold for this item.</div>
214
                                    [% END %]
215
                                    [% IF ( bibitemloo.already_reserved ) %]
216
                                        <div class="alert alert-warning">You have already requested this title.</div>
217
                                    [% ELSIF ( bibitemloo.recall ) %]
218
                                        <div class="alert alert-warning">You have already placed a recall on this title.</div>
219
                                    [% ELSE %]
220
                                        [% IF bibitemloo.alreadypossession %]
221
                                            <div class="alert alert-warning">This title cannot be requested because it's already in your possession.</div>
222
                                        [% ELSIF bibitemloo.tooManyReserves %]
223
                                            <div class="alert alert-warning">This title cannot be requested because you reached the maximum number of holds.</div>
224
                                        [% ELSIF bibitemloo.tooManyHoldsForThisRecord %]
225
                                            <div class="alert alert-warning">This title cannot be requested because you exceeded max holds per record.</div>
226
                                        [% ELSIF bibitemloo.tooManyReservesToday %]
227
                                            <div class="alert alert-warning">This title cannot be requested because you reached the daily hold limit.</div>
228
                                        [% ELSIF bibitemloo.itemAlreadyOnHold %]
229
                                            <div class="alert alert-warning">This title cannot be requested because you already have hold for this item.</div>
230
                                        [% ELSE %]
231
                                            [% UNLESS ( bibitemloo.bib_available ) %]
232
                                                <div class="alert">There are no items that can be placed on hold.</div>
233
                                            [% ELSE %]
234
                                                <div class="alert">This title cannot be requested.</div>
235
                                            [% END %]
236
                                        [% END # / UNLESS bibitemloo.already_patron_possession %]
237
                                    [% END # / IF bibitemloo.already_reserved %]
238
                                [% END # / UNLESS bibitemloo.holdable %]
239
240
                                [% IF ( bibitemloo.holdable ) %]
241
                                    <fieldset class="rows">
242
                                        <ul>
243
                                            <!-- HOLDABLE -->
244
                                            [% UNLESS ( item_level_itypes ) %]
245
                                                <li class="itype">
246
                                                    <span class="label">Item type: </span>
247
                                                    [% IF ( bibitemloo.imageurl ) %]<img class="itemtype-image" src="[% bibitemloo.imageurl | html %]" alt="" />[% END %]
248
                                                    <span class="itypetext">[% bibitemloo.translated_description | html %]</span>
249
                                                </li>
250
                                            [% END %]
251
201
252
                                            [% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %]
202
                                                [% IF ( multi_hold ) %]
253
                                            [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %]
203
                                                    <span class="confirmjs_hold" data-biblionumber="[% bibitemloo.biblionumber | html %]"></span>
254
                                                <li class="priority">
204
                                                [% ELSE %]
255
                                                    <span class="label">Your priority: </span>
205
                                                    <span class="confirmjs_hold" data-biblionumber="[% bibitemloo.biblionumber | html %]" style="display:none"></span>
256
                                                    [% bibitemloo.rank | html %]
206
                                                [% END %]
257
                                                </li>
258
                                            [% END %]
259
207
260
                                            [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %]
208
                                                <span class="confirm_nonjs">
261
                                                <li class="holds-count">
209
                                                    <input type="radio" class="confirmbox checkitem [% bibitemloo.biblionumber | html %]" name="[% bibitemloo.biblionumber | html %]" checked="checked" id="single_[% bibitemloo.biblionumber | html %]" value="any" />
262
                                                    <span class="label">Number of holds: </span>
210
                                                    <label class="confirm_label" for="single_[% bibitemloo.biblionumber | html %]">Place a hold on </label>
263
                                                    [% bibitemloo.reservecount | html %]
211
                                                </span>
264
                                                </li>
212
                                            [% END # / bibitemloo.holdable %]
265
                                            [% END %]
266
213
267
                                            [% UNLESS ( singleBranchMode ) %]
214
                                            <div>
268
                                                [% IF ( bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch')) %]
215
                                                [% INCLUDE 'biblio-title.inc' biblio=bibitemloo link=> 1%]
269
                                                    <li class="branch">
270
                                                        <label for="branch_[% bibitemloo.biblionumber | html %]">Pick up location:</label>
271
                                                        [% UNLESS ( bibitemloo.holdable ) %]
272
                                                            <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled">
273
                                                                [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
274
                                                            </select>
275
                                                        [% ELSE %]
276
                                                            [% SET at_least_one_library_not_available_for_pickup = 0 %]
277
                                                            <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]">
278
                                                                [% FOREACH library IN Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
279
                                                                    [% SET pickup_available_at = bibitemloo.not_available_at.grep('^' _ library.branchcode _ '$').size ? 0 : 1 %]
280
                                                                    [% IF library.selected AND pickup_available_at %]
281
                                                                        <option value="[% library.branchcode | html %]" selected="selected" >[% library.branchname | html %]</option>
282
                                                                    [% ELSIF pickup_available_at %]
283
                                                                        <option value="[% library.branchcode | html %]">[% library.branchname | html %]</option>
284
                                                                    [% ELSE %]
285
                                                                        [% SET at_least_one_library_not_available_for_pickup = 1 %]
286
                                                                        <option value="[% library.branchcode | html %]" disabled="disabled" title="At least one item is available at this library">[% library.branchname | html %]</option>
287
                                                                    [% END %]
288
                                                                [% END %]
289
                                                            </select>
290
                                                            [% IF at_least_one_library_not_available_for_pickup %]
291
                                                                <div class="at_least_one_library_not_available_note">Note: Library policy does not allow hold/pickup of an item available locally. Please come to the library to retrieve these items</div>
292
                                                            [% END %]
293
                                                        [% END # / UNLESS bibitemloo.holdable %]
294
                                                    </li>
295
                                                [% END # / IF bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch') %]
296
                                            [% END # / UNLESS singleBranchMode %]
297
                                        </ul>
298
299
                                        <a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a>
300
301
                                        <div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options">
302
303
                                            <ul>
304
                                                [% IF ( reserve_in_future ) %]
305
                                                    <li>
306
                                                        <label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label>
307
                                                        <input type="text" name="reserve_date_[% bibitemloo.biblionumber | html %]" id="from[% bibitemloo.biblionumber | html %]" data-start_for="to[% bibitemloo.biblionumber | html %]" data-flatpickr-futureinclusive="true" size="10" class="flatpickr holddatefrom" value="[% KohaDates.datetime_from_string | $KohaDates dateformat => 'iso' %]" />
308
                                                        <span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
309
                                                        <div class="required_label" style="display:none;">Required</div>
310
                                                    </li>
311
                                                [% END %]
312
216
313
                                                <li>
217
                                                [% IF ( bibitemloo.author ) %]by [% bibitemloo.author | html %][% END %]
314
                                                    <label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label>
218
                                            </div>
315
                                                    <input type="text" name="expiration_date_[% bibitemloo.biblionumber | html %]" id="to[% bibitemloo.biblionumber | html %]" size="10" data-flatpickr-future="true" class="flatpickr futuredate" />
219
                                        </legend>
316
                                                    <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
317
                                                    <div class="required_label" style="display:none;">Required</div>
318
                                                </li>
319
320
                                                [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
321
                                                    <li>
322
                                                        <label for="itemtype">Request specific item type:</label>
323
                                                        <select name="itemtype" id="itemtype">
324
                                                            <option value="">Any item type</option>
325
                                                            [% FOREACH i IN bibitemloo.allowed_item_types %]
326
                                                                <option value="[% i | html %]">[% ItemTypes.GetDescription( i ) | html %]</option>
327
                                                            [%- END %]
328
                                                        </select>
329
                                                    </li>
330
                                                [% END %]
331
220
332
                                                [% UNLESS bibitemloo.forced_hold_level && ( bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'record' ) %]
221
                                        [% UNLESS ( bibitemloo.holdable ) %]
333
                                                    [% IF Koha.Preference('EnableItemGroupHolds') && bibitemloo.object.item_groups.count %]
222
                                            [% IF ( bibitemloo.ageRestricted ) %]
334
                                                        <li>
223
                                                <div class="alert alert-warning">Sorry, you are too young to place a hold for this item.</div>
335
                                                            <label for="itemtype">Request specific item group:</label>
224
                                            [% END %]
336
                                                            <select name="item_group_id_[% bibitemloo.biblionumber | html %]" id="item_group_id_[% bibitemloo.biblionumber | html %]">
225
                                            [% IF ( bibitemloo.already_reserved ) %]
337
                                                                <option value="">Any item group</option>
226
                                                <div class="alert alert-warning">You have already requested this title.</div>
338
                                                                [% FOREACH g IN bibitemloo.object.item_groups.search({}, { order_by => ['display_order'] }) %]
227
                                            [% ELSIF ( bibitemloo.recall ) %]
339
                                                                    [% IF g.items.count %]
228
                                                <div class="alert alert-warning">You have already placed a recall on this title.</div>
340
                                                                        <option value="[% g.id | html %]">[% g.description | html %]</option>
229
                                            [% ELSE %]
341
                                                                    [% END %]
230
                                                [% IF bibitemloo.alreadypossession %]
342
                                                                [% END %]
231
                                                    <div class="alert alert-warning">This title cannot be requested because it's already in your possession.</div>
343
                                                            </select>
232
                                                [% ELSIF bibitemloo.tooManyReserves %]
233
                                                    <div class="alert alert-warning">This title cannot be requested because you reached the maximum number of holds.</div>
234
                                                [% ELSIF bibitemloo.tooManyHoldsForThisRecord %]
235
                                                    <div class="alert alert-warning">This title cannot be requested because you exceeded max holds per record.</div>
236
                                                [% ELSIF bibitemloo.tooManyReservesToday %]
237
                                                    <div class="alert alert-warning">This title cannot be requested because you reached the daily hold limit.</div>
238
                                                [% ELSIF bibitemloo.itemAlreadyOnHold %]
239
                                                    <div class="alert alert-warning">This title cannot be requested because you already have hold for this item.</div>
240
                                                [% ELSE %]
241
                                                    [% UNLESS ( bibitemloo.bib_available ) %]
242
                                                        <div class="alert alert-warning">There are no items that can be placed on hold.</div>
243
                                                    [% ELSE %]
244
                                                        <div class="alert alert-warning">This title cannot be requested.</div>
245
                                                    [% END %]
246
                                                [% END # / UNLESS bibitemloo.already_patron_possession %]
247
                                            [% END # / IF bibitemloo.already_reserved %]
248
                                        [% END # / UNLESS bibitemloo.holdable %]
249
250
                                        [% IF ( bibitemloo.holdable ) %]
251
                                            <fieldset id="holdcontrols_[% bibitemloo.biblionumber | html %]" class="holdcontrols rows">
252
                                                <ul>
253
                                                    <!-- HOLDABLE -->
254
                                                    [% UNLESS ( item_level_itypes ) %]
255
                                                        <li class="itype">
256
                                                            <span class="label">Item type: </span>
257
                                                            [% IF ( bibitemloo.imageurl ) %]<img class="itemtype-image" src="[% bibitemloo.imageurl | html %]" alt="" />[% END %]
258
                                                            <span class="itypetext">[% bibitemloo.translated_description | html %]</span>
344
                                                        </li>
259
                                                        </li>
345
                                                    [% END %]
260
                                                    [% END %]
346
                                                [% END %]
347
261
348
                                                [% IF ( OpacHoldNotes ) %]
262
                                                    [% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %]
349
                                                    <li>
263
                                                    [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %]
350
                                                        <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber | html %]">
264
                                                        <li class="priority">
351
                                                            <label for="holdnotes_[% bibitemloo.biblionumber | html %]">Hold notes:</label>
265
                                                            <span class="label">Your priority: </span>
352
                                                            <textarea id="holdnotes_[% bibitemloo.biblionumber | html %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber | html %]" >[% bibitemloo.holdnotes | html %]</textarea>
266
                                                            [% bibitemloo.rank | html %]
353
                                                        </div>
267
                                                        </li>
354
                                                    </li>
268
                                                    [% END %]
355
                                                [% END # / IF OpacHoldNotes %]
269
356
270
                                                    [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %]
357
                                                [% IF bibitemloo.itemholdable %]
271
                                                        <li class="holds-count">
358
                                                    <!-- ITEM HOLDS -->
272
                                                            <span class="label">Number of holds: </span>
359
                                                    <li class="lradio place_on_type" style="display:none;">
273
                                                            [% bibitemloo.reservecount | html %]
360
                                                        [% UNLESS bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'item_group' || bibitemloo.force_hold %]
274
                                                        </li>
361
                                                            <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label>
275
                                                    [% END %]
362
                                                            <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
276
363
                                                                    id="reqany_[% bibitemloo.biblionumber | html %]"
277
                                                    [% UNLESS ( singleBranchMode ) %]
364
                                                                    class="selectany"
278
                                                        [% IF ( bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch')) %]
365
                                                                    value="Any"
279
                                                            <li class="branch">
366
                                                                    checked="checked"
280
                                                                <label for="branch_[% bibitemloo.biblionumber | html %]">Pick up location:</label>
367
                                                            />
281
                                                                [% UNLESS ( bibitemloo.holdable ) %]
368
                                                        [% END %]
282
                                                                    <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled">
369
                                                        <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber | html %]">A specific item</label>
283
                                                                        [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
370
                                                        <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
284
                                                                    </select>
371
                                                               id="reqspecific_[% bibitemloo.biblionumber | html %]"
285
                                                                [% ELSE %]
372
                                                               class="selectspecific"
286
                                                                    [% SET at_least_one_library_not_available_for_pickup = 0 %]
373
                                                               value="Specific"
287
                                                                    <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]">
374
                                                        />
288
                                                                        [% FOREACH library IN Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %]
375
                                                    </li>
289
                                                                            [% SET pickup_available_at = bibitemloo.not_available_at.grep('^' _ library.branchcode _ '$').size ? 0 : 1 %]
376
                                                [% END # / IF bibitemloo.itemholdable %]
290
                                                                            [% IF library.selected AND pickup_available_at %]
377
                                            </ul>
291
                                                                                <option value="[% library.branchcode | html %]" selected="selected" >[% library.branchname | html %]</option>
378
292
                                                                            [% ELSIF pickup_available_at %]
379
                                            [% IF bibitemloo.itemholdable %]
293
                                                                                <option value="[% library.branchcode | html %]">[% library.branchname | html %]</option>
380
                                                <div id="copiesrow_[% bibitemloo.biblionumber | html %]" class="copiesrow">
294
                                                                            [% ELSE %]
381
                                                <table class="table table-bordered table-striped itemstable">
295
                                                                                [% SET at_least_one_library_not_available_for_pickup = 1 %]
382
                                                    <caption>Select a specific item:</caption>
296
                                                                                <option value="[% library.branchcode | html %]" disabled="disabled" title="At least one item is available at this library">[% library.branchname | html %]</option>
383
                                                    <thead>
297
                                                                            [% END %]
384
                                                        <tr>
298
                                                                        [% END %]
385
                                                        <th>Copy number</th>
299
                                                                    </select>
386
                                                        [% IF ( item_level_itypes ) %]
300
                                                                    [% IF at_least_one_library_not_available_for_pickup %]
387
                                                            <th>Item type</th>
301
                                                                        <div class="at_least_one_library_not_available_note">Note: Library policy does not allow hold/pickup of an item available locally. Please come to the library to retrieve these items</div>
388
                                                        [% END %]
302
                                                                    [% END %]
389
                                                        <th>Barcode</th>
303
                                                                [% END # / UNLESS bibitemloo.holdable %]
390
                                                        [% UNLESS ( singleBranchMode ) %]
304
                                                            </li>
391
                                                            <th>Home library</th>
305
                                                        [% END # / IF bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch') %]
392
                                                            <th>Last location</th>
306
                                                    [% END # / UNLESS singleBranchMode %]
393
                                                        [% END %]
307
                                                </ul>
394
                                                        [% IF ( itemdata_ccode ) %]
308
395
                                                            <th>Collection</th>
309
                                                <a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a>
310
311
                                                <div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options">
312
313
                                                    <ul>
314
                                                        [% IF ( reserve_in_future ) %]
315
                                                            <li>
316
                                                                <label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label>
317
                                                                <input type="text" name="reserve_date_[% bibitemloo.biblionumber | html %]" id="from[% bibitemloo.biblionumber | html %]" data-start_for="to[% bibitemloo.biblionumber | html %]" data-flatpickr-futureinclusive="true" size="10" class="flatpickr holddatefrom" value="[% KohaDates.datetime_from_string | $KohaDates dateformat => 'iso' %]" />
318
                                                                <span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
319
                                                                <div class="required_label" style="display:none;">Required</div>
320
                                                            </li>
396
                                                        [% END %]
321
                                                        [% END %]
397
                                                        <th>Call number</th>
322
398
                                                        [% IF ( itemdata_enumchron ) %]
323
                                                        <li>
399
                                                            <th>Vol info</th>
324
                                                            <label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label>
325
                                                            <input type="text" name="expiration_date_[% bibitemloo.biblionumber | html %]" id="to[% bibitemloo.biblionumber | html %]" size="10" data-flatpickr-future="true" class="flatpickr futuredate" />
326
                                                            <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span>
327
                                                            <div class="required_label" style="display:none;">Required</div>
328
                                                        </li>
329
330
                                                        [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
331
                                                            <li>
332
                                                                <label for="itemtype">Request specific item type:</label>
333
                                                                <select name="itemtype" id="itemtype">
334
                                                                    <option value="">Any item type</option>
335
                                                                    [% FOREACH i IN bibitemloo.allowed_item_types %]
336
                                                                        <option value="[% i | html %]">[% ItemTypes.GetDescription( i ) | html %]</option>
337
                                                                    [%- END %]
338
                                                                </select>
339
                                                            </li>
400
                                                        [% END %]
340
                                                        [% END %]
401
                                                        <th>Notes</th>
341
402
                                                        <th>Information</th>
342
                                                        [% UNLESS bibitemloo.forced_hold_level && ( bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'record' ) %]
403
                                                        </tr>
343
                                                            [% IF Koha.Preference('EnableItemGroupHolds') && bibitemloo.object.item_groups.count %]
404
                                                    </thead>
344
                                                                <li>
405
                                                    <tbody>
345
                                                                    <label for="itemtype">Request specific item group:</label>
406
346
                                                                    <select name="item_group_id_[% bibitemloo.biblionumber | html %]" id="item_group_id_[% bibitemloo.biblionumber | html %]">
407
                                                    [% SET unholdable_items = 0 %]
347
                                                                        <option value="">Any item group</option>
408
                                                    [% FOREACH itemLoo IN bibitemloo.itemLoop %]
348
                                                                        [% FOREACH g IN bibitemloo.object.item_groups.search({}, { order_by => ['display_order'] }) %]
409
                                                        [% IF ( itemLoo.available ) %]
349
                                                                            [% IF g.items.count %]
410
                                                            [% IF ( itemLoo.checkout ) %]
350
                                                                                <option value="[% g.id | html %]">[% g.description | html %]</option>
411
                                                                <tr class="holdable onloan">
351
                                                                            [% END %]
412
                                                            [% ELSE %]
352
                                                                        [% END %]
413
                                                                <tr class="holdable">
353
                                                                    </select>
414
                                                            [% END %]
354
                                                                </li>
415
                                                                    <td class="copynumber" data-order="[% itemLoo.copynumber | html %]">
416
                                                                        <input type="[% reserve_input_type | html %]" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" />
417
                                                        [% ELSE %]
418
                                                            [% SET unholdable_items = 1 %]
419
                                                            [% IF ( itemLoo.checkout ) %]
420
                                                                <tr class="unholdable onloan" style="display:none;">
421
                                                            [% ELSE %]
422
                                                                <tr class="unholdable" style="display:none;">
423
                                                            [% END %]
355
                                                            [% END %]
424
                                                                    <td class="copynumber">
425
                                                                        <input disabled="disabled" type="radio" aria-label="Cannot be put on hold" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber | html %]"
426
                                                                           style="display:none;" />
427
                                                                    <i class="fa fa-times danger" aria-hidden="true" title="Cannot be put on hold"></i>
428
                                                        [% END %]
356
                                                        [% END %]
429
                                                                [% IF ( itemLoo.copynumber ) %]
430
                                                                    [% itemLoo.copynumber | html %]
431
                                                                [% END %]
432
                                                            </td> [%# copynumber %]
433
357
434
                                                            [% IF ( item_level_itypes ) %]
358
                                                        [% IF ( OpacHoldNotes ) %]
435
                                                                <td class="itype">
359
                                                            <li>
436
                                                                    [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
360
                                                                <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber | html %]">
437
                                                                        [% IF ( itemLoo.imageurl ) %]
361
                                                                    <label for="holdnotes_[% bibitemloo.biblionumber | html %]">Hold notes:</label>
438
                                                                            <img class="itemtype-image" src="[% itemLoo.imageurl | html %]" alt="" />
362
                                                                    <textarea id="holdnotes_[% bibitemloo.biblionumber | html %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber | html %]" >[% bibitemloo.holdnotes | html %]</textarea>
363
                                                                </div>
364
                                                            </li>
365
                                                        [% END # / IF OpacHoldNotes %]
366
367
                                                        [% IF bibitemloo.itemholdable %]
368
                                                            <!-- ITEM HOLDS -->
369
                                                            <li class="lradio place_on_type" style="display:none;">
370
                                                                [% UNLESS bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'item_group' || bibitemloo.force_hold %]
371
                                                                    <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label>
372
                                                                    <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
373
                                                                            id="reqany_[% bibitemloo.biblionumber | html %]"
374
                                                                            class="selectany"
375
                                                                            value="Any"
376
                                                                            checked="checked"
377
                                                                    />
378
                                                                [% END %]
379
                                                                <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber | html %]">A specific item</label>
380
                                                                <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]"
381
                                                                    id="reqspecific_[% bibitemloo.biblionumber | html %]"
382
                                                                    class="selectspecific"
383
                                                                    value="Specific"
384
                                                                />
385
                                                            </li>
386
                                                        [% END # / IF bibitemloo.itemholdable %]
387
                                                    </ul>
388
389
                                                    [% IF bibitemloo.itemholdable %]
390
                                                        <div id="copiesrow_[% bibitemloo.biblionumber | html %]" class="copiesrow">
391
                                                        <table class="table table-bordered table-striped itemstable">
392
                                                            <caption>Select a specific item:</caption>
393
                                                            <thead>
394
                                                                <tr>
395
                                                                <th>Copy number</th>
396
                                                                [% IF ( item_level_itypes ) %]
397
                                                                    <th>Item type</th>
398
                                                                [% END %]
399
                                                                <th>Barcode</th>
400
                                                                [% UNLESS ( singleBranchMode ) %]
401
                                                                    <th>Home library</th>
402
                                                                    <th>Last location</th>
403
                                                                [% END %]
404
                                                                [% IF ( itemdata_ccode ) %]
405
                                                                    <th>Collection</th>
406
                                                                [% END %]
407
                                                                <th>Call number</th>
408
                                                                [% IF ( itemdata_enumchron ) %]
409
                                                                    <th>Vol info</th>
410
                                                                [% END %]
411
                                                                <th>Notes</th>
412
                                                                <th>Information</th>
413
                                                                </tr>
414
                                                            </thead>
415
                                                            <tbody>
416
417
                                                            [% SET unholdable_items = 0 %]
418
                                                            [% FOREACH itemLoo IN bibitemloo.itemLoop %]
419
                                                                [% IF ( itemLoo.available ) %]
420
                                                                    [% IF ( itemLoo.checkout ) %]
421
                                                                        <tr class="holdable onloan">
422
                                                                    [% ELSE %]
423
                                                                        <tr class="holdable">
424
                                                                    [% END %]
425
                                                                            <td class="copynumber" data-order="[% itemLoo.copynumber | html %]">
426
                                                                                <input type="[% reserve_input_type | html %]" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" />
427
                                                                [% ELSE %]
428
                                                                    [% SET unholdable_items = 1 %]
429
                                                                    [% IF ( itemLoo.checkout ) %]
430
                                                                        <tr class="unholdable onloan" style="display:none;">
431
                                                                    [% ELSE %]
432
                                                                        <tr class="unholdable" style="display:none;">
433
                                                                    [% END %]
434
                                                                            <td class="copynumber">
435
                                                                                <input disabled="disabled" type="radio" aria-label="Cannot be put on hold" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber | html %]"
436
                                                                                style="display:none;" />
437
                                                                            <i class="fa fa-times danger" aria-hidden="true"></i>
438
                                                                [% END %]
439
                                                                        [% IF ( itemLoo.copynumber ) %]
440
                                                                            [% itemLoo.copynumber | html %]
439
                                                                        [% END %]
441
                                                                        [% END %]
442
                                                                    </td> [%# copynumber %]
443
444
                                                                    [% IF ( item_level_itypes ) %]
445
                                                                        <td class="itype">
446
                                                                            [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
447
                                                                                [% IF ( itemLoo.imageurl ) %]
448
                                                                                    <img class="itemtype-image" src="[% itemLoo.imageurl | html %]" alt="" />
449
                                                                                [% END %]
450
                                                                            [% END %]
451
                                                                            <span class="itypetext">[% itemLoo.translated_description | html %]</span>
452
                                                                        </td>
440
                                                                    [% END %]
453
                                                                    [% END %]
441
                                                                    <span class="itypetext">[% itemLoo.translated_description | html %]</span>
442
                                                                </td>
443
                                                            [% END %]
444
454
445
                                                            <td class="barcode">[% itemLoo.barcode | html %]</td>
455
                                                                    <td class="barcode">[% itemLoo.barcode | html %]</td>
446
                                                            [% UNLESS ( singleBranchMode ) %]
456
                                                                    [% UNLESS ( singleBranchMode ) %]
447
                                                                <td class="homebranch">[% Branches.GetName( itemLoo.homebranch) | html %]</td>
457
                                                                        <td class="homebranch">[% Branches.GetName( itemLoo.homebranch) | html %]</td>
448
                                                                <td class="holdingbranch">[% Branches.GetName( itemLoo.holdingbranch ) | html %]</td>
458
                                                                        <td class="holdingbranch">[% Branches.GetName( itemLoo.holdingbranch ) | html %]</td>
449
                                                            [% END %]
459
                                                                    [% END %]
450
                                                            [% IF ( itemdata_ccode ) %]
460
                                                                    [% IF ( itemdata_ccode ) %]
451
                                                                <td class="ccode"> [% IF ( itemLoo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemLoo.ccode, opac => 1 ) | html %][% END %]</td>
461
                                                                        <td class="ccode"> [% IF ( itemLoo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemLoo.ccode, opac => 1 ) | html %][% END %]</td>
452
                                                            [% END %]
462
                                                                    [% END %]
453
                                                            <td class="call_no">[% itemLoo.itemcallnumber | html %]</td>
463
                                                                    <td class="call_no">[% itemLoo.itemcallnumber | html %]</td>
454
                                                            [% IF ( itemdata_enumchron ) %]
464
                                                                    [% IF ( itemdata_enumchron ) %]
455
                                                                <td class="vol_info">[% itemLoo.enumchron | html %]</td>
465
                                                                        <td class="vol_info">[% itemLoo.enumchron | html %]</td>
456
                                                            [% END %]
466
                                                                    [% END %]
457
                                                            <td class="itemnotes">
467
                                                                    <td class="itemnotes">
458
                                                                [% itemLoo.itemnotes | html %]
468
                                                                        [% itemLoo.itemnotes | html %]
459
                                                            </td>
469
                                                                    </td>
460
                                                            <td class="information">
470
                                                                    <td class="information">
461
                                                                [% IF ( itemLoo.checkout.date_due) %]
471
                                                                        [% IF ( itemLoo.checkout.date_due) %]
462
                                                                    <span class="checkedout">Due [% itemLoo.checkout.date_due| $KohaDates as_due_date => 1 %]</span>
472
                                                                            <span class="checkedout">Due [% itemLoo.checkout.date_due| $KohaDates as_due_date => 1 %]</span>
463
                                                                [% ELSIF ( itemLoo.transfertwhen ) %]
473
                                                                        [% ELSIF ( itemLoo.transfertwhen ) %]
464
                                                                    <span class="intransit">In transit from [% Branches.GetName( itemLoo.transfertfrom ) | html %] to [% Branches.GetName( itemLoo.transfertto ) | html %] since [% itemLoo.transfertwhen | $KohaDates %]</span>
474
                                                                            <span class="intransit">In transit from [% Branches.GetName( itemLoo.transfertfrom ) | html %] to [% Branches.GetName( itemLoo.transfertto ) | html %] since [% itemLoo.transfertwhen | $KohaDates %]</span>
465
                                                                [% END %]
475
                                                                        [% END %]
466
476
467
                                                                [% IF ( itemLoo.itemlost == 1 || itemLoo.itemlost == 2 ) %] [%# FIXME Why only for 1 or 2? Shouldn't we test for withdrawn as well? %]
477
                                                                        [% IF ( itemLoo.itemlost == 1 || itemLoo.itemlost == 2 ) %] [%# FIXME Why only for 1 or 2? Shouldn't we test for withdrawn as well? %]
468
                                                                    <span class="lost">Unavailable (lost or missing)</span>
478
                                                                            <span class="lost">Unavailable (lost or missing)</span>
469
                                                                [% END %]
479
                                                                        [% END %]
470
480
471
                                                                [% IF ( itemLoo.notforloan ) %]
481
                                                                        [% IF ( itemLoo.notforloan ) %]
472
                                                                    <span class="notforloan">Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemLoo.notforloan ) %])</span>
482
                                                                            <span class="notforloan">Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemLoo.notforloan ) %])</span>
473
                                                                [% END %]
483
                                                                        [% END %]
474
484
475
                                                                [% IF ( itemLoo.first_hold ) %]
485
                                                                        [% IF ( itemLoo.first_hold ) %]
476
                                                                    <span class="waiting">
486
                                                                            <span class="waiting">
477
                                                                        [% IF ( itemLoo.waitingdate ) %]
487
                                                                                [% IF ( itemLoo.waitingdate ) %]
478
                                                                            <span>Waiting for patron at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %] since [% itemLoo.waitingdate | $KohaDates %]</span>
488
                                                                                    <span>Waiting for patron at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %] since [% itemLoo.waitingdate | $KohaDates %]</span>
479
                                                                        [% ELSIF ( itemLoo.reservedate ) %]
489
                                                                                [% ELSIF ( itemLoo.reservedate ) %]
480
                                                                            <span>On hold for patron expected at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %] since [% itemLoo.reservedate | $KohaDates %]</span>
490
                                                                                    <span>On hold for patron expected at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %] since [% itemLoo.reservedate | $KohaDates %]</span>
491
                                                                                [% ELSE %]
492
                                                                                    <span>On hold for patron expected at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %]</span>
493
                                                                                [% END %]
494
                                                                            </span>
481
                                                                        [% ELSE %]
495
                                                                        [% ELSE %]
482
                                                                            <span>On hold for patron expected at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %]</span>
496
                                                                            <span class="notonhold">Not on hold</span>
483
                                                                        [% END %]
497
                                                                        [% END # / IF ( itemLoo.first_hold )%]
484
                                                                    </span>
498
                                                                    </td>
485
                                                                [% ELSE %]
499
                                                                </tr>
486
                                                                    <span class="notonhold">Not on hold</span>
500
                                                            [% END # / FOREACH itemLoo IN bibitemloo.itemLoop%]
487
                                                                [% END # / IF ( itemLoo.first_hold )%]
501
                                                            </tbody>
488
                                                            </td>
502
                                                        </table> <!-- / #copiesrow_[% bibitemloo.biblionumber | html %] -->
489
                                                        </tr>
503
                                                        [% IF unholdable_items %]
490
                                                    [% END # / FOREACH itemLoo IN bibitemloo.itemLoop%]
504
                                                        <button id="show_unholdable" class="btn btn-default toggle_unholdable unholdable">Show unholdable items</button>
491
                                                    </tbody>
505
                                                        <button id="hide_unholdable" class="btn btn-default toggle_unholdable unholdable" style="display:none;">Hide unholdable items</button>
492
                                                </table> <!-- / #copiesrow_[% bibitemloo.biblionumber | html %] -->
506
                                                        [% END %]
493
                                                [% IF unholdable_items %]
507
                                                        </div>
494
                                                <button id="show_unholdable" class="btn btn-primary toggle_unholdable unholdable">Show unholdable items</button>
508
                                                    [% END # / IF ( bibitemloo.itemholdable )%]
495
                                                <button id="hide_unholdable" class="btn btn-primary toggle_unholdable unholdable" style="display:none;">Hide unholdable items</button>
509
                                                </div> <!-- / #hold-options-[% bibitemloo.biblionumber | html %] -->
496
                                                [% END %]
510
                                            </fieldset>
497
                                                </div>
511
                                        [% END # / IF ( bibitemloo.holdable ) %]
498
                                            [% END # / IF ( bibitemloo.itemholdable )%]
512
                                    </fieldset> <!-- / .holdrow -->
499
                                        </div> <!-- / #hold-options-[% bibitemloo.biblionumber | html %] -->
513
                                [% END # / FOREACH bibitemloo IN bibitemloop %]
500
                                    </fieldset>
514
                            </div><!-- #bigloop -->
501
                                [% END # / IF ( bibitemloo.holdable ) %]
515
502
                            </div> <!-- / .holdrow -->
516
                            [% UNLESS ( none_available ) %]
503
                        [% END # / FOREACH bibitemloo IN bibitemloop %]
517
                                <input type="submit" value="Confirm hold" class="btn btn-primary placehold" />
504
                    </div><!-- #bigloop -->
518
                            [% END %]
505
519
506
                    [% UNLESS ( none_available ) %]
520
                        </form>
507
                        <input type="submit" value="Confirm hold" class="btn btn-primary placehold" />
521
                    [% END # / UNLESS message %]
508
                    [% END %]
522
                </div>
509
523
            </div> <!-- / .row -->
510
                </form>
511
            [% END # / UNLESS message %]
512
        </div> <!-- / #holds -->
524
        </div> <!-- / #holds -->
513
    </div> <!-- / .container -->
525
    </div> <!-- / .container -->
514
</div> <!-- / .main -->
526
</div> <!-- / .main -->
Lines 582-597 Link Here
582
        // Replace non-JS single-selection with multi-selection capability.
594
        // Replace non-JS single-selection with multi-selection capability.
583
        $(".reserve_mode").val("multi");
595
        $(".reserve_mode").val("multi");
584
        $(".confirm_nonjs").remove();
596
        $(".confirm_nonjs").remove();
597
585
        $(".confirmjs_hold").each(function(){
598
        $(".confirmjs_hold").each(function(){
586
            var bib = $(this).attr("title");
599
            var bib = $(this).data("biblionumber");
587
            var html = "<label><input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
600
            var html = "<label><input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
588
            html += "value=\"" + bib + "\" id=\"" + bib + "\" /> " + _("Place a hold on") + " </label> ";
601
            html += "value=\"" + bib + "\" id=\"" + bib + "\" /><span class=\"sr-only\">" + _("Select to place a hold on: ") + "</span></label> ";
589
            $(this).html(html);
590
        });
591
        $(".confirmjs_nohold").each(function(){
592
            var bib = $(this).attr("title");
593
            var html = "<label><input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
594
            html += "value=\"" + bib + "\" id=\"" + bib + "\" />" + _("Place a hold on: ") + "</label>";
595
            $(this).html(html);
602
            $(this).html(html);
596
        });
603
        });
597
604
Lines 622-638 Link Here
622
629
623
630
624
        // On confirmsjs change
631
        // On confirmsjs change
625
        $(".confirmjs").change(function(){
632
        $(".confirmjs").on("change", function(){
626
            var id = suffixOf($(this).attr("id"), "_");
633
            var id = suffixOf($(this).attr("id"), "_");
627
            // If I m checked, I enable radio buttons
634
            // If I m checked, I enable radio buttons
628
            if ( $(this).is(":checked") ) {
635
            if ( $(this).is(":checked") ) {
629
                $("#reqspecific_" + id).attr("disabled", false);
636
                $("#holdrow_" + id ).attr("disabled", false).removeClass("disabled");
630
                $("#reqany_" + id).attr("disabled", false);
631
            }
637
            }
632
            // Else its are disabled
638
            // Else its are disabled
633
            else {
639
            else {
634
                $("#reqspecific_" + id).attr("disabled", "disabled");
640
                $("#holdrow_" + id ).attr("disabled", "disabled").addClass("disabled");
635
                $("#reqany_" + id).attr("disabled", "disabled");
641
                if( $("#hold-options-" + id ).is(":visible") ){
642
                    $("#toggle-hold-options-" + id ).click();
643
                }
636
            }
644
            }
637
            // expand or collaspe the items block
645
            // expand or collaspe the items block
638
            toggle_copiesrow(id);
646
            toggle_copiesrow(id);
639
- 

Return to bug 38635