5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your interlibrary loan requests</title>[% INCLUDE 'doc-head-close.inc' %]
7 [% BLOCK cssinclude %][% END %]
9 [% INCLUDE 'bodytag.inc' bodyid='opac-illrequests' bodyclass='scrollto' %]
11 [% IF message == "1" %]
12 <div class="alert alert-success" role="alert">Request updated</div>
13 [% ELSIF message == "2" %]
14 <div class="alert alert-success" role="alert">Request placed</div>
17 [% INCLUDE 'masthead.inc' %]
19 <nav aria-label="breadcrumb">
20 <ul class="breadcrumb">
21 <li class="breadcrumb-item">
22 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
24 [% IF ( logged_in_user ) %]
25 <li class="breadcrumb-item">
26 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
30 [% IF method != 'list' %]
31 <li class="breadcrumb-item" aria-current="page">
32 <a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a>
34 [% IF method == 'create' %]
35 <li class="breadcrumb-item" aria-current="page">
36 New interlibrary loan request
38 [% ELSIF method == 'view' %]
39 <li class="breadcrumb-item" aria-current="page">
40 View interlibrary loan request
44 <li class="breadcrumb-item" aria-current="page">
45 Interlibrary loan requests
48 </ul> <!-- / .breadcrumb -->
51 <div class="container-fluid">
53 [% IF ( OpacNav||loggedinusername ) && !print %]
54 <div class="col-lg-2">
56 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
61 [% IF ( OpacNav||loggedinusername ) %]
62 <div class="col-lg-10 order-first order-md-first order-lg-2">
64 <div class="col order-first order-md-first order-lg-2">
67 [% IF !backends_available %]
68 <div class="alert alert-warning">ILL module configuration problem. Contact your administrator.</div>
70 <div id="illrequests" class="maincontent">
71 [% IF method == 'create' %]
72 <h2>New interlibrary loan request</h2>
73 [% IF stage == 'copyrightclearance' %]
74 [% INCLUDE messages %]
77 [% Koha.Preference('ILLModuleCopyrightClearance') | $raw %]
79 [% USE link_url = url('/cgi-bin/koha/opac-illrequests.pl', whole.value.other) %]
80 <a href="[% link_url _ '&stage=copyrightclearance' | $raw %]"
81 class="btn btn-sm btn-default"><i class="fa fa-check" aria-hidden="true"></i> Yes</a>
82 <a href="/cgi-bin/koha/opac-illrequests.pl"
83 class="btn btn-sm btn-default"><i class="fa fa-times" aria-hidden="true"></i> No</a>
86 [% INCLUDE messages %]
88 <form method="post" id="illrequestcreate-form" novalidate="novalidate">
89 <fieldset class="rows">
90 <label for="backend">Provider:</label>
91 <select name="backend">
92 [% FOREACH backend IN backends %]
93 <option value="[% backend | html %]">[% backend | html %]</option>
97 <fieldset class="action">
98 <input type="hidden" name="method" value="create" />
99 <input type="submit" name="create_select_backend" value="Next" />
103 [% PROCESS $whole.opac_template %]
105 [% END # /IF stage == 'copyrightclearance' %]
106 [% ELSIF method == 'list' %]
107 <h2>Interlibrary loan requests</h2>
108 [% INCLUDE messages %]
110 <div id="illrequests-create-button" class="dropdown btn-group">
111 [% IF backends.size > 1 %]
112 <button class="btn btn-default dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
113 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request <span class="caret"></span>
115 <ul id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
116 [% FOREACH backend IN backends %]
117 <li><a href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend | uri %]">[% backend | html %]</a></li>
121 <a id="ill-new" class="btn btn-default" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 | html %]">
122 <i class="fa fa-plus" aria-hidden="true"></i> Create a new request
127 <table id="illrequestlist" class="table table-bordered table-striped">
133 <th>Requested from</th>
134 <th>Request type</th>
136 <th class="title-string">Request placed</th>
137 <th class="title-string">Last updated</th>
142 [% FOREACH request IN requests %]
143 [% status = request.status | html %]
144 [% type = request.get_type %]
146 <td>[% request.id | html %]</td>
148 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
151 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
153 <td>[% request.backend | html %]</td>
155 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
157 <td>[% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]</td>
158 <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
159 <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
161 <a href="/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=[% request.id | uri %]" class="btn btn-default btn-sm pull-right">View</a>
167 [% ELSIF method == 'view' %]
168 <h2>View interlibrary loan request</h2>
169 [% INCLUDE messages %]
170 [% status = request.status %]
171 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
172 <fieldset class="rows">
173 <legend id="library_legend">Details from library</legend>
175 [% type = request.get_type %]
177 <label for="request_id">Request ID:</label>
178 [% request.id | html %]
181 <label for="backend">Requested from:</label>
182 [% request.backend | html %]
184 [% IF request.biblio_id %]
186 <label for="biblio">Requested item:</label>
187 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">Click here to view</a>
191 <label for="branchcode">Collection library:</label>
192 [% Branches.GetName(request.branchcode) | html %]
195 <label for="status">Status:</label>
196 [% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]
199 <label for="medium">Request type:</label>
200 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
203 <label for="placed">Request placed:</label>
204 [% request.placed | $KohaDates %]
207 <label for="updated">Last updated:</label>
208 [% request.updated | $KohaDates %]
211 <label for="notesopac">Notes:</label>
212 [% IF !request.completed %]
213 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
215 [% request.notesopac | html %]
221 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
222 [% FOREACH meta IN request.metadata %]
223 <div class="requestattr-[% meta.key | html %]">
224 <span class="label">[% meta.key | html %]:</span>
225 [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
229 <fieldset class="action illrequest-actions">
230 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
231 <input type="hidden" name="method" value="update" />
232 [% IF !request.completed %]
233 [% IF request.status == "NEW" %]
234 <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>
236 <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications" />
238 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
241 [% ELSIF method == 'availability' %]
242 <h2>Interlibrary loan item availability</h2>
244 <h3>Displaying availability results</h3>
245 <form method="POST" action="/cgi-bin/koha/opac-illrequests.pl">
246 [% FOREACH key IN whole.keys %]
247 [% value = whole.$key %]
248 [% IF key != 'custom_key' && key != 'custom_value' %]
249 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
252 [% custom_keys = whole.custom_key.split('\0') %]
253 [% custom_values = whole.custom_value.split('\0') %]
255 [% FOREACH custom_key IN custom_keys %]
256 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
257 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
260 <input type="hidden" name="checked_availability" value="1">
261 <div id="continue-request-row" class="alert">
262 If you can't find what you are looking for, you can
263 <button class="button" type="submit">continue creating your request</button> or
264 <a href="/cgi-bin/koha/opac-illrequests.pl">cancel your request</a>
267 [% FOR service IN services %]
268 <h4 class="ill_availability_sourcename">[% service.name | html %]</h4>
269 [% INCLUDE 'ill-availability-table.inc' service=service %]
271 </div> <!-- /#illrequestupdate-form -->
272 [% END # / IF method == 'create' %]
273 </div> <!-- / #illrequests -->
274 [% END # /IF !backends_available %]
275 </div> <!-- / .col-lg-10/12 -->
276 </div> <!-- / .row -->
277 </div> <!-- / .container-fluid -->
278 </div> <!-- / .main -->
280 [% INCLUDE 'opac-bottom.inc' %]
282 [% BLOCK jsinclude %]
283 [% INCLUDE 'datatables.inc' %]
285 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
287 { "targets": [ -1 ], "sortable": false, "searchable": false },
288 { "type": "title-string", "targets" : [ "title-string" ] }
290 "order": [[ 3, "desc" ]],
293 $("#backend-dropdown-options").removeClass("nojs");
294 [% IF services_json.length > 0 %]
295 var services = [% services_json | $raw %];
299 [% IF metadata.length > 0 %]
300 var metadata = "[% metadata | $raw %]";
303 [% IF method == 'availability' %]
304 [% Asset.js("js/ill-availability.js") | $raw %]
306 $(document).ready(function() {
312 [% PROCESS backend_jsinclude %]