5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Your interlibrary loan requests › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
10 [% INCLUDE 'bodytag.inc' bodyid='opac-illrequests' bodyclass='scrollto' %]
12 [% IF message == "1" %]
13 <div class="alert alert-success" role="alert">Request updated</div>
14 [% ELSIF message == "2" %]
15 <div class="alert alert-success" role="alert">Request placed</div>
18 [% INCLUDE 'masthead.inc' %]
20 <nav aria-label="breadcrumb">
21 <ul class="breadcrumb">
22 <li class="breadcrumb-item">
23 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
25 [% IF ( logged_in_user ) %]
26 <li class="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 <li class="breadcrumb-item" aria-current="page">
33 <a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a>
35 [% IF method == 'create' %]
36 <li class="breadcrumb-item" aria-current="page">
37 New interlibrary loan request
39 [% ELSIF method == 'view' %]
40 <li class="breadcrumb-item" aria-current="page">
41 View interlibrary loan request
45 <li class="breadcrumb-item" aria-current="page">
46 Interlibrary loan requests
49 </ul> <!-- / .breadcrumb -->
52 <div class="container-fluid">
54 [% IF ( OpacNav||loggedinusername ) && !print %]
55 <div class="col-lg-2">
57 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
62 [% IF ( OpacNav||loggedinusername ) %]
63 <div class="col-lg-10 order-first order-md-first order-lg-2">
65 <div class="col order-first order-md-first order-lg-2">
68 [% IF !backends_available %]
69 <div class="alert alert-warning">ILL module configuration problem. Contact your administrator.</div>
71 <div id="illrequests" class="maincontent">
72 [% IF method == 'create' %]
73 <h2>New interlibrary loan request</h2>
74 [% IF stage == 'copyrightclearance' %]
75 [% INCLUDE messages %]
78 [% Koha.Preference('ILLModuleCopyrightClearance') | $raw %]
80 [% USE link_url = url('/cgi-bin/koha/opac-illrequests.pl', whole.value.other) %]
81 <a href="[% link_url _ '&stage=copyrightclearance' | $raw %]"
82 class="btn btn-sm btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Yes</a>
83 <a href="/cgi-bin/koha/opac-illrequests.pl"
84 class="btn btn-sm btn-danger"><i class="fa fa-times" aria-hidden="true"></i> No</a>
87 [% INCLUDE messages %]
89 <form method="post" id="illrequestcreate-form" novalidate="novalidate">
90 <fieldset class="rows">
91 <label for="backend">Provider:</label>
92 <select name="backend">
93 [% FOREACH backend IN backends %]
94 <option value="[% backend | html %]">[% backend | html %]</option>
98 <fieldset class="action">
99 <input type="hidden" name="method" value="create" />
100 <input type="submit" name="create_select_backend" value="Next" />
104 [% PROCESS $whole.opac_template %]
106 [% END # /IF stage == 'copyrightclearance' %]
107 [% ELSIF method == 'list' %]
108 <h2>Interlibrary loan requests</h2>
109 [% INCLUDE messages %]
111 <div id="illrequests-create-button" class="dropdown btn-group">
112 [% IF backends.size > 1 %]
113 <button class="btn btn-primary dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
114 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request <span class="caret"></span>
116 <div id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
117 [% FOREACH backend IN backends %]
118 <a class="dropdown-item" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend | uri %]">[% backend | html %]</a>
122 <a id="ill-new" class="btn btn-primary" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 | html %]">
123 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request
128 <table id="illrequestlist" class="table table-bordered table-striped">
134 <th>Requested from</th>
135 <th>Request type</th>
137 <th class="title-string">Request placed</th>
138 <th class="title-string">Last updated</th>
143 [% FOREACH request IN requests %]
144 [% status = request.status | html %]
145 [% type = request.get_type %]
147 <td>[% request.id | html %]</td>
149 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
152 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
154 <td>[% request.backend | html %]</td>
156 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
158 <td>[% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]</td>
159 <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
160 <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
162 <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>
168 [% ELSIF method == 'view' %]
169 <h2>View interlibrary loan request</h2>
170 [% INCLUDE messages %]
171 [% status = request.status %]
172 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
173 <fieldset class="rows">
174 <legend id="library_legend">Details from library</legend>
176 [% type = request.get_type %]
178 <label for="request_id">Request ID:</label>
179 [% request.id | html %]
182 <label for="backend">Requested from:</label>
183 [% request.backend | html %]
185 [% IF request.biblio_id %]
187 <label for="biblio">Requested item:</label>
188 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">View the requested item</a>
192 <label for="branchcode">Collection library:</label>
193 [% Branches.GetName(request.branchcode) | html %]
196 <label for="status">Status:</label>
197 [% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]
200 <label for="medium">Request type:</label>
201 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
204 <label for="placed">Request placed:</label>
205 [% request.placed | $KohaDates %]
208 <label for="updated">Last updated:</label>
209 [% request.updated | $KohaDates %]
212 <label for="notesopac">Notes:</label>
213 [% IF !request.completed %]
214 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
216 [% request.notesopac | html %]
222 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
223 [% FOREACH meta IN request.metadata %]
224 <div class="requestattr-[% meta.key | html %]">
225 <span class="label">[% meta.key | html %]:</span>
226 [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
230 <fieldset class="action illrequest-actions">
231 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
232 <input type="hidden" name="method" value="update" />
233 [% IF !request.completed %]
234 [% IF request.status == "NEW" %]
235 <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>
237 <input type="submit" class="update-illrequest btn btn-primary" value="Submit modifications" />
239 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
242 [% ELSIF method == 'availability' %]
243 <h2>Interlibrary loan item availability</h2>
245 <h3>Displaying availability results</h3>
246 <form method="POST" action="/cgi-bin/koha/opac-illrequests.pl">
247 [% FOREACH key IN whole.keys %]
248 [% value = whole.$key %]
249 [% IF key != 'custom_key' && key != 'custom_value' %]
250 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
253 [% custom_keys = whole.custom_key.split('\0') %]
254 [% custom_values = whole.custom_value.split('\0') %]
256 [% FOREACH custom_key IN custom_keys %]
257 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
258 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
261 <input type="hidden" name="checked_availability" value="1">
262 <div id="continue-request-row" class="alert">
263 If you can't find what you are looking for, you can
264 <button class="button" type="submit">continue creating your request</button> or
265 <a href="/cgi-bin/koha/opac-illrequests.pl">cancel your request</a>
268 [% FOR service IN services %]
269 <h4 class="ill_availability_sourcename">[% service.name | html %]</h4>
270 [% INCLUDE 'ill-availability-table.inc' service=service %]
272 </div> <!-- /#illrequestupdate-form -->
273 [% END # / IF method == 'create' %]
274 </div> <!-- / #illrequests -->
275 [% END # /IF !backends_available %]
276 </div> <!-- / .col-lg-10/12 -->
277 </div> <!-- / .row -->
278 </div> <!-- / .container-fluid -->
279 </div> <!-- / .main -->
281 [% INCLUDE 'opac-bottom.inc' %]
283 [% BLOCK jsinclude %]
284 [% INCLUDE 'datatables.inc' %]
286 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
288 { "targets": [ -1 ], "sortable": false, "searchable": false },
289 { "type": "title-string", "targets" : [ "title-string" ] }
291 "order": [[ 3, "desc" ]],
294 $("#backend-dropdown-options").removeClass("nojs");
295 [% IF services_json.length > 0 %]
296 var services = [% services_json | $raw %];
300 [% IF metadata.length > 0 %]
301 var metadata = "[% metadata | $raw %]";
304 [% IF method == 'availability' %]
305 [% Asset.js("js/ill-availability.js") | $raw %]
307 $(document).ready(function() {
313 [% PROCESS backend_jsinclude %]