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 id="doc3" class="yui-t2">
32 [% IF query_type == 'illlist' %]
33 <div id="illfilter_yui_column" class="yui-b">
34 <form method="get" id="illfilter_form">
35 <fieldset class="brief">
39 <label for="illfilter_status">Status:</label>
40 <select name="illfilter_status" id="illfilter_status">
41 <option value=""></option>
45 <label for="illfilter_dateplaced_start">Date placed between:</label>
46 <input type="text" name="illfilter_dateplaced_start" id="illfilter_dateplaced_start" class="datepicker" />
49 <label for="illfilter_dateplaced_end">and:</label>
50 <input type="text" name="illfilter_dateplaced_end" id="illfilter_dateplaced_end" class="datepicker" />
53 <label for="illfilter_datemodified_start">Updated between:</label>
54 <input type="text" name="illfilter_datemodified_start" id="illfilter_datemodified_start" class="datepicker" />
57 <label for="illfilter_datemodified_end">and:</label>
58 <input type="text" name="illfilter_datemodified_end" id="illfilter_datemodified_end" class="datepicker" />
61 <label for="illfilter_branchname">Library:</label>
62 <select name="illfilter_branchname" id="illfilter_branchname">
63 <option value=""></option>
67 <label for="illfilter_patron">Patron:</label>
68 <input type="text" name="illfilter_patron" id="illfilter_patron" />
71 <fieldset class="action">
72 <input type="submit" value="Search" />
73 <input type="button" value="Clear" id="clear_search" />
80 <div id="interlibraryloans" class="yui-b">
81 [% IF !backends_available || !has_branch %]
82 <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>
84 [% INCLUDE 'ill-toolbar.inc' %]
87 <h1>Error performing operation</h1>
88 <!-- Dispatch on Status -->
89 <p>We encountered an error:</p>
91 <pre>[% whole.message | html %] ([% whole.status | html %])</pre>
95 [% IF query_type == 'create' %]
96 <h1>New ILL request</h1>
97 [% PROCESS $whole.template %]
99 [% ELSIF query_type == 'confirm' %]
100 <h1>Confirm ILL request</h1>
101 [% PROCESS $whole.template %]
103 [% ELSIF query_type == 'cancel' and !whole.error %]
104 <h1>Cancel a confirmed request</h1>
105 [% PROCESS $whole.template %]
107 [% ELSIF query_type == 'generic_confirm' %]
108 <h1>Place request with partner libraries</h1>
110 [% IF error == 'no_target_email' %]
112 No target email addresses found. Either select at least
113 one partner or check your ILL partner library records.
115 [% ELSIF error == 'no_library_email' %]
117 Your library has no usable email address. Please set it.
119 [% ELSIF error == 'unkown_error' %]
121 Unknown error processing your request. Contact your administrator.
125 <!-- Start of GENERIC_EMAIL case -->
126 [% IF whole.value.partners %]
127 [% ill_url = "/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=" _ request.illrequest_id %]
128 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
129 <fieldset class="rows">
130 <legend>Interlibrary loan request details</legend>
133 <label for="partner_filter">Filter partner libraries:</label>
134 <input type="text" id="partner_filter" />
137 <label for="partners" class="required">Select partner libraries:</label>
138 <select size="5" multiple="true" id="partners" name="partners" required="required">
139 [% FOREACH partner IN whole.value.partners %]
140 <option value=[% partner.email | html %]>
141 [% partner.branchcode _ " - " _ partner.surname %]
148 <label for="subject" class="required">Subject line:</label>
149 <input type="text" name="subject" id="subject" type="text" value="[% whole.value.draft.subject | html %]" required="required" />
152 <label for="body" class="required">Email text:</label>
153 <textarea name="body" id="body" rows="20" cols="80" required="required">[% whole.value.draft.body | html %]</textarea>
156 <input type="hidden" value="generic_confirm" name="method">
157 <input type="hidden" value="draft" name="stage">
158 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
160 <fieldset class="action">
161 <input type="submit" class="btn btn-default" value="Send email"/>
162 <span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span>
166 <fieldset class="rows">
167 <legend>Interlibrary loan request details</legend>
168 <p>No partners have been defined yet. Please create appropriate patron records (by default ILLLIBS category).</p>
169 <p>Be sure to provide email addresses for these patrons.</p>
170 <p><span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span></p>
173 <!-- generic_confirm ends here -->
175 [% ELSIF query_type == 'edit_action' %]
176 <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
177 <fieldset class="rows">
178 <legend>Request details</legend>
180 [% type = request.get_type %]
181 <li class="borrowernumber">
182 <label for="borrowernumber">Patron ID:</label>
183 [% request.borrowernumber | html %]
185 <li class="biblio_id">
186 <label for="biblio_id" class="biblio_id">Bibliographic record ID:</label>
187 <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id | html %]">
189 <li class="branchcode">
190 <label for="library" class="branchcode">Library:</label>
191 <select name="branchcode" id="library">
192 [% PROCESS options_for_libraries libraries => Branches.all( selected => request.branchcode ) %]
196 <label class="status">Status:</label>
197 [% stat = request.status %]
198 [% current_alias = request.status_alias %]
199 <select id="status_alias" name="status_alias">
200 [% IF !current_alias %]
201 <option value="" selected>
205 [% request.capabilities.$stat.name | html %]
207 [% FOREACH alias IN AuthorisedValues.Get('ILLSTATUS') %]
208 [% IF alias.authorised_value == current_alias %]
209 <option value="[% alias.authorised_value | html %]" selected>
211 <option value="[% alias.authorised_value | html %]">
213 [% alias.lib | html %]
219 <label class="updated">Last updated:</label>
220 [% request.updated | $KohaDates with_hours => 1 %]
223 <label class="medium">Request type:</label>
224 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
227 <label class="cost">Cost:</label>
228 [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
230 <li class="price_paid">
231 <label class="price_paid">Price paid:</label>
232 <input name="price_paid" id="price_paid" type="text" value="[% request.price_paid | html %]">
235 <label class="req_id">Request number:</label>
236 [% request.id_prefix _ request.illrequest_id | html %]
238 <li class="notesstaff">
239 <label for="notesstaff" class="notesstaff">Staff notes:</label>
240 <textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff | html %]</textarea>
242 <li class="notesopac">
243 <label for="notesopac" class="notesopac">Opac notes:</label>
244 <textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac | html %]</textarea>
248 <fieldset class="action">
249 <input type="hidden" value="edit_action" name="method">
250 <input type="hidden" value="form" name="stage">
251 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
252 <input type="hidden" value="[% request.borrowernumber | html %]" name="borrowernumber">
253 <input type="submit" value="Submit">
254 <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% request.id | html %]">Cancel</a>
258 [% ELSIF query_type == 'delete_confirm' %]
260 <div class="dialog alert">
261 <h3>Are you sure you wish to delete this request?</h3>
262 <form action="/cgi-bin/koha/ill/ill-requests.pl" method="post">
263 <input type="hidden" name="method" value="delete" />
264 <input type="hidden" name="confirmed" value="1" />
265 <input type="hidden" name="illrequest_id" value="[% request.id | html %]" />
266 <button type="submit" class="btn btn-default approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
268 <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>
271 [% ELSIF query_type == 'illview' %]
272 [% req_status = request.status %]
275 [% IF error == 'migrate_target' %]
277 The backend you tried to migrate to does not yet support migrations, please try again with an alternative target.
282 <h1>Manage ILL request</h1>
283 <div id="request-toolbar" class="btn-toolbar">
284 <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 %]">
285 <span class="fa fa-pencil"></span>
288 [% FOREACH action IN request.available_actions %]
289 [% IF action.method == 'migrate' %]
290 [% IF backends.size > 2 %]
291 <div class="dropdown btn-group">
292 <button class="btn btn-default dropdown-toggle" type="button" id="ill-migrate-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
293 <i class="fa [% action.ui_method_icon | html %]"></i> [% action.ui_method_name | html %] <span class="caret"></span>
295 <ul class="dropdown-menu" aria-labelledby="ill-migrate-dropdown">
296 [% FOREACH backend IN backends %]
297 [% IF backend != request.backend %]
298 <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>
303 [% ELSIF backends.size == 2 %]
304 [% FOREACH backend IN backends %]
305 [% IF backend != request.backend %]
306 <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 %]">
307 <span class="fa [% action.ui_method_icon | html %]"></span>
308 [% action.ui_method_name | html %]
313 [% ELSIF action.method != 0 %]
314 <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 %]">
315 <span class="fa [% action.ui_method_icon | html %]"></span>
316 [% action.ui_method_name | html %]
320 <a title="Display supplier metadata" id="ill-request-display-metadata" class="btn btn-default pull-right" href="#">
321 <span class="fa fa-eye"></span>
322 Display supplier metadata
324 <a title="ILL request log" id="ill-request-display-log" class="btn btn-default pull-right" href="#">
325 <span class="fa fa-calendar"></span>
329 <div class="ill-view-panel panel panel-default">
330 <div class="panel-heading">
331 <h3>Request details</h3>
333 <div class="panel-body">
334 <h4>Details from library</h4>
338 <span class="label orderid">Order ID:</span>
339 [% IF request.orderid %][% request.orderid | html %][% ELSE %]<span>N/A</span>[% END %]
341 <li class="borrowernumber">
342 <span class="label borrowernumber">Patron:</span>
343 [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %]
344 <a href="[% borrowerlink | url %]" title="View borrower details">
345 [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %]
349 <li class="biblio_id">
350 <span class="label biblio_id">Bibliographic record ID:</span>
351 [% IF request.biblio_id %]
352 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% request.biblio_id | uri %]">[% request.biblio_id | html %]</a>
357 <li class="branchcode">
358 <span class="label branchcode">Library:</span>
359 [% Branches.GetName(request.branchcode) | html %]
362 <span class="label status">Status:</span>
363 [% IF request.statusalias %]
364 [% request.statusalias.lib | html %]
366 [% request.capabilities.$req_status.name | html%]
367 [% IF request.requested_partners.length > 0 %]
368 ([% request.requested_partners | html %])
373 <span class="label updated">Last updated:</span>
374 [% request.updated | $KohaDates with_hours => 1 %]
377 <span class="label medium">Request type:</span>
378 [% type = request.get_type %]
379 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
382 <span class="label cost">Cost:</span>
383 [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
385 <li class="price_paid">
386 <span class="label price_paid">Price paid:</span>
387 [% IF request.price_paid %][% request.price_paid | $Price %][% ELSE %]<span>N/A</span>[% END %]
390 <span class="label req_id">Request number:</span>
391 [% request.id_prefix _ request.illrequest_id | html %]
393 <li class="notesstaff">
394 <span class="label notes_staff">Staff notes:</span>
395 <p>[% request.notesstaff | html %]</p>
397 <li class="notesopac">
398 <span class="label notes_opac">Notes:</span>
399 <p>[% request.notesopac | html %]</p>
404 <h4>Details from supplier ([% request.backend | html %])</h4>
406 [% FOREACH meta IN request.metadata %]
407 <li class="requestmeta-[% meta.key.replace('\s','_') | html %]">
408 <span class="label">[% meta.key | html %]:</span>
409 [% meta.value | html %]
417 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
418 <div class="modal-dialog">
419 <div class="modal-content">
420 <div class="modal-header">
421 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
422 <h3 id="dataPreviewLabel"> Supplier metadata</h3>
424 <div class="modal-body">
425 <div id="requestattributes">
426 [% FOREACH attr IN request.illrequestattributes %]
427 <div class="requestattr-[% attr.type | html %]">
428 <span class="label">[% attr.type | html %]:</span>
429 [% attr.value | html %]
434 <div class="modal-footer">
435 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
441 <div id="requestLog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
442 <div class="modal-dialog">
443 <div class="modal-content">
444 <div class="modal-header">
445 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
446 <h3 id="requestLogLabel"> Request log</h3>
448 <div class="modal-body">
449 [% IF request.logs.size > 0 %]
450 [% FOREACH log IN request.logs %]
451 [% tpl = log.template %]
452 [% INCLUDE $tpl log=log %]
455 There are no recorded logs for this request
458 <div class="modal-footer">
459 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
465 <div class="ill-view-panel panel panel-default">
466 <div class="panel-heading">
467 <h3>[% request.illcomments.count | html %] comments</h3>
469 <div class="panel-body">
470 [% IF request.illcomments.count && request.illcomments.count > 0 %]
471 [% FOREACH comment IN request.illcomments %]
472 <div class="rows comment_[% comment.patron.categorycode | html %]">
474 <a href="[% borrowerlink | url %]" title="View borrower details">
475 [% comment.patron.firstname _ " " _ comment.patron.surname _ " [" _ comment.patron.cardnumber _ "]" | html %]</a>
476 [% comment.timestamp | $KohaDates with_hours => 1 %]</h5>
477 <p>[% comment.comment | html %]</p>
482 <h3><a id="toggle_addcomment" href="#">Add comment</a></h3>
483 <div id="addcomment" class="content_hidden">
484 <form class="validated" method="post" action="/cgi-bin/koha/ill/ill-requests.pl">
485 <input type="hidden" value="save_comment" name="method">
486 <input type="hidden" value="[% csrf_token | html %]" name="csrf_token">
487 <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id">
488 <fieldset class="rows">
491 <label class="required" for="comment">Comment: </label>
492 <textarea class="required" required="required" cols="80" rows="10" id="comment" name="comment"></textarea>
493 <span class="required">Required</span>
497 <fieldset class="action">
498 <input type="submit" value="Submit">
506 [% ELSIF query_type == 'illlist' %]
508 <h1>View ILL requests</h1>
510 <h3>Details for all requests</h3>
511 [% INCLUDE 'ill-list-table.inc' %]
515 <!-- Custom Backend Action -->
516 [% PROCESS $whole.template %]
524 [% MACRO jsinclude BLOCK %]
525 [% INCLUDE 'datatables.inc' %]
526 [% INCLUDE 'columns_settings.inc' %]
527 [% INCLUDE 'calendar.inc' %]
528 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
530 var prefilters = '[% prefilters | html %]';
531 // Set column settings
532 var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
534 [% INCLUDE 'ill-list-table-strings.inc' %]
535 [% Asset.js("js/ill-list-table.js") | $raw %]
539 [% PROCESS backend_jsinclude %]
543 [% INCLUDE 'intranet-bottom.inc' %]