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>
32 [% WRAPPER breadcrumb_item %]
33 <a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a>
35 [% IF op == 'cud-create' %]
36 [% WRAPPER breadcrumb_item bc_active= 1 %]
37 <span>New interlibrary loan request</span>
39 [% ELSIF op == 'view' %]
40 [% WRAPPER breadcrumb_item bc_active= 1 %]
41 <span>View interlibrary loan request</span>
43 [% ELSIF op == '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 op == 'cud-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="get" id="illrequestcreate-form" novalidate="novalidate">
93 <legend class="sr-only">Backends</legend>
94 <fieldset class="rows">
95 <label for="backend">Provider:</label>
96 <select name="backend">
97 [% FOREACH backend IN backends %]
98 <option value="[% backend | html %]">[% backend | html %]</option>
102 <fieldset class="action">
103 <input type="hidden" name="op" value="add_form" />
104 <input type="submit" class="btn btn-sm btn-primary" value="Next" />
108 [% PROCESS $whole.opac_template %]
110 [% END # /IF stage == 'copyrightclearance' %]
111 [% ELSIF op == 'list' %]
112 <h1>Interlibrary loan requests</h1>
113 [% INCLUDE messages %]
115 [% IF can_place_ill_in_opac %]
116 <div id="illrequests-create-button" class="dropdown btn-group">
117 [% IF backends.size > 1 %]
118 <button class="btn btn-primary dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
119 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request <span class="caret"></span>
121 <div id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
122 [% FOREACH backend IN backends %]
123 <a class="dropdown-item" href="/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=[% backend | uri %]">[% backend | html %]</a>
127 <a id="ill-new" class="btn btn-primary" href="/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=[% backends.0 | html %]">
128 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request
134 <table id="illrequestlist" class="table table-bordered table-striped">
135 <caption class="sr-only">Requests</caption>
141 <th>Requested from</th>
142 <th>Request type</th>
144 <th>Request placed</th>
145 <th>Last updated</th>
150 [% FOREACH request IN requests %]
151 [% status = request.status | html %]
152 [% type = request.get_type %]
154 <td>[% request.id | html %]</td>
156 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
159 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
161 <td>[% request.backend | html %]</td>
163 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
165 <td>[% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]</td>
166 <td data-order="[% request.placed | html %]">[% request.placed | $KohaDates %]</td>
167 <td data-order="[% request.updated | html %]">[% request.updated | $KohaDates %]</td>
169 <a href="/cgi-bin/koha/opac-illrequests.pl?op=view&illrequest_id=[% request.id | uri %]" class="btn btn-primary btn-sm pull-right">View</a>
175 [% ELSIF op == 'view' %]
176 <h1>View interlibrary loan request</h1>
177 [% INCLUDE messages %]
178 [% status = request.status %]
179 <form method="post" action="?op=update" id="illrequestupdate-form" novalidate="novalidate">
180 [% INCLUDE 'csrf-token.inc' %]
181 <fieldset class="rows">
182 <legend id="library_legend">Details from library</legend>
184 [% type = request.get_type %]
186 <label for="request_id">Request ID:</label>
187 [% request.id | html %]
190 <label for="backend">Requested from:</label>
191 [% request.backend | html %]
193 [% IF request.biblio_id %]
195 <label for="biblio">Requested item:</label>
196 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">View the requested item</a>
200 <label for="branchcode">Collection library:</label>
201 [% Branches.GetName(request.branchcode) | html %]
204 <label for="status">Status:</label>
205 [% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]
208 <label for="medium">Request type:</label>
209 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
212 <label for="placed">Request placed:</label>
213 [% request.placed | $KohaDates %]
216 <label for="updated">Last updated:</label>
217 [% request.updated | $KohaDates %]
220 <label for="notesopac">Notes:</label>
221 [% IF !request.completed %]
222 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
224 [% request.notesopac | html %]
229 <div id="ill-supplier-metadata" class="rows">
230 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
231 [% FOREACH meta IN request.metadata %]
232 <div class="requestattr-[% meta.key | replace(' ', '_') | html %]">
233 <span class="label">[% meta.key | html %]:</span>
234 <span class="value">[% IF meta.value %][% meta.value | html %][% ELSE %]N/A[% END %]</span>
238 [% IF can_place_ill_in_opac %]
239 <fieldset class="action illrequest-actions">
240 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
241 <input type="hidden" name="op" value="update" />
242 [% IF !request.completed %]
243 [% IF request.status == "NEW" %]
244 <a class="cancel-illrequest btn btn-danger" href="/cgi-bin/koha/opac-illrequests.pl?op=cancreq&illrequest_id=[% request.illrequest_id | html %]">Request cancellation</a>
246 <input type="submit" class="update-illrequest btn btn-primary" value="Submit modifications" />
248 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
252 [% ELSIF op == 'availability' %]
253 <h1>Interlibrary loan item availability</h1>
255 <form method="POST" action="/cgi-bin/koha/opac-illrequests.pl">
256 [% INCLUDE 'csrf-token.inc' %]
257 <legend><h2>Displaying availability results</h2></legend>
258 [% FOREACH key IN whole.keys %]
259 [% value = whole.$key %]
260 [% IF key != 'custom_key' && key != 'custom_value' %]
261 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
264 [% custom_keys = whole.custom_key.split('\0') %]
265 [% custom_values = whole.custom_value.split('\0') %]
267 [% FOREACH custom_key IN custom_keys %]
268 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
269 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
272 <input type="hidden" name="checked_availability" value="1">
273 <div id="continue-request-row" class="alert">
274 If you can't find what you are looking for, you can
275 <button class="button" class="btn btn-primary" type="submit">continue creating your request</button> or
276 <a href="/cgi-bin/koha/opac-illrequests.pl">cancel your request</a>
279 [% FOR service IN services %]
280 <h3 class="ill_availability_sourcename">[% service.name | html %]</h3>
281 [% INCLUDE 'ill-availability-table.inc' service=service %]
283 </div> <!-- /#illrequestupdate-form -->
284 [% ELSIF op == 'typedisclaimer' %]
285 <h1>ILL request disclaimer</h1>
286 <div id="results" class="page-section">
287 [% INCLUDE messages %]
288 <form method="post" id="typedisclaimer-form">
289 [% INCLUDE 'csrf-token.inc' %]
290 <fieldset class="rows">
291 [% disclaimer.text | $raw %]
292 [% SET disc_av_category_code = AuthorisedValues.GetAuthValueDropbox(disclaimer.av_cat) %]
293 [% IF disc_av_category_code.count %]
295 <select name="type_disclaimer_value">
296 [% FOR av_option IN disc_av_category_code %]
297 <option value="[% av_option.lib_opac | html %]">[% av_option.lib_opac | html %]</option>
302 <fieldset class="action">
303 [% FOREACH key IN whole.keys %]
304 [% value = whole.$key %]
305 [% IF key != 'custom_key' && key != 'custom_value' %]
306 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
309 [% custom_keys = whole.custom_key.split('\0') %]
310 [% custom_values = whole.custom_value.split('\0') %]
312 [% FOREACH custom_key IN custom_keys %]
313 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
314 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
317 <input type="hidden" name="type_disclaimer_submitted" value="1">
318 <input type="submit" class="btn btn-primary" value="Submit" />
319 <a class="action" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a>
323 [% END # / IF op == 'cud-create' %]
324 </div> <!-- / #illrequests -->
325 [% END # /IF !backends_available %]
326 </div> <!-- / .col-lg-10/12 -->
327 </div> <!-- / .row -->
328 </div> <!-- / .container-fluid -->
329 </div> <!-- / .main -->
331 [% INCLUDE 'opac-bottom.inc' %]
333 [% BLOCK jsinclude %]
334 [% INCLUDE 'datatables.inc' %]
336 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
338 { "targets": [ -1 ], "sortable": false, "searchable": false }
340 "order": [[ 3, "desc" ]],
343 $("#backend-dropdown-options").removeClass("nojs");
344 [% IF services_json.length > 0 %]
345 var services = [% services_json | $raw %];
349 [% IF metadata.length > 0 %]
350 var metadata = "[% metadata | $raw %]";
353 [% IF op == 'availability' %]
354 [% Asset.js("js/ill-availability.js") | $raw %]
356 $(document).ready(function() {
362 [% PROCESS backend_jsinclude %]