7 [% USE AuthorisedValues %]
8 [% USE ColumnsSettings %]
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>Koha › ILL requests</title>
13 [% INCLUDE 'doc-head-close.inc' %]
16 <body id="illrequests" class="ill">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'cat-search.inc' %]
20 <div id="breadcrumbs">
21 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
22 <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
23 [% IF query_type == 'create' %]
25 [% ELSIF query_type == 'status' %]
30 <div class="main container-fluid">
33 [% IF query_type == 'illlist' %]
34 <div class="col-sm-2">
36 <form method="get" id="illfilter_form">
37 <fieldset class="brief">
41 <label for="illfilter_status">Status:</label>
42 <select name="illfilter_status" id="illfilter_status">
43 <option value=""></option>
47 <label for="illfilter_dateplaced_start">Date placed between:</label>
48 <input type="text" name="illfilter_dateplaced_start" id="illfilter_dateplaced_start" class="datepicker" />
51 <label for="illfilter_dateplaced_end">and:</label>
52 <input type="text" name="illfilter_dateplaced_end" id="illfilter_dateplaced_end" class="datepicker" />
55 <label for="illfilter_datemodified_start">Updated between:</label>
56 <input type="text" name="illfilter_datemodified_start" id="illfilter_datemodified_start" class="datepicker" />
59 <label for="illfilter_datemodified_end">and:</label>
60 <input type="text" name="illfilter_datemodified_end" id="illfilter_datemodified_end" class="datepicker" />
63 <label for="illfilter_branchname">Library:</label>
64 <select name="illfilter_branchname" id="illfilter_branchname">
65 <option value=""></option>
69 <label for="illfilter_patron">Patron:</label>
70 <input type="text" name="illfilter_patron" id="illfilter_patron" />
73 <fieldset class="action">
74 <input type="submit" value="Search" />
75 <input type="button" value="Clear" id="clear_search" />
78 </form> <!-- /#illfilter_form -->
80 </div> <!-- /.col-sm-2 -->
81 <div class="col-sm-10">
84 <div class="col-sm-10 col-sm-offset-2">
87 <div id="interlibraryloans">
88 [% IF !backends_available || !has_branch %]
89 <div class="dialog message">ILL module configuration problem. Take a look at the <a href="/cgi-bin/koha/about.pl#sysinfo">about page</a></div>
91 [% INCLUDE 'ill-toolbar.inc' %]
94 <h1>Error performing operation</h1>
95 <!-- Dispatch on Status -->
96 <p>We encountered an error:</p>
98 <pre>[% whole.message | html %] ([% whole.status | html %])</pre>
102 [% IF query_type == 'create' %]
103 <h1>New ILL request</h1>
104 [% PROCESS $whole.template %]
106 [% ELSIF query_type == 'confirm' %]
107 <h1>Confirm ILL request</h1>
108 [% PROCESS $whole.template %]
110 [% ELSIF query_type == 'cancel' and !whole.error %]
111 <h1>Cancel a confirmed request</h1>
112 [% PROCESS $whole.template %]
114 [% ELSIF query_type == 'generic_confirm' %]
115 <h1>Place request with partner libraries</h1>
117 [% IF error == 'no_target_email' %]
119 No target email addresses found. Either select at least
120 one partner or check your ILL partner library records.
122 [% ELSIF error == 'no_library_email' %]
124 Your library has no usable email address. Please set it.
126 [% ELSIF error == 'unkown_error' %]
128 Unknown error processing your request. Contact your administrator.
132 <!-- Start of GENERIC_EMAIL case -->
133 [% IF whole.value.partners %]
134 [% ill_url = "/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=" _ request.illrequest_id %]
135 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
136 <fieldset class="rows">
137 <legend>Interlibrary loan request details</legend>
140 <label for="partner_filter">Filter partner libraries:</label>
141 <input type="text" id="partner_filter" />
144 <label for="partners" class="required">Select partner libraries:</label>
145 <select size="5" multiple="true" id="partners" name="partners" required="required">
146 [% FOREACH partner IN whole.value.partners %]
147 <option value=[% partner.email | html %]>
148 [% partner.branchcode _ " - " _ partner.surname %]
155 <label for="subject" class="required">Subject line:</label>
156 <input type="text" name="subject" id="subject" type="text" value="[% whole.value.draft.subject | html %]" required="required" />
159 <label for="body" class="required">Email text:</label>
160 <textarea name="body" id="body" rows="20" cols="80" required="required">[% whole.value.draft.body | html %]</textarea>
163 <input type="hidden" value="generic_confirm" name="method">
164 <input type="hidden" value="draft" name="stage">
165 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
167 <fieldset class="action">
168 <input type="submit" class="btn btn-default" value="Send email"/>
169 <span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span>
173 <fieldset class="rows">
174 <legend>Interlibrary loan request details</legend>
175 <p>No partners have been defined yet. Please create appropriate patron records (by default ILLLIBS category).</p>
176 <p>Be sure to provide email addresses for these patrons.</p>
177 <p><span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span></p>
180 <!-- generic_confirm ends here -->
182 [% ELSIF query_type == 'edit_action' %]
183 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
184 <fieldset class="rows">
185 <legend>Request details</legend>
187 [% type = request.get_type %]
188 <li class="borrowernumber">
189 <label for="borrowernumber">Patron ID:</label>
190 [% request.borrowernumber | html %]
192 <li class="biblio_id">
193 <label for="biblio_id" class="biblio_id">Bibliographic record ID:</label>
194 <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id | html %]">
196 <li class="branchcode">
197 <label for="library" class="branchcode">Library:</label>
198 <select name="branchcode" id="library">
199 [% PROCESS options_for_libraries libraries => Branches.all( selected => request.branchcode ) %]
203 <label class="status">Status:</label>
204 [% stat = request.status %]
205 [% current_alias = request.status_alias %]
206 <select id="status_alias" name="status_alias">
207 [% IF !current_alias %]
208 <option value="" selected>
212 [% request.capabilities.$stat.name | html %]
214 [% FOREACH alias IN AuthorisedValues.Get('ILLSTATUS') %]
215 [% IF alias.authorised_value == current_alias %]
216 <option value="[% alias.authorised_value | html %]" selected>
218 <option value="[% alias.authorised_value | html %]">
220 [% alias.lib | html %]
226 <label class="updated">Last updated:</label>
227 [% request.updated | $KohaDates with_hours => 1 %]
230 <label class="medium">Request type:</label>
231 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
234 <label class="cost">Cost:</label>
235 [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
237 <li class="price_paid">
238 <label class="price_paid">Price paid:</label>
239 <input name="price_paid" id="price_paid" type="text" value="[% request.price_paid | html %]">
242 <label class="req_id">Request number:</label>
243 [% request.id_prefix _ request.illrequest_id | html %]
245 <li class="notesstaff">
246 <label for="notesstaff" class="notesstaff">Staff notes:</label>
247 <textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff | html %]</textarea>
249 <li class="notesopac">
250 <label for="notesopac" class="notesopac">Opac notes:</label>
251 <textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac | html %]</textarea>
255 <fieldset class="action">
256 <input type="hidden" value="edit_action" name="method">
257 <input type="hidden" value="form" name="stage">
258 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
259 <input type="hidden" value="[% request.borrowernumber | html %]" name="borrowernumber">
260 <input type="submit" value="Submit">
261 <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% request.id | html %]">Cancel</a>
265 [% ELSIF query_type == 'delete_confirm' %]
267 <div class="dialog alert">
268 <h3>Are you sure you wish to delete this request?</h3>
269 <form action="/cgi-bin/koha/ill/ill-requests.pl" method="post">
270 <input type="hidden" name="method" value="delete" />
271 <input type="hidden" name="confirmed" value="1" />
272 <input type="hidden" name="illrequest_id" value="[% request.id | html %]" />
273 <button type="submit" class="btn btn-default approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
275 <a class="btn btn-default deny" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% request.id | html %]"><i class="fa fa-fw fa-remove"></i>No, do not delete</a>
278 [% ELSIF query_type == 'illview' %]
279 [% req_status = request.status %]
282 [% IF error == 'migrate_target' %]
284 The backend you tried to migrate to does not yet support migrations, please try again with an alternative target.
289 <h1>Manage ILL request</h1>
290 <div id="request-toolbar" class="btn-toolbar">
291 <a title="Edit request" id="ill-toolbar-btn-edit-action" class="btn btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=edit_action&illrequest_id=[% request.illrequest_id | html %]">
292 <span class="fa fa-pencil"></span>
295 [% FOREACH action IN request.available_actions %]
296 [% IF action.method == 'migrate' %]
297 [% IF backends.size > 2 %]
298 <div class="dropdown btn-group">
299 <button class="btn btn-default dropdown-toggle" type="button" id="ill-migrate-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
300 <i class="fa [% action.ui_method_icon | html %]"></i> [% action.ui_method_name | html %] <span class="caret"></span>
302 <ul class="dropdown-menu" aria-labelledby="ill-migrate-dropdown">
303 [% FOREACH backend IN backends %]
304 [% IF backend != request.backend %]
305 <li><a href="/cgi-bin/koha/ill/ill-requests.pl?method=[% action.method | uri %]&illrequest_id=[% request.illrequest_id | uri %]&backend=[% backend | uri %]">[% backend | html %]</a></li>
310 [% ELSIF backends.size == 2 %]
311 [% FOREACH backend IN backends %]
312 [% IF backend != request.backend %]
313 <a title="[% action.ui_method_name | html %]" id="ill-toolbar-btn-[% action.id | lower | html %]" class="btn btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=[% action.method | uri %]&illrequest_id=[% request.illrequest_id | uri %]&backend=[% backend | uri %]">
314 <span class="fa [% action.ui_method_icon | html %]"></span>
315 [% action.ui_method_name | html %]
320 [% ELSIF action.method != 0 %]
321 <a title="[% action.ui_method_name | html %]" id="ill-toolbar-btn-[% action.id | lower | html %]" class="btn btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=[% action.method | uri %]&illrequest_id=[% request.illrequest_id | uri %]">
322 <span class="fa [% action.ui_method_icon | html %]"></span>
323 [% action.ui_method_name | html %]
327 <a title="Display supplier metadata" id="ill-request-display-metadata" class="btn btn-default pull-right" href="#">
328 <span class="fa fa-eye"></span>
329 Display supplier metadata
331 <a title="ILL request log" id="ill-request-display-log" class="btn btn-default pull-right" href="#">
332 <span class="fa fa-calendar"></span>
336 <div class="ill-view-panel panel panel-default">
337 <div class="panel-heading">
338 <h3>Request details</h3>
340 <div class="panel-body">
341 <h4>Details from library</h4>
345 <span class="label orderid">Order ID:</span>
346 [% IF request.orderid %][% request.orderid | html %][% ELSE %]<span>N/A</span>[% END %]
348 <li class="borrowernumber">
349 <span class="label borrowernumber">Patron:</span>
350 [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %]
351 <a href="[% borrowerlink | url %]" title="View borrower details">
352 [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %]
356 <li class="biblio_id">
357 <span class="label biblio_id">Bibliographic record ID:</span>
358 [% IF request.biblio_id %]
359 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% request.biblio_id | uri %]">[% request.biblio_id | html %]</a>
364 <li class="branchcode">
365 <span class="label branchcode">Library:</span>
366 [% Branches.GetName(request.branchcode) | html %]
369 <span class="label status">Status:</span>
370 [% IF request.statusalias %]
371 [% request.statusalias.lib | html %]
373 [% request.capabilities.$req_status.name | html%]
374 [% IF request.requested_partners.length > 0 %]
375 ([% request.requested_partners | html %])
380 <span class="label updated">Last updated:</span>
381 [% request.updated | $KohaDates with_hours => 1 %]
384 <span class="label medium">Request type:</span>
385 [% type = request.get_type %]
386 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
389 <span class="label cost">Cost:</span>
390 [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
392 <li class="price_paid">
393 <span class="label price_paid">Price paid:</span>
394 [% IF request.price_paid %][% request.price_paid | $Price %][% ELSE %]<span>N/A</span>[% END %]
397 <span class="label req_id">Request number:</span>
398 [% request.id_prefix _ request.illrequest_id | html %]
400 <li class="notesstaff">
401 <span class="label notes_staff">Staff notes:</span>
402 <p>[% request.notesstaff | html %]</p>
404 <li class="notesopac">
405 <span class="label notes_opac">Notes:</span>
406 <p>[% request.notesopac | html %]</p>
411 <h4>Details from supplier ([% request.backend | html %])</h4>
413 [% FOREACH meta IN request.metadata %]
414 <li class="requestmeta-[% meta.key.replace('\s','_') | html %]">
415 <span class="label">[% meta.key | html %]:</span>
416 [% meta.value | html %]
424 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
425 <div class="modal-dialog">
426 <div class="modal-content">
427 <div class="modal-header">
428 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
429 <h3 id="dataPreviewLabel"> Supplier metadata</h3>
431 <div class="modal-body">
432 <div id="requestattributes">
433 [% FOREACH attr IN request.illrequestattributes %]
434 <div class="requestattr-[% attr.type | html %]">
435 <span class="label">[% attr.type | html %]:</span>
436 [% attr.value | html %]
441 <div class="modal-footer">
442 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
448 <div id="requestLog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
449 <div class="modal-dialog">
450 <div class="modal-content">
451 <div class="modal-header">
452 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
453 <h3 id="requestLogLabel"> Request log</h3>
455 <div class="modal-body">
456 [% IF request.logs.size > 0 %]
457 [% FOREACH log IN request.logs %]
458 [% tpl = log.template %]
459 [% INCLUDE $tpl log=log %]
462 There are no recorded logs for this request
465 <div class="modal-footer">
466 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
472 <div class="ill-view-panel panel panel-default">
473 <div class="panel-heading">
474 <h3>[% request.illcomments.count | html %] comments</h3>
476 <div class="panel-body">
477 [% IF request.illcomments.count && request.illcomments.count > 0 %]
478 [% FOREACH comment IN request.illcomments %]
479 <div class="rows comment_[% comment.patron.categorycode | html %]">
481 <a href="[% borrowerlink | url %]" title="View borrower details">
482 [% comment.patron.firstname _ " " _ comment.patron.surname _ " [" _ comment.patron.cardnumber _ "]" | html %]</a>
483 [% comment.timestamp | $KohaDates with_hours => 1 %]</h5>
484 <p>[% comment.comment | html %]</p>
489 <h3><a id="toggle_addcomment" href="#">Add comment</a></h3>
490 <div id="addcomment" class="content_hidden">
491 <form class="validated" method="post" action="/cgi-bin/koha/ill/ill-requests.pl">
492 <input type="hidden" value="save_comment" name="method">
493 <input type="hidden" value="[% csrf_token | html %]" name="csrf_token">
494 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
495 <fieldset class="rows">
498 <label class="required" for="comment">Comment: </label>
499 <textarea class="required" required="required" cols="80" rows="10" id="comment" name="comment"></textarea>
500 <span class="required">Required</span>
504 <fieldset class="action">
505 <input type="submit" value="Submit">
513 [% ELSIF query_type == 'illlist' %]
515 <h1>View ILL requests</h1>
517 <h3>Details for all requests</h3>
518 [% INCLUDE 'ill-list-table.inc' %]
520 </div> <!-- /#results -->
522 <!-- Custom Backend Action -->
523 [% PROCESS $whole.template %]
527 </div> <!-- /#interlibraryloans -->
529 </div> <!-- /.col-sm-10 -->
530 </div> <!-- /.row -->
533 [% MACRO jsinclude BLOCK %]
534 [% INCLUDE 'datatables.inc' %]
535 [% INCLUDE 'columns_settings.inc' %]
536 [% INCLUDE 'calendar.inc' %]
537 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
539 var prefilters = '[% prefilters | $raw %]';
540 // Set column settings
541 var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
543 [% INCLUDE 'ill-list-table-strings.inc' %]
544 [% Asset.js("js/ill-list-table.js") | $raw %]
548 [% PROCESS backend_jsinclude %]
552 [% INCLUDE 'intranet-bottom.inc' %]