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 <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="method" value="create" />
104 <input type="submit" name="create_select_backend" value="Next" />
108 [% PROCESS $whole.opac_template %]
110 [% END # /IF stage == 'copyrightclearance' %]
111 [% ELSIF method == 'list' %]
112 <h1>Interlibrary loan requests</h1>
113 [% INCLUDE messages %]
115 <div id="illrequests-create-button" class="dropdown btn-group">
116 [% IF backends.size > 1 %]
117 <button class="btn btn-primary dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
118 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request <span class="caret"></span>
120 <div id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
121 [% FOREACH backend IN backends %]
122 <a class="dropdown-item" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend | uri %]">[% backend | html %]</a>
126 <a id="ill-new" class="btn btn-primary" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 | html %]">
127 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request
132 <table id="illrequestlist" class="table table-bordered table-striped">
133 <caption class="sr-only">Requests</caption>
139 <th>Requested from</th>
140 <th>Request type</th>
142 <th>Request placed</th>
143 <th>Last updated</th>
148 [% FOREACH request IN requests %]
149 [% status = request.status | html %]
150 [% type = request.get_type %]
152 <td>[% request.id | html %]</td>
154 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
157 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
159 <td>[% request.backend | html %]</td>
161 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
163 <td>[% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]</td>
164 <td data-order="[% request.placed | html %]">[% request.placed | $KohaDates %]</td>
165 <td data-order="[% request.updated | html %]">[% request.updated | $KohaDates %]</td>
167 <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>
173 [% ELSIF method == 'view' %]
174 <h1>View interlibrary loan request</h1>
175 [% INCLUDE messages %]
176 [% status = request.status %]
177 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
178 <fieldset class="rows">
179 <legend id="library_legend">Details from library</legend>
181 [% type = request.get_type %]
183 <label for="request_id">Request ID:</label>
184 [% request.id | html %]
187 <label for="backend">Requested from:</label>
188 [% request.backend | html %]
190 [% IF request.biblio_id %]
192 <label for="biblio">Requested item:</label>
193 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">View the requested item</a>
197 <label for="branchcode">Collection library:</label>
198 [% Branches.GetName(request.branchcode) | html %]
201 <label for="status">Status:</label>
202 [% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]
205 <label for="medium">Request type:</label>
206 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
209 <label for="placed">Request placed:</label>
210 [% request.placed | $KohaDates %]
213 <label for="updated">Last updated:</label>
214 [% request.updated | $KohaDates %]
217 <label for="notesopac">Notes:</label>
218 [% IF !request.completed %]
219 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
221 [% request.notesopac | html %]
226 <div id="ill-supplier-metadata" class="rows">
227 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
228 [% FOREACH meta IN request.metadata %]
229 <div class="requestattr-[% meta.key | replace(' ', '_') | html %]">
230 <span class="label">[% meta.key | html %]:</span>
231 <span class="value">[% IF meta.value %][% meta.value | html %][% ELSE %]N/A[% END %]</span>
235 <fieldset class="action illrequest-actions">
236 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
237 <input type="hidden" name="method" value="update" />
238 [% IF !request.completed %]
239 [% IF request.status == "NEW" %]
240 <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>
242 <input type="submit" class="update-illrequest btn btn-primary" value="Submit modifications" />
244 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
247 [% ELSIF method == 'availability' %]
248 <h1>Interlibrary loan item availability</h1>
250 <form method="POST" action="/cgi-bin/koha/opac-illrequests.pl">
251 <legend><h2>Displaying availability results</h2></legend>
252 [% FOREACH key IN whole.keys %]
253 [% value = whole.$key %]
254 [% IF key != 'custom_key' && key != 'custom_value' %]
255 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
258 [% custom_keys = whole.custom_key.split('\0') %]
259 [% custom_values = whole.custom_value.split('\0') %]
261 [% FOREACH custom_key IN custom_keys %]
262 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
263 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
266 <input type="hidden" name="checked_availability" value="1">
267 <div id="continue-request-row" class="alert">
268 If you can't find what you are looking for, you can
269 <button class="button" class="btn btn-primary" type="submit">continue creating your request</button> or
270 <a href="/cgi-bin/koha/opac-illrequests.pl">cancel your request</a>
273 [% FOR service IN services %]
274 <h3 class="ill_availability_sourcename">[% service.name | html %]</h3>
275 [% INCLUDE 'ill-availability-table.inc' service=service %]
277 </div> <!-- /#illrequestupdate-form -->
278 [% ELSIF method == 'typedisclaimer' %]
279 <h1>ILL request disclaimer</h1>
280 <div id="results" class="page-section">
281 [% INCLUDE messages %]
282 <form method="post" id="typedisclaimer-form">
283 <fieldset class="rows">
284 [% disclaimer.text | $raw %]
285 [% SET disc_av_category_code = AuthorisedValues.GetAuthValueDropbox(disclaimer.av_cat) %]
286 [% IF disc_av_category_code.count %]
288 <select name="type_disclaimer_value">
289 [% FOR av_option IN disc_av_category_code %]
290 <option value="[% av_option.lib_opac | html %]">[% av_option.lib_opac | html %]</option>
295 <fieldset class="action">
296 [% FOREACH key IN whole.keys %]
297 [% value = whole.$key %]
298 [% IF key != 'custom_key' && key != 'custom_value' %]
299 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
302 [% custom_keys = whole.custom_key.split('\0') %]
303 [% custom_values = whole.custom_value.split('\0') %]
305 [% FOREACH custom_key IN custom_keys %]
306 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
307 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
310 <input type="hidden" name="type_disclaimer_submitted" value="1">
311 <input type="submit" class="btn btn-primary" value="Submit" />
312 <a class="action" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a>
316 [% END # / IF method == 'create' %]
317 </div> <!-- / #illrequests -->
318 [% END # /IF !backends_available %]
319 </div> <!-- / .col-lg-10/12 -->
320 </div> <!-- / .row -->
321 </div> <!-- / .container-fluid -->
322 </div> <!-- / .main -->
324 [% INCLUDE 'opac-bottom.inc' %]
326 [% BLOCK jsinclude %]
327 [% INCLUDE 'datatables.inc' %]
329 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
331 { "targets": [ -1 ], "sortable": false, "searchable": false }
333 "order": [[ 3, "desc" ]],
336 $("#backend-dropdown-options").removeClass("nojs");
337 [% IF services_json.length > 0 %]
338 var services = [% services_json | $raw %];
342 [% IF metadata.length > 0 %]
343 var metadata = "[% metadata | $raw %]";
346 [% IF method == 'availability' %]
347 [% Asset.js("js/ill-availability.js") | $raw %]
349 $(document).ready(function() {
355 [% PROCESS backend_jsinclude %]