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 id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
21 <ol 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 active">
33 <a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a>
35 [% IF method == 'create' %]
36 <li class="breadcrumb-item active">
37 <a href="#" aria-current="page">New interlibrary loan request</a>
39 [% ELSIF method == 'view' %]
40 <li class="breadcrumb-item active">
41 <a href="#" aria-current="page">View interlibrary loan request</a>
45 <li class="breadcrumb-item active">
46 <a href="#" aria-current="page">Interlibrary loan requests</a>
49 </ol> <!-- / .breadcrumb -->
50 </nav> <!-- /#breadcrumbs -->
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 <h1>New interlibrary loan request</h1>
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 <legend class="sr-only">Backends</legend>
91 <fieldset class="rows">
92 <label for="backend">Provider:</label>
93 <select name="backend">
94 [% FOREACH backend IN backends %]
95 <option value="[% backend | html %]">[% backend | html %]</option>
99 <fieldset class="action">
100 <input type="hidden" name="method" value="create" />
101 <input type="submit" name="create_select_backend" value="Next" />
105 [% PROCESS $whole.opac_template %]
107 [% END # /IF stage == 'copyrightclearance' %]
108 [% ELSIF method == 'list' %]
109 <h1>Interlibrary loan requests</h1>
110 [% INCLUDE messages %]
112 <div id="illrequests-create-button" class="dropdown btn-group">
113 [% IF backends.size > 1 %]
114 <button class="btn btn-primary dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
115 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request <span class="caret"></span>
117 <div id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
118 [% FOREACH backend IN backends %]
119 <a class="dropdown-item" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend | uri %]">[% backend | html %]</a>
123 <a id="ill-new" class="btn btn-primary" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 | html %]">
124 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request
129 <table id="illrequestlist" class="table table-bordered table-striped">
130 <caption class="sr-only">Requests</caption>
136 <th>Requested from</th>
137 <th>Request type</th>
139 <th>Request placed</th>
140 <th>Last updated</th>
145 [% FOREACH request IN requests %]
146 [% status = request.status | html %]
147 [% type = request.get_type %]
149 <td>[% request.id | html %]</td>
151 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
154 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
156 <td>[% request.backend | html %]</td>
158 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
160 <td>[% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]</td>
161 <td data-order="[% request.placed | html %]">[% request.placed | $KohaDates %]</td>
162 <td data-order="[% request.updated | html %]">[% request.updated | $KohaDates %]</td>
164 <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>
170 [% ELSIF method == 'view' %]
171 <h1>View interlibrary loan request</h1>
172 [% INCLUDE messages %]
173 [% status = request.status %]
174 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
175 <fieldset class="rows">
176 <legend id="library_legend">Details from library</legend>
178 [% type = request.get_type %]
180 <label for="request_id">Request ID:</label>
181 [% request.id | html %]
184 <label for="backend">Requested from:</label>
185 [% request.backend | html %]
187 [% IF request.biblio_id %]
189 <label for="biblio">Requested item:</label>
190 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">View the requested item</a>
194 <label for="branchcode">Collection library:</label>
195 [% Branches.GetName(request.branchcode) | html %]
198 <label for="status">Status:</label>
199 [% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]
202 <label for="medium">Request type:</label>
203 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
206 <label for="placed">Request placed:</label>
207 [% request.placed | $KohaDates %]
210 <label for="updated">Last updated:</label>
211 [% request.updated | $KohaDates %]
214 <label for="notesopac">Notes:</label>
215 [% IF !request.completed %]
216 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
218 [% request.notesopac | html %]
224 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
225 [% FOREACH meta IN request.metadata %]
226 <div class="requestattr-[% meta.key | html %]">
227 <span class="label">[% meta.key | html %]:</span>
228 [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
232 <fieldset class="action illrequest-actions">
233 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
234 <input type="hidden" name="method" value="update" />
235 [% IF !request.completed %]
236 [% IF request.status == "NEW" %]
237 <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>
239 <input type="submit" class="update-illrequest btn btn-primary" value="Submit modifications" />
241 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
244 [% ELSIF method == 'availability' %]
245 <h1>Interlibrary loan item availability</h1>
247 <form method="POST" action="/cgi-bin/koha/opac-illrequests.pl">
248 <legend><h2>Displaying availability results</h2></legend>
249 [% FOREACH key IN whole.keys %]
250 [% value = whole.$key %]
251 [% IF key != 'custom_key' && key != 'custom_value' %]
252 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
255 [% custom_keys = whole.custom_key.split('\0') %]
256 [% custom_values = whole.custom_value.split('\0') %]
258 [% FOREACH custom_key IN custom_keys %]
259 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
260 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
263 <input type="hidden" name="checked_availability" value="1">
264 <div id="continue-request-row" class="alert">
265 If you can't find what you are looking for, you can
266 <button class="button" type="submit">continue creating your request</button> or
267 <a href="/cgi-bin/koha/opac-illrequests.pl">cancel your request</a>
270 [% FOR service IN services %]
271 <h3 class="ill_availability_sourcename">[% service.name | html %]</h3>
272 [% INCLUDE 'ill-availability-table.inc' service=service %]
274 </div> <!-- /#illrequestupdate-form -->
275 [% END # / IF method == 'create' %]
276 </div> <!-- / #illrequests -->
277 [% END # /IF !backends_available %]
278 </div> <!-- / .col-lg-10/12 -->
279 </div> <!-- / .row -->
280 </div> <!-- / .container-fluid -->
281 </div> <!-- / .main -->
283 [% INCLUDE 'opac-bottom.inc' %]
285 [% BLOCK jsinclude %]
286 [% INCLUDE 'datatables.inc' %]
288 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
290 { "targets": [ -1 ], "sortable": false, "searchable": false }
292 "order": [[ 3, "desc" ]],
295 $("#backend-dropdown-options").removeClass("nojs");
296 [% IF services_json.length > 0 %]
297 var services = [% services_json | $raw %];
301 [% IF metadata.length > 0 %]
302 var metadata = "[% metadata | $raw %]";
305 [% IF method == 'availability' %]
306 [% Asset.js("js/ill-availability.js") | $raw %]
308 $(document).ready(function() {
314 [% PROCESS backend_jsinclude %]