6 [% USE AuthorisedValues %]
7 [% USE TablesSettings %]
9 [% PROCESS 'i18n.inc' %]
10 [% SET footerjs = 1 %]
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>[% FILTER collapse %]
13 [% t("ILL requests") | html %] ›
14 [% t("Koha") | html %]
16 [% INCLUDE 'doc-head-close.inc' %]
19 <body id="illrequests" class="ill">
20 [% WRAPPER 'header.inc' %]
21 [% INCLUDE 'cat-search.inc' %]
24 [% WRAPPER 'sub-header.inc' %]
25 [% WRAPPER breadcrumbs %]
26 [% IF query_type == 'create' %]
27 [% WRAPPER breadcrumb_item %]
28 <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
30 [% WRAPPER breadcrumb_item bc_active= 1 %]
31 <span>New request</span>
33 [% ELSIF query_type == 'illview' %]
34 [% WRAPPER breadcrumb_item %]
35 <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
37 [% WRAPPER breadcrumb_item bc_active= 1 %]
38 <span>Manage request [% request.id_prefix _ request.illrequest_id | html %]</span>
41 [% WRAPPER breadcrumb_item bc_active= 1 %]
42 <span>ILL requests</span>
45 [% END #/ WRAPPER breadcrumbs %]
46 [% END #/ WRAPPER sub-header.inc %]
48 <div class="main container-fluid">
51 [% IF query_type == 'illlist' %]
52 <div class="col-sm-2">
54 <form method="get" id="illfilter_form">
55 <fieldset class="brief">
59 <label for="illfilter_keyword">Keyword:</label>
60 <input type="text" name="illfilter_keyword" id="illfilter_keyword" />
63 <label for="illfilter_backend">Backend:</label>
64 <select name="illfilter_backend" id="illfilter_backend">
65 <option value="">All backends</option>
69 <label for="illfilter_status">Status:</label>
70 <select name="illfilter_status" id="illfilter_status">
74 <label for="illfilter_dateplaced_start">Date placed between:</label>
75 <input type="text" name="illfilter_dateplaced_start" id="illfilter_dateplaced_start" class="flatpickr" data-date_to="illfilter_dateplaced_end"/>
78 <label for="illfilter_dateplaced_end">and:</label>
79 <input type="text" name="illfilter_dateplaced_end" id="illfilter_dateplaced_end" class="flatpickr" />
82 <label for="illfilter_datemodified_start">Updated between:</label>
83 <input type="text" name="illfilter_datemodified_start" id="illfilter_datemodified_start" class="flatpickr" data-date_to="illfilter_datemodified_end" />
86 <label for="illfilter_datemodified_end">and:</label>
87 <input type="text" name="illfilter_datemodified_end" id="illfilter_datemodified_end" class="flatpickr" />
90 <label for="illfilter_branchname">Library:</label>
91 <select name="illfilter_branchname" id="illfilter_branchname">
92 <option value="">All libraries</option>
93 [% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %]
97 <label for="illfilter_patron">Patron:</label>
98 <input type="text" name="illfilter_patron" id="illfilter_patron" />
101 <fieldset class="action">
102 <input type="submit" class="btn btn-primary" value="Search" />
103 <input type="button" value="Clear" id="clear_search" />
106 </form> <!-- /#illfilter_form -->
108 </div> <!-- /.col-sm-2 -->
109 <div class="col-sm-10">
112 <div class="col-sm-10 col-sm-offset-2">
115 <div id="interlibraryloans">
116 [% IF !backends_available || !has_branch %]
117 <div class="dialog message">ILL module configuration problem. Take a look at the <a href="/cgi-bin/koha/about.pl#sysinfo_panel">about page</a></div>
119 [% INCLUDE 'ill-toolbar.inc' %]
122 <h1>Error performing operation</h1>
123 <!-- Dispatch on Status -->
124 <p>We encountered an error:</p>
126 <pre>[% whole.message | html %] ([% whole.status | html %])</pre>
130 [% IF whole.success %]
131 <p>[% whole.success | html %]</p>
134 [% IF query_type == 'create' %]
135 <h1>New ILL request</h1>
136 [% PROCESS $whole.template %]
138 [% ELSIF query_type == 'confirm' %]
139 <h1>Confirm ILL request</h1>
140 [% PROCESS $whole.template %]
142 [% ELSIF query_type == 'cancel' and !whole.error %]
143 <h1>Cancel a confirmed request</h1>
144 [% PROCESS $whole.template %]
146 [% ELSIF query_type == 'check_out' and !whole.error %]
147 [% IF !whole.stage || whole.stage == 'form' %]
148 <h1 id="ill-issue-title">Issue requested item to [% INCLUDE 'patron-title.inc' patron = request.patron %]</h1>
149 [% IF !request.biblio_id || request.biblio_id.length == 0 %]
150 <div class="alert">This item cannot be checked out as it has no bibliographic record associated with it</div>
152 [% IF whole.value.errors.itemcount %]
153 <div class="alert">The bibliographic record for this request has multiple items, it should only have one. Please fix this then try again.</div>
155 [% IF whole.value.errors.item_creation %]
156 <div class="alert">An unknown error occurred while trying to add an item</div>
158 [% IF whole.value.errors.item_check_out %]
159 <div class="alert">An unknown error occurred while trying to check out the item</div>
161 [% IF whole.value.check_out_errors %]
162 [% IF whole.value.check_out_errors.error.STATS %]
168 There was a problem checking this item out, please check for problems with the <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% whole.value.patron.borrowernumber | uri %]">patron's account</a>
172 [% IF request.biblio_id && request.biblio_id.length > 0 && !whole.value.check_out_errors.error.STATS %]
173 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
174 <fieldset class="rows">
175 <legend>Check out details</legend>
176 [% items = whole.value.biblio.items.unblessed %]
177 [% IF items.size == 1 %]
178 <p>The bibliographic record for this request already has an item attached to it, you are about to check it out</p>
180 <p>A bibliographic record for this request exists, but no item. You are about to create an item and check it out</p>
183 <li class="ill_checkout_inhouse">
184 <label for="inhouse" class="ill_checkout_inhouse_label">Statistical patron:</label>
185 <select id="ill_checkout_inhouse_select" name="inhouse" class="ill_checkout_inhouse_select">
186 <option value=""></option>
187 [% FOREACH stat IN whole.value.statistical %]
188 [% IF stat.borrowernumber == params.inhouse %]
189 <option value="[% stat.cardnumber | html %]" selected>[% INCLUDE 'patron-title.inc' patron = stat %]</option>
191 <option value="[% stat.cardnumber | html %]">[% INCLUDE 'patron-title.inc' patron = stat %]</option>
195 [% IF whole.value.errors.inhouse %]
196 <span class="required">You must choose a valid patron</span>
198 <div class="hint">If you do not wish to check out the item to [% INCLUDE 'patron-title.inc' patron = request.patron %] and would rather issue it to an in-house statistical patron, choose the patron here</div>
200 <li class="ill_checkout_item_type">
201 <label for="item_type" class="ill_checkout_item_type_label required">Item type:</label>
202 [% IF items.size != 1 %]
203 <select id="ill_checkout_item_type_select" name="item_type" required>
204 [% FOREACH type IN whole.value.itemtypes %]
205 [% IF type.itemtype == params.item_type %]
206 <option value="[% type.itemtype | html %]" selected>
208 <option value="[% type.itemtype | html %]">
210 [% type.description | html %]
215 [% FOREACH type IN whole.value.itemtypes %]
216 [% IF type.itemtype == items.0.itype %]
217 [% type.description | html %]
221 [% IF whole.value.errors.item_type %]
222 <span class="required">You must choose an item type</span>
225 [% IF items.size == 1 %]
227 <label for="barcode" class="ill_checkout_barcode_label">Item barcode:</label>
228 [% items.0.barcode | html %]
231 <li class="ill_checkout_branchcode">
232 <label for="branchcode" class="ill_checkout_branchcode_label required">Library:</label>
233 [% branchcode = items.size == 1 ? items.0.homebranch : params.branchcode ? params.branchcode : request.branchcode %]
234 [% IF items.size != 1 %]
235 <select name="branchcode" id="ill_checkout_branchcode_select" required>
236 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
239 [% FOREACH branch IN whole.value.libraries.unblessed %]
240 [% IF branch.branchcode == branchcode %]
241 [% branch.branchname | html %]
245 [% IF whole.value.errors.branchcode %]
246 <span class="required">You must choose a library</span>
249 <li class="ill_checkout_due_date">
250 <label for="duedate" class="ill_checkout_duedate_label">Due date:</label>
251 <input name="duedate" id="ill_checkout_duedate_input" type="text" value="[% params.duedate | html %]" class="flatpickr" data-flatpickr-enable-time="true" /> [% INCLUDE 'date-format.inc' %]
252 <div class="hint">If you do not specify a due date, it will be set according to circulation rules</p>
256 <fieldset class="action">
257 <input type="hidden" value="check_out" name="method">
258 <input type="hidden" value="form" name="stage">
259 [% IF items.size == 1 %]
260 <input name="branchcode" type="hidden" value="[% branchcode | html %]">
261 <input name="item_type" type="hidden" value="[% items.0.itype | html %]">
263 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
264 <input type="submit" class="btn btn-primary" value="Submit" />
265 <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% request.id | html %]">Cancel</a>
269 [% IF whole.value.check_out_errors.error.STATS %]
270 <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% request.id | html %]">Return to request</a>
272 [% ELSIF whole.stage == 'done_check_out' %]
273 <h1>Item checked out</h1>
274 <fieldset class="rows">
275 <legend>Check out details</legend>
278 <label>Checked out to:</label>
279 [% INCLUDE 'patron-title.inc' patron = whole.value.patron %]
282 <label>Due date:</label>
283 [% whole.value.check_out.date_due | $KohaDates as_due_date => 1 %]
287 <fieldset class="action">
288 <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% request.id | html %]">Return to request</a>
292 [% ELSIF query_type == 'generic_confirm' %]
293 <h1>Place request with partner libraries</h1>
295 [% IF error == 'no_target_email' %]
297 No target email addresses found. Either select at least
298 one partner or check your ILL partner library records.
300 [% ELSIF error == 'no_library_email' %]
302 Your library has no usable email address. Please set it.
304 [% ELSIF error == 'unkown_error' %]
306 Unknown error processing your request. Contact your administrator.
310 <!-- Start of GENERIC_EMAIL case -->
311 [% IF whole.value.partners %]
312 [% ill_url = "/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=" _ request.illrequest_id %]
313 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
314 <fieldset class="rows">
315 <legend>Interlibrary loan request details</legend>
318 <label for="partner_filter">Filter partner libraries:</label>
319 <input type="text" id="partner_filter" />
322 <label for="partners" class="required">Select partner libraries:</label>
323 <select size="5" multiple="true" id="partners" name="partners" required="required">
324 [% FOREACH partner IN whole.value.partners %]
325 [% IF partner.email && partner.email.length > 0 %]
326 <option data-partner-id="[% partner.id | html %]" value=[% partner.borrowernumber | html %]>
327 [% partner.branchcode _ " - " _ partner.surname %]
332 [% IF Koha.Preference('ILLCheckAvailability') %]
333 <div id="generic_confirm_search_count">Partners available for searching: <span id="generic_confirm_enabled">none</span></div>
334 <div id="generic_confirm_search">
335 <button type="button">Search selected partners</button>
340 <label for="subject" class="required">Subject line:</label>
341 <input type="text" name="subject" id="subject" type="text" value="[% whole.value.draft.subject | html %]" required="required" />
344 <label for="body" class="required">Email text:</label>
345 <textarea name="body" id="body" rows="20" cols="80" required="required">[% whole.value.draft.body | html %]</textarea>
348 <input type="hidden" value="generic_confirm" name="method">
349 <input type="hidden" value="draft" name="stage">
350 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
352 <fieldset class="action">
353 <input type="submit" class="btn btn-default" value="Send email"/>
354 <span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span>
357 [% IF Koha.Preference('ILLCheckAvailability') %]
358 <div id="partnerSearch" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="partnerSearchLabel" aria-hidden="true">
359 <div class="modal-dialog">
360 <div class="modal-content">
361 <div class="modal-header">
362 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
363 <h3 id="partnerSearchLabel"> Search partners</h3>
365 <div class="modal-body">
366 [% FOR service IN services %]
367 <h4 class="ill_availability_sourcename">[% service.name | html %]</h4>
368 [% INCLUDE 'ill-availability-table.inc' service=service %]
370 <span id="service_id_restrict" data-service_id_restrict_plugin="ILL availability - z39.50" data-service_id_restrict_ids=""></span>
372 <div class="modal-footer">
373 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
381 <fieldset class="rows">
382 <legend>Interlibrary loan request details</legend>
383 <p>No partners have been defined yet. Please create appropriate patron records (by default IL category).</p>
384 <p>Be sure to provide email addresses for these patrons.</p>
385 <p><span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span></p>
388 <!-- generic_confirm ends here -->
390 [% ELSIF query_type == 'edit_action' %]
391 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
392 <fieldset class="rows">
393 <legend>Request details</legend>
395 [% type = request.get_type %]
396 <li class="borrowernumber">
397 <label for="borrowernumber">Patron ID:</label>
398 <input name="borrowernumber" id="borrowernumber" type="text" value="[% request.borrowernumber | html %]">
400 <li class="biblio_id">
401 <label for="biblio_id" class="biblio_id">Bibliographic record ID:</label>
402 <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id | html %]">
404 <li class="branchcode">
405 <label for="library" class="branchcode">Library:</label>
406 <select name="branchcode" id="library">
407 [% PROCESS options_for_libraries libraries => Branches.all( selected => request.branchcode ) %]
411 <label class="status">Status:</label>
412 [% stat = request.status %]
413 [% current_alias = request.status_alias %]
414 <select id="status_alias" name="status_alias">
415 [% IF !current_alias %]
416 <option value="" selected>
420 [% request.capabilities.$stat.name | html %]
422 [% FOREACH alias IN AuthorisedValues.Get('ILL_STATUS_ALIAS') %]
423 [% IF alias.authorised_value == current_alias %]
424 <option value="[% alias.authorised_value | html %]" selected>
426 <option value="[% alias.authorised_value | html %]">
428 [% alias.lib | html %]
434 <label class="updated">Last updated:</label>
435 [% request.updated | $KohaDates with_hours => 1 %]
438 <label class="medium">Request type:</label>
439 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
442 <label class="cost">Cost:</label>
443 [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
445 <li class="price_paid">
446 <label class="price_paid">Price paid:</label>
447 <input name="price_paid" id="price_paid" type="text" value="[% request.price_paid | html %]">
450 <label class="req_id">Request ID:</label>
451 [% request.id_prefix _ request.illrequest_id | html %]
453 <li class="notesstaff">
454 <label for="notesstaff" class="notesstaff">Staff notes:</label>
455 <textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff | html %]</textarea>
457 <li class="notesopac">
458 <label for="notesopac" class="notesopac">OPAC notes:</label>
459 <textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac | html %]</textarea>
463 <fieldset class="action">
464 <input type="hidden" value="edit_action" name="method">
465 <input type="hidden" value="form" name="stage">
466 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
467 <input type="submit" class="btn btn-primary" value="Submit" />
468 <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% request.id | html %]">Cancel</a>
472 [% ELSIF query_type == 'delete_confirm' %]
474 <div class="dialog alert">
475 <h3>Are you sure you wish to delete this request?</h3>
476 <form action="/cgi-bin/koha/ill/ill-requests.pl" method="post">
477 <input type="hidden" name="method" value="delete" />
478 <input type="hidden" name="confirmed" value="1" />
479 <input type="hidden" name="illrequest_id" value="[% request.id | html %]" />
480 <button type="submit" class="btn btn-default approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
482 <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-times"></i>No, do not delete</a>
485 [% ELSIF query_type == 'illview' %]
486 [% IF whole.template.length > 0 %]
487 [% PROCESS $whole.template %]
489 [% req_status = request.status %]
492 [% IF error == 'migrate_target' %]
494 The backend you tried to migrate to does not yet support migrations, please try again with an alternative target.
499 [% IF tran_success %]
500 [% succ_methods = [] %]
501 [% IF tran_success.match('email') %]
502 [% succ_methods.push('email') %]
504 [% IF tran_success.match('sms') %]
505 [% succ_methods.push('SMS') %]
508 The requested notice was queued for delivery by [% succ_methods.join(', ') | html %]
512 [% fail_methods = [] %]
513 [% IF tran_fail.match('email') %]
514 [% fail_methods.push('email') %]
516 [% IF tran_fail.match('sms') %]
517 [% fail_methods.push('SMS') %]
520 The requested notice was NOT queued for delivery by [% fail_methods.join(', ') | html %]
524 <h1>Manage ILL request</h1>
525 <div id="request-toolbar" class="btn-toolbar">
526 <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 %]">
527 <i class="fa-solid fa-pencil" aria-hidden="true"></i>
530 [% FOREACH action IN request.available_actions %]
531 [% needs_prefs = action.needs_prefs.size ? action.needs_prefs : [] %]
532 [% needs_perms = action.needs_perms.size ? action.needs_perms : [] %]
533 [% needs_all = action.needs_all.size ? action.needs_all : [] %]
534 [% has_prefs_count = 0 %]
535 [% has_perms_count = 0 %]
536 [% has_all_count = 0 %]
537 [% FOREACH pref IN needs_prefs %]
538 [% IF Koha.Preference(pref) %]
539 [% has_prefs_count = has_prefs_count + 1 %]
542 [% FOREACH perm IN needs_perms %]
543 [% perm_name = 'CAN_' _ perm %]
544 [% IF ($perm_name) %]
545 [% has_perms_count = has_perms_count + 1 %]
548 [% FOREACH func IN needs_all %]
549 [% IF func(request) %]
550 [% has_all_count = has_all_count + 1 %]
553 [% NEXT IF has_prefs_count < needs_prefs.size || has_perms_count < needs_perms.size || has_all_count < needs_all.size %]
554 [% IF action.method == 'migrate' %]
555 [% IF backends.size > 2 %]
556 <div class="dropdown btn-group">
557 <button class="btn btn-default dropdown-toggle" type="button" id="ill-migrate-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
558 <i class="fa [% action.ui_method_icon | html %]"></i> [% action.ui_method_name | html %] <span class="caret"></span>
560 <ul class="dropdown-menu" aria-labelledby="ill-migrate-dropdown">
561 [% FOREACH backend IN backends %]
562 [% IF backend != request.backend %]
563 <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>
568 [% ELSIF backends.size == 2 %]
569 [% FOREACH backend IN backends %]
570 [% IF backend != request.backend %]
571 <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 %]">
572 <span class="fa [% action.ui_method_icon | html %]"></span>
573 [% action.ui_method_name | html %]
578 [% ELSIF action.method != 0 %]
579 <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 %]">
580 <span class="fa [% action.ui_method_icon | html %]"></span>
581 [% action.ui_method_name | html %]
585 <div class="dropdown btn-group">
586 <button class="btn btn-default dropdown-toggle" type="button" id="ill-notice-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
587 <i class="fa-solid fa-envelope"></i> Send notice to patron <span class="caret"></span>
589 <ul class="dropdown-menu" aria-labelledby="ill-notice-dropdown">
590 [% FOREACH notice IN notices %]
591 <li><a href="/cgi-bin/koha/ill/ill-requests.pl?method=send_notice&illrequest_id=[% request.illrequest_id | uri %]&notice_code=[% notice.code | uri %]">[% notice.name | html %]</a></li>
595 <a title="Display supplier metadata" id="ill-request-display-metadata" class="btn btn-default pull-right" href="#">
596 <span class="fa-solid fa-eye"></span>
597 Display supplier metadata
599 <a title="ILL request log" id="ill-request-display-log" class="btn btn-default pull-right" href="#">
600 <span class="fa-solid fa-calendar-days"></span>
604 <div class="page-section">
605 <h3>Request details</h3>
606 <h4>Details from library</h4>
610 <span class="label orderid">Order ID:</span>
611 [% IF request.orderid %][% request.orderid | html %][% ELSE %]<span>N/A</span>[% END %]
613 <li class="borrowernumber">
614 <span class="label borrowernumber">Patron:</span>
615 [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %]
616 <a href="[% borrowerlink | url %]" title="View borrower details">
617 [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %]
621 <li class="biblio_id">
622 <span class="label biblio_id">Bibliographic record ID:</span>
623 [% IF request.biblio_id %]
624 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% request.biblio_id | uri %]">[% request.biblio_id | html %]</a>
629 <li class="branchcode">
630 <span class="label branchcode">Library:</span>
631 [% Branches.GetName(request.branchcode) | html %]
634 <span class="label status">Status:</span>
635 [% IF request.statusalias %]
636 [% request.statusalias.lib | html %]
638 [% request.capabilities.$req_status.name | html%]
639 [% IF request.requested_partners.length > 0 %]
640 ([% request.requested_partners | html %])
645 <span class="label updated">Last updated:</span>
646 [% request.updated | $KohaDates with_hours => 1 %]
649 <span class="label medium">Request type:</span>
650 [% type = request.get_type %]
651 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
654 <span class="label cost">Cost:</span>
655 [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
657 <li class="price_paid">
658 <span class="label price_paid">Price paid:</span>
659 [% IF request.price_paid %][% request.price_paid | $Price %][% ELSE %]<span>N/A</span>[% END %]
662 <span class="label req_id">Request number:</span>
663 [% request.id_prefix _ request.illrequest_id | html %]
665 <li class="notesstaff">
666 <span class="label notes_staff">Staff notes:</span>
667 <p>[% request.notesstaff | html %]</p>
669 <li class="notesopac">
670 <span class="label notes_opac">Notes:</span>
671 <p>[% request.notesopac | html %]</p>
676 <h4>Details from supplier ([% request.backend | html %])</h4>
678 [% FOREACH meta IN request.metadata %]
679 <li class="requestmeta-[% meta.key.replace('\s','_') | html %]">
680 <span class="label">[% meta.key | html %]:</span>
681 [% meta.value | html %]
688 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
689 <div class="modal-dialog">
690 <div class="modal-content">
691 <div class="modal-header">
692 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
693 <h3 id="dataPreviewLabel"> Supplier metadata</h3>
695 <div class="modal-body">
696 <div id="requestattributes">
697 [% FOREACH attr IN request.illrequestattributes %]
698 <div class="requestattr-[% attr.type | html %]">
699 <span class="label">[% attr.type | html %]:</span>
700 [% attr.value | html %]
705 <div class="modal-footer">
706 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
712 <div id="requestLog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
713 <div class="modal-dialog">
714 <div class="modal-content">
715 <div class="modal-header">
716 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
717 <h3 id="requestLogLabel"> Request log</h3>
719 <div class="modal-body">
720 [% IF request.logs.size > 0 %]
721 [% FOREACH log IN request.logs %]
722 [% tpl = log.template %]
723 [% INCLUDE $tpl log=log %]
726 <span>There are no recorded logs for this request</span>
729 <div class="modal-footer">
730 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
736 <div class="page-section">
737 <h3>[% request.illcomments.count | html %] comments</h3>
738 [% IF request.illcomments.count && request.illcomments.count > 0 %]
739 [% FOREACH comment IN request.illcomments %]
740 <div class="rows comment_[% comment.patron.categorycode | html %]">
742 <a href="[% borrowerlink | url %]" title="View borrower details">
743 [% comment.patron.firstname _ " " _ comment.patron.surname _ " [" _ comment.patron.cardnumber _ "]" | html %]</a>
744 [% comment.timestamp | $KohaDates with_hours => 1 %]</h5>
745 <p>[% comment.comment | html %]</p>
750 <h3><a id="toggle_addcomment" href="#">Add comment</a></h3>
751 <div id="addcomment" class="content_hidden">
752 <form class="validated" method="post" action="/cgi-bin/koha/ill/ill-requests.pl">
753 <input type="hidden" value="save_comment" name="method">
754 <input type="hidden" value="[% csrf_token | html %]" name="csrf_token">
755 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
756 <fieldset class="rows">
759 <label class="required" for="comment">Comment: </label>
760 <textarea class="required" required="required" cols="80" rows="10" id="comment" name="comment"></textarea>
761 <span class="required">Required</span>
765 <fieldset class="action">
766 <input type="submit" class="btn btn-primary" value="Submit" />
773 [% ELSIF query_type == 'illlist' %]
775 <h1>View ILL requests</h1>
776 <div id="results" class="page-section">
777 <h2>Details for all requests</h2>
778 [% INCLUDE 'ill-list-table.inc' %]
779 </div> <!-- /#results -->
780 [% ELSIF query_type == 'availability' %]
781 <!-- availability -->
782 <h1>Availability</h1>
783 <div id="results" class="page-section">
784 <h3>Displaying availability results</h3>
785 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
786 [% FOREACH key IN whole.keys %]
787 [% value = whole.$key %]
788 [% IF key != 'method' && key != 'custom_key' && key != 'custom_value' %]
789 <input type="hidden" name="[% key | html %]" value="[% value | html %]">
792 [% custom_keys = whole.custom_key.split('\0') %]
793 [% custom_values = whole.custom_value.split('\0') %]
795 [% FOREACH custom_key IN custom_keys %]
796 <input type="hidden" name="custom_key" value="[% custom_key | html %]">
797 <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
800 <input type="hidden" name="method" value="create">
801 <input type="hidden" name="stage" value="form">
802 <input type="hidden" name="checked_availability" value="1">
803 <div id="continue-request-row" class="alert">
804 If you can't find what you are looking for, you can
805 <button class="button" type="submit">continue creating your request</button> or
806 <a href="/cgi-bin/koha/ill/ill-requests.pl">cancel your request</a>
809 [% FOR service IN services %]
810 <h4 class="ill_availability_sourcename">[% service.name | html %]</h4>
811 [% INCLUDE 'ill-availability-table.inc' service=service %]
815 <!-- Custom Backend Action -->
816 [% PROCESS $whole.template %]
820 </div> <!-- /#interlibraryloans -->
822 </div> <!-- /.col-sm-10 -->
823 </div> <!-- /.row -->
826 [% MACRO jsinclude BLOCK %]
827 [% INCLUDE 'datatables.inc' %]
828 [% INCLUDE 'js-biblio-format.inc' %]
829 [% INCLUDE 'js-patron-format.inc' %]
830 [% INCLUDE 'columns_settings.inc' %]
831 [% INCLUDE 'calendar.inc' %]
832 [% INCLUDE 'select2.inc' %]
834 var prefilters = '[% prefilters | $raw %]';
835 // Set column settings
836 var table_settings = [% TablesSettings.GetTableSettings( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) | $raw %];
838 [% IF services_json.length > 0 %]
839 var services = [% services_json | $raw %];
843 [% IF metadata.length > 0 %]
844 var metadata = "[% metadata | $raw %]";
848 $('#ill_checkout_inhouse_select').on('change', function() {
849 if ($(this).val().length > 0) {
850 $('.ill_checkout_due_date').hide();
852 $('.ill_checkout_due_date').show();
856 [% INCLUDE 'ill-list-table-strings.inc' %]
857 [% Asset.js("js/ill-list-table.js") | $raw %]
858 [% IF (query_type == 'availability' || query_type == 'generic_confirm') && Koha.Preference('ILLCheckAvailability') %]
859 [% Asset.js("js/ill-availability.js") | $raw %]
861 [% IF query_type == 'availability' && Koha.Preference('ILLCheckAvailability') %]
863 $(document).ready(function() {
868 [% IF query_type == 'generic_confirm' && Koha.Preference('ILLCheckAvailability') %]
869 [% Asset.js("js/ill-availability-partner.js") | $raw %]
875 [% PROCESS backend_jsinclude %]
879 [% INCLUDE 'intranet-bottom.inc' %]