7 [% USE AuthorisedValues %]
8 [% USE ColumnsSettings %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › ILL requests</title>
12 [% INCLUDE 'doc-head-close.inc' %]
15 <body id="illrequests" class="ill">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'cat-search.inc' %]
19 <div id="breadcrumbs">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
21 <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
22 [% IF query_type == 'create' %]
24 [% ELSIF query_type == 'status' %]
29 <div id="doc3" class="yui-t2">
31 [% IF query_type == 'illlist' %]
32 <div id="illfilter_yui_column" class="yui-b">
33 <form method="get" id="illfilter_form">
34 <fieldset class="brief">
38 <label for="illfilter_status">Status:</label>
39 <select name="illfilter_status" id="illfilter_status">
40 <option value=""></option>
44 <label for="illfilter_dateplaced_start">Date placed between:</label>
45 <input type="text" name="illfilter_dateplaced_start" id="illfilter_dateplaced_start" class="datepicker" />
48 <label for="illfilter_dateplaced_end">and:</label>
49 <input type="text" name="illfilter_dateplaced_end" id="illfilter_dateplaced_end" class="datepicker" />
52 <label for="illfilter_datemodified_start">Updated between:</label>
53 <input type="text" name="illfilter_datemodified_start" id="illfilter_datemodified_start" class="datepicker" />
56 <label for="illfilter_datemodified_end">and:</label>
57 <input type="text" name="illfilter_datemodified_end" id="illfilter_datemodified_end" class="datepicker" />
60 <label for="illfilter_branchname">Library:</label>
61 <select name="illfilter_branchname" id="illfilter_branchname">
62 <option value=""></option>
66 <label for="illfilter_patron">Patron:</label>
67 <input type="text" name="illfilter_patron" id="illfilter_patron" />
70 <fieldset class="action">
71 <input type="submit" value="Search" />
72 <input type="button" value="Clear" id="clear_search" />
79 <div id="interlibraryloans" class="yui-b">
80 [% IF !backends_available || !has_branch %]
81 <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>
83 [% INCLUDE 'ill-toolbar.inc' %]
86 <h1>Error performing operation</h1>
87 <!-- Dispatch on Status -->
88 <p>We encountered an error:</p>
90 <pre>[% whole.message | html %] ([% whole.status | html %])</pre>
94 [% IF query_type == 'create' %]
95 <h1>New ILL request</h1>
96 [% PROCESS $whole.template %]
98 [% ELSIF query_type == 'confirm' %]
99 <h1>Confirm ILL request</h1>
100 [% PROCESS $whole.template %]
102 [% ELSIF query_type == 'cancel' and !whole.error %]
103 <h1>Cancel a confirmed request</h1>
104 [% PROCESS $whole.template %]
106 [% ELSIF query_type == 'generic_confirm' %]
107 <h1>Place request with partner libraries</h1>
109 [% IF error == 'no_target_email' %]
111 No target email addresses found. Either select at least
112 one partner or check your ILL partner library records.
114 [% ELSIF error == 'no_library_email' %]
116 Your library has no usable email address. Please set it.
118 [% ELSIF error == 'unkown_error' %]
120 Unknown error processing your request. Contact your administrator.
124 <!-- Start of GENERIC_EMAIL case -->
125 [% IF whole.value.partners %]
126 [% ill_url = "/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=" _ request.illrequest_id %]
127 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
128 <fieldset class="rows">
129 <legend>Interlibrary loan request details</legend>
132 <label for="partner_filter">Filter partner libraries:</label>
133 <input type="text" id="partner_filter" />
136 <label for="partners" class="required">Select partner libraries:</label>
137 <select size="5" multiple="true" id="partners" name="partners" required="required">
138 [% FOREACH partner IN whole.value.partners %]
139 <option value=[% partner.email | html %]>
140 [% partner.branchcode _ " - " _ partner.surname %]
147 <label for="subject" class="required">Subject line:</label>
148 <input type="text" name="subject" id="subject" type="text" value="[% whole.value.draft.subject | html %]" required="required" />
151 <label for="body" class="required">Email text:</label>
152 <textarea name="body" id="body" rows="20" cols="80" required="required">[% whole.value.draft.body | html %]</textarea>
155 <input type="hidden" value="generic_confirm" name="method">
156 <input type="hidden" value="draft" name="stage">
157 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
159 <fieldset class="action">
160 <input type="submit" class="btn btn-default" value="Send email"/>
161 <span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span>
165 <fieldset class="rows">
166 <legend>Interlibrary loan request details</legend>
167 <p>No partners have been defined yet. Please create appropriate patron records (by default ILLLIBS category).</p>
168 <p>Be sure to provide email addresses for these patrons.</p>
169 <p><span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span></p>
172 <!-- generic_confirm ends here -->
174 [% ELSIF query_type == 'edit_action' %]
175 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
176 <fieldset class="rows">
177 <legend>Request details</legend>
179 [% type = request.get_type %]
180 <li class="borrowernumber">
181 <label for="borrowernumber">Patron ID:</label>
182 [% request.borrowernumber | html %]
184 <li class="biblio_id">
185 <label for="biblio_id" class="biblio_id">Bibliographic record ID:</label>
186 <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id | html %]">
188 <li class="branchcode">
189 <label for="library" class="branchcode">Library:</label>
190 <select name="branchcode" id="library">
191 [% PROCESS options_for_libraries libraries => Branches.all( selected => request.branchcode ) %]
195 <label class="status">Status:</label>
196 [% stat = request.status %]
197 [% current_alias = request.status_alias %]
198 <select id="status_alias" name="status_alias">
199 [% IF !current_alias %]
200 <option value="" selected>
204 [% request.capabilities.$stat.name | html %]
206 [% FOREACH alias IN AuthorisedValues.Get('ILLSTATUS') %]
207 [% IF alias.authorised_value == current_alias %]
208 <option value="[% alias.authorised_value | html %]" selected>
210 <option value="[% alias.authorised_value | html %]">
212 [% alias.lib | html %]
218 <label class="updated">Last updated:</label>
219 [% request.updated | $KohaDates with_hours => 1 %]
222 <label class="medium">Request type:</label>
223 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
226 <label class="cost">Cost:</label>
227 [% IF request.cost %][% request.cost | html %][% ELSE %]<span>N/A</span>[% END %]
229 <li class="price_paid">
230 <label class="price_paid">Price paid:</label>
231 <input name="price_paid" id="price_paid" type="text" value="[% request.price_paid | html %]">
234 <label class="req_id">Request number:</label>
235 [% request.id_prefix _ request.illrequest_id | html %]
237 <li class="notesstaff">
238 <label for="notesstaff" class="notesstaff">Staff notes:</label>
239 <textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff | html %]</textarea>
241 <li class="notesopac">
242 <label for="notesopac" class="notesopac">Opac notes:</label>
243 <textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac | html %]</textarea>
247 <fieldset class="action">
248 <input type="hidden" value="edit_action" name="method">
249 <input type="hidden" value="form" name="stage">
250 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
251 <input type="hidden" value="[% request.borrowernumber | html %]" name="borrowernumber">
252 <input type="submit" value="Submit">
253 <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% request.id | html %]">Cancel</a>
257 [% ELSIF query_type == 'delete_confirm' %]
259 <div class="dialog alert">
260 <h3>Are you sure you wish to delete this request?</h3>
261 <form action="/cgi-bin/koha/ill/ill-requests.pl" method="post">
262 <input type="hidden" name="method" value="delete" />
263 <input type="hidden" name="confirmed" value="1" />
264 <input type="hidden" name="illrequest_id" value="[% request.id | html %]" />
265 <button type="submit" class="btn btn-default btn-sm approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
267 <a class="btn btn-default btn-sm 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>
270 [% ELSIF query_type == 'illview' %]
271 [% req_status = request.status %]
274 [% IF error == 'migrate_target' %]
276 The backend you tried to migrate to does not yet support migrations, please try again with an alternative target.
281 <h1>Manage ILL request</h1>
282 <div id="request-toolbar" class="btn-toolbar">
283 <a title="Edit request" id="ill-toolbar-btn-edit-action" class="btn btn-sm btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=edit_action&illrequest_id=[% request.illrequest_id | html %]">
284 <span class="fa fa-pencil"></span>
287 [% FOREACH action IN request.available_actions %]
288 [% IF action.method == 'migrate' %]
289 [% IF backends.size > 2 %]
290 <div class="dropdown btn-group">
291 <button class="btn btn-sm btn-default dropdown-toggle" type="button" id="ill-migrate-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
292 <i class="fa [% action.ui_method_icon | html %]"></i> [% action.ui_method_name | html %] <span class="caret"></span>
294 <ul class="dropdown-menu" aria-labelledby="ill-migrate-dropdown">
295 [% FOREACH backend IN backends %]
296 [% IF backend != request.backend %]
297 <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>
302 [% ELSIF backends.size == 2 %]
303 [% FOREACH backend IN backends %]
304 [% IF backend != request.backend %]
305 <a title="[% action.ui_method_name | html %]" id="ill-toolbar-btn-[% action.id | lower | html %]" class="btn btn-sm btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=[% action.method | uri %]&illrequest_id=[% request.illrequest_id | uri %]&backend=[% backend | uri %]">
306 <span class="fa [% action.ui_method_icon | html %]"></span>
307 [% action.ui_method_name | html %]
312 [% ELSIF action.method != 0 %]
313 <a title="[% action.ui_method_name | html %]" id="ill-toolbar-btn-[% action.id | lower | html %]" class="btn btn-sm btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=[% action.method | uri %]&illrequest_id=[% request.illrequest_id | uri %]">
314 <span class="fa [% action.ui_method_icon | html %]"></span>
315 [% action.ui_method_name | html %]
319 <a title="Display supplier metadata" id="ill-request-display-metadata" class="btn btn-sm btn-default pull-right" href="#">
320 <span class="fa fa-eye"></span>
321 Display supplier metadata
323 <a title="ILL request log" id="ill-request-display-log" class="btn btn-sm btn-default pull-right" href="#">
324 <span class="fa fa-calendar"></span>
328 <div class="ill-view-panel panel panel-default">
329 <div class="panel-heading">
330 <h3>Request details</h3>
332 <div class="panel-body">
333 <h4>Details from library</h4>
337 <span class="label orderid">Order ID:</span>
338 [% IF request.orderid %][% request.orderid | html %][% ELSE %]<span>N/A</span>[% END %]
340 <li class="borrowernumber">
341 <span class="label borrowernumber">Patron:</span>
342 [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %]
343 <a href="[% borrowerlink | url %]" title="View borrower details">
344 [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %]
348 <li class="biblio_id">
349 <span class="label biblio_id">Bibliographic record ID:</span>
350 [% IF request.biblio_id %]
351 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% request.biblio_id | uri %]">[% request.biblio_id | html %]</a>
356 <li class="branchcode">
357 <span class="label branchcode">Library:</span>
358 [% Branches.GetName(request.branchcode) | html %]
361 <span class="label status">Status:</span>
362 [% IF request.statusalias %]
363 [% request.statusalias.lib | html %]
365 [% request.capabilities.$req_status.name | html%]
366 [% IF request.requested_partners.length > 0 %]
367 ([% request.requested_partners | html %])
372 <span class="label updated">Last updated:</span>
373 [% request.updated | $KohaDates with_hours => 1 %]
376 <span class="label medium">Request type:</span>
377 [% type = request.get_type %]
378 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
381 <span class="label cost">Cost:</span>
382 [% IF request.cost %][% request.cost | html %][% ELSE %]<span>N/A</span>[% END %]
384 <li class="price_paid">
385 <span class="label price_paid">Price paid:</span>
386 [% IF request.price_paid %][% request.price_paid | html %][% ELSE %]<span>N/A</span>[% END %]
389 <span class="label req_id">Request number:</span>
390 [% request.id_prefix _ request.illrequest_id | html %]
392 <li class="notesstaff">
393 <span class="label notes_staff">Staff notes:</span>
394 <p>[% request.notesstaff | html %]</p>
396 <li class="notesopac">
397 <span class="label notes_opac">Notes:</span>
398 <p>[% request.notesopac | html %]</p>
403 <h4>Details from supplier ([% request.backend | html %])</h4>
405 [% FOREACH meta IN request.metadata %]
406 <li class="requestmeta-[% meta.key.replace('\s','_') | html %]">
407 <span class="label">[% meta.key | html %]:</span>
408 [% meta.value | html %]
416 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
417 <div class="modal-dialog">
418 <div class="modal-content">
419 <div class="modal-header">
420 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
421 <h3 id="dataPreviewLabel"> Supplier metadata</h3>
423 <div class="modal-body">
424 <div id="requestattributes">
425 [% FOREACH attr IN request.illrequestattributes %]
426 <div class="requestattr-[% attr.type | html %]">
427 <span class="label">[% attr.type | html %]:</span>
428 [% attr.value | html %]
433 <div class="modal-footer">
434 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
440 <div id="requestLog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
441 <div class="modal-dialog">
442 <div class="modal-content">
443 <div class="modal-header">
444 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
445 <h3 id="requestLogLabel"> Request log</h3>
447 <div class="modal-body">
448 [% IF request.logs.size > 0 %]
449 [% FOREACH log IN request.logs %]
450 [% tpl = log.template %]
451 [% INCLUDE $tpl log=log %]
454 There are no recorded logs for this request
457 <div class="modal-footer">
458 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
464 <div class="ill-view-panel panel panel-default">
465 <div class="panel-heading">
466 <h3>[% request.illcomments.count | html %] comments</h3>
468 <div class="panel-body">
469 [% IF request.illcomments.count && request.illcomments.count > 0 %]
470 [% FOREACH comment IN request.illcomments %]
471 <div class="rows comment_[% comment.patron.categorycode | html %]">
473 <a href="[% borrowerlink | url %]" title="View borrower details">
474 [% comment.patron.firstname _ " " _ comment.patron.surname _ " [" _ comment.patron.cardnumber _ "]" | html %]</a>
475 [% comment.timestamp | $KohaDates with_hours => 1 %]</h5>
476 <p>[% comment.comment | html %]</p>
481 <h3><a id="toggle_addcomment" href="#">Add comment</a></h3>
482 <div id="addcomment" class="content_hidden">
483 <form class="validated" method="post" action="/cgi-bin/koha/ill/ill-requests.pl">
484 <input type="hidden" value="save_comment" name="method">
485 <input type="hidden" value="[% csrf_token | html %]" name="csrf_token">
486 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
487 <fieldset class="rows">
490 <label class="required" for="comment">Comment: </label>
491 <textarea class="required" required="required" cols="80" rows="10" id="comment" name="comment"></textarea>
492 <span class="required">Required</span>
496 <fieldset class="action">
497 <input type="submit" value="Submit">
505 [% ELSIF query_type == 'illlist' %]
507 <h1>View ILL requests</h1>
509 <h3>Details for all requests</h3>
510 [% INCLUDE 'ill-list-table.inc' %]
514 <!-- Custom Backend Action -->
515 [% PROCESS $whole.template %]
523 [% MACRO jsinclude BLOCK %]
524 [% INCLUDE 'datatables.inc' %]
525 [% INCLUDE 'columns_settings.inc' %]
526 [% INCLUDE 'calendar.inc' %]
527 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
529 // Date format for datepickers
536 var dateFormat = dateMap['[% Koha.Preference('dateformat') | html %]'];
537 var prefilters = '[% prefilters | html %]';
538 // Set column settings
539 var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
541 [% INCLUDE 'ill-list-table-strings.inc' %]
542 [% Asset.js("js/ill-list-table.js") | $raw %]
546 [% PROCESS backend_jsinclude %]
550 [% INCLUDE 'intranet-bottom.inc' %]