4 [% USE AuthorisedValues %]
6 [% USE AdditionalContents %]
7 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
8 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Your interlibrary loan requests › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% BLOCK cssinclude %][% END %]
14 [% INCLUDE 'bodytag.inc' bodyid='opac-illrequests' bodyclass='scrollto' %]
16 [% IF message == "1" %]
17 <div class="alert alert-success" role="alert">Request updated</div>
18 [% ELSIF message == "2" %]
19 <div class="alert alert-success" role="alert">Request placed</div>
22 [% INCLUDE 'masthead.inc' %]
24 [% WRAPPER breadcrumbs %]
25 [% IF ( logged_in_user ) %]
26 [% WRAPPER breadcrumb_item %]
27 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
31 [% IF method != 'list' %]
32 [% WRAPPER breadcrumb_item %]
33 <a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a>
35 [% IF method == 'create' %]
36 [% WRAPPER breadcrumb_item bc_active= 1 %]
37 <span>New interlibrary loan request</span>
39 [% ELSIF method == 'view' %]
40 [% WRAPPER breadcrumb_item bc_active= 1 %]
41 <span>View interlibrary loan request</span>
43 [% ELSIF method == 'typedisclaimer' %]
44 [% WRAPPER breadcrumb_item bc_active= 1 %]
45 <span>Ill request disclaimer</span>
49 [% WRAPPER breadcrumb_item bc_active= 1 %]
50 <a href="#" aria-current="page">Interlibrary loan requests</a>
53 [% END #/ WRAPPER breadcrumbs %]
55 <div class="container-fluid">
57 [% IF ( OpacNav||loggedinusername ) && !print %]
58 <div class="col-lg-2">
60 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
65 [% IF ( OpacNav||loggedinusername ) %]
66 <div class="col-lg-10 order-first order-md-first order-lg-2">
68 <div class="col order-first order-md-first order-lg-2">
71 [% IF !backends_available %]
72 <div class="alert alert-warning">ILL module configuration problem. Contact your administrator.</div>
74 <div id="illrequests" class="maincontent">
75 [% IF method == 'create' %]
76 <h1>New interlibrary loan request</h1>
77 [% IF stage == 'copyrightclearance' %]
78 [% INCLUDE messages %]
81 [% Koha.Preference('ILLModuleCopyrightClearance') | $raw %]
83 [% USE link_url = url('/cgi-bin/koha/opac-illrequests.pl', whole.value.other) %]
84 <a href="[% link_url _ '&stage=copyrightclearance' | $raw %]"
85 class="btn btn-sm btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Yes</a>
86 <a href="/cgi-bin/koha/opac-illrequests.pl"
87 class="btn btn-sm btn-danger"><i class="fa fa-times" aria-hidden="true"></i> No</a>
90 [% INCLUDE messages %]
92 <form method="post" id="illrequestcreate-form" novalidate="novalidate">
93 [% INCLUDE 'csrf-token.inc' %]
94 <legend class="sr-only">Backends</legend>
95 <fieldset class="rows">
96 <label for="backend">Provider:</label>
97 <select name="backend">
98 [% FOREACH backend IN backends %]
99 <option value="[% backend | html %]">[% backend | html %]</option>
103 <fieldset class="action">
104 <input type="hidden" name="method" value="create" />
105 <input type="submit" name="create_select_backend" value="Next" />
109 [% PROCESS $whole.opac_template %]
111 [% END # /IF stage == 'copyrightclearance' %]
112 [% ELSIF method == 'list' %]
113 <h1>Interlibrary loan requests</h1>
114 [% INCLUDE messages %]
116 [% IF can_place_ill_in_opac %]
117 <div id="illrequests-create-button" class="dropdown btn-group">
118 [% IF backends.size > 1 %]
119 <button class="btn btn-primary dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
120 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request <span class="caret"></span>
122 <div id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
123 [% FOREACH backend IN backends %]
124 <a class="dropdown-item" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend | uri %]">[% backend | html %]</a>
128 <a id="ill-new" class="btn btn-primary" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 | html %]">
129 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request
135 <table id="illrequestlist" class="table table-bordered table-striped">
136 <caption class="sr-only">Requests</caption>
142 <th>Requested from</th>
143 <th>Request type</th>
145 <th>Request placed</th>
146 <th>Last updated</th>
151 [% FOREACH request IN requests %]
152 [% status = request.status | html %]
153 [% type = request.get_type %]
155 <td>[% request.id | html %]</td>
157 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
160 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
162 <td>[% request.backend | html %]</td>
164 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
166 <td>[% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]</td>
167 <td data-order="[% request.placed | html %]">[% request.placed | $KohaDates %]</td>
168 <td data-order="[% request.updated | html %]">[% request.updated | $KohaDates %]</td>
170 <a href="/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=[% request.id | uri %]" class="btn btn-primary btn-sm pull-right">View</a>
176 [% ELSIF method == 'view' %]
177 <h1>View interlibrary loan request</h1>
178 [% INCLUDE messages %]
179 [% status = request.status %]
180 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
181 [% INCLUDE 'csrf-token.inc' %]
182 <fieldset class="rows">
183 <legend id="library_legend">Details from library</legend>
185 [% type = request.get_type %]
187 <label for="request_id">Request ID:</label>
188 [% request.id | html %]
191 <label for="backend">Requested from:</label>
192 [% request.backend | html %]
194 [% IF request.biblio_id %]
196 <label for="biblio">Requested item:</label>
197 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">View the requested item</a>
201 <label for="branchcode">Collection library:</label>
202 [% Branches.GetName(request.branchcode) | html %]
205 <label for="status">Status:</label>
206 [% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]
209 <label for="medium">Request type:</label>
210 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
213 <label for="placed">Request placed:</label>
214 [% request.placed | $KohaDates %]
217 <label for="updated">Last updated:</label>
218 [% request.updated | $KohaDates %]
221 <label for="notesopac">Notes:</label>
222 [% IF !request.completed %]
223 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
225 [% request.notesopac | html %]
230 <div id="ill-supplier-metadata" class="rows">
231 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
232 [% FOREACH meta IN request.metadata %]
233 <div class="requestattr-[% meta.key | replace(' ', '_') | html %]">
234 <span class="label">[% meta.key | html %]:</span>
235 <span class="value">[% IF meta.value %][% meta.value | html %][% ELSE %]N/A[% END %]</span>
239 [% IF can_place_ill_in_opac %]
240 <fieldset class="action illrequest-actions">
241 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
242 <input type="hidden" name="method" value="update" />
243 [% IF !request.completed %]
244 [% IF request.status == "NEW" %]
245 <a class="cancel-illrequest btn btn-danger" href="/cgi-bin/koha/opac-illrequests.pl?method=cancreq&illrequest_id=[% request.illrequest_id | html %]">Request cancellation</a>
247 <input type="submit" class="update-illrequest btn btn-primary" value="Submit modifications" />
249 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
253 [% ELSIF method == 'availability' %]
254 <h1>Interlibrary loan item availability</h1>
256 <form method="POST" action="/cgi-bin/koha/opac-illrequests.pl">
257 [% INCLUDE 'csrf-token.inc' %]
258 <legend><h2>Displaying availability results</h2></legend>
259 [% FOREACH key IN whole.keys %]
260 [% value = whole.$key %]
261 [% IF key != 'custom_key' && key != 'custom_value' %]
262 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
265 [% custom_keys = whole.custom_key.split('\0') %]
266 [% custom_values = whole.custom_value.split('\0') %]
268 [% FOREACH custom_key IN custom_keys %]
269 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
270 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
273 <input type="hidden" name="checked_availability" value="1">
274 <div id="continue-request-row" class="alert">
275 If you can't find what you are looking for, you can
276 <button class="button" class="btn btn-primary" type="submit">continue creating your request</button> or
277 <a href="/cgi-bin/koha/opac-illrequests.pl">cancel your request</a>
280 [% FOR service IN services %]
281 <h3 class="ill_availability_sourcename">[% service.name | html %]</h3>
282 [% INCLUDE 'ill-availability-table.inc' service=service %]
284 </div> <!-- /#illrequestupdate-form -->
285 [% ELSIF method == 'typedisclaimer' %]
286 <h1>ILL request disclaimer</h1>
287 <div id="results" class="page-section">
288 [% INCLUDE messages %]
289 <form method="post" id="typedisclaimer-form">
290 [% INCLUDE 'csrf-token.inc' %]
291 <fieldset class="rows">
292 [% disclaimer.text | $raw %]
293 [% SET disc_av_category_code = AuthorisedValues.GetAuthValueDropbox(disclaimer.av_cat) %]
294 [% IF disc_av_category_code.count %]
296 <select name="type_disclaimer_value">
297 [% FOR av_option IN disc_av_category_code %]
298 <option value="[% av_option.lib_opac | html %]">[% av_option.lib_opac | html %]</option>
303 <fieldset class="action">
304 [% FOREACH key IN whole.keys %]
305 [% value = whole.$key %]
306 [% IF key != 'custom_key' && key != 'custom_value' %]
307 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
310 [% custom_keys = whole.custom_key.split('\0') %]
311 [% custom_values = whole.custom_value.split('\0') %]
313 [% FOREACH custom_key IN custom_keys %]
314 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
315 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
318 <input type="hidden" name="type_disclaimer_submitted" value="1">
319 <input type="submit" class="btn btn-primary" value="Submit" />
320 <a class="action" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a>
324 [% END # / IF method == 'create' %]
325 </div> <!-- / #illrequests -->
326 [% END # /IF !backends_available %]
327 </div> <!-- / .col-lg-10/12 -->
328 </div> <!-- / .row -->
329 </div> <!-- / .container-fluid -->
330 </div> <!-- / .main -->
332 [% INCLUDE 'opac-bottom.inc' %]
334 [% BLOCK jsinclude %]
335 [% INCLUDE 'datatables.inc' %]
337 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
339 { "targets": [ -1 ], "sortable": false, "searchable": false }
341 "order": [[ 3, "desc" ]],
344 $("#backend-dropdown-options").removeClass("nojs");
345 [% IF services_json.length > 0 %]
346 var services = [% services_json | $raw %];
350 [% IF metadata.length > 0 %]
351 var metadata = "[% metadata | $raw %]";
354 [% IF method == 'availability' %]
355 [% Asset.js("js/ill-availability.js") | $raw %]
357 $(document).ready(function() {
363 [% PROCESS backend_jsinclude %]