5 [% USE AdditionalContents %]
6 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Your interlibrary loan requests › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% BLOCK cssinclude %][% END %]
13 [% INCLUDE 'bodytag.inc' bodyid='opac-illrequests' bodyclass='scrollto' %]
15 [% IF message == "1" %]
16 <div class="alert alert-success" role="alert">Request updated</div>
17 [% ELSIF message == "2" %]
18 <div class="alert alert-success" role="alert">Request placed</div>
21 [% INCLUDE 'masthead.inc' %]
23 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
24 <ol class="breadcrumb">
25 <li class="breadcrumb-item">
26 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
28 [% IF ( logged_in_user ) %]
29 <li class="breadcrumb-item">
30 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
34 [% IF method != 'list' %]
35 <li class="breadcrumb-item active">
36 <a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a>
38 [% IF method == 'create' %]
39 <li class="breadcrumb-item active">
40 <a href="#" aria-current="page">New interlibrary loan request</a>
42 [% ELSIF method == 'view' %]
43 <li class="breadcrumb-item active">
44 <a href="#" aria-current="page">View interlibrary loan request</a>
48 <li class="breadcrumb-item active">
49 <a href="#" aria-current="page">Interlibrary loan requests</a>
52 </ol> <!-- / .breadcrumb -->
53 </nav> <!-- /#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" 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 [% END # / IF method == 'create' %]
279 </div> <!-- / #illrequests -->
280 [% END # /IF !backends_available %]
281 </div> <!-- / .col-lg-10/12 -->
282 </div> <!-- / .row -->
283 </div> <!-- / .container-fluid -->
284 </div> <!-- / .main -->
286 [% INCLUDE 'opac-bottom.inc' %]
288 [% BLOCK jsinclude %]
289 [% INCLUDE 'datatables.inc' %]
291 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
293 { "targets": [ -1 ], "sortable": false, "searchable": false }
295 "order": [[ 3, "desc" ]],
298 $("#backend-dropdown-options").removeClass("nojs");
299 [% IF services_json.length > 0 %]
300 var services = [% services_json | $raw %];
304 [% IF metadata.length > 0 %]
305 var metadata = "[% metadata | $raw %]";
308 [% IF method == 'availability' %]
309 [% Asset.js("js/ill-availability.js") | $raw %]
311 $(document).ready(function() {
317 [% PROCESS backend_jsinclude %]