4 [% SET article_requests_view = 1 %]
5 [% SET biblionumber = biblio.biblionumber %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Circulation › Request article</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
10 [% INCLUDE 'datatables.inc' %]
12 <script type="text/javascript">
14 $('#current-article-requests').ready(function() {
18 $(document).ready(function() {
19 $( "#patron" ).autocomplete({
20 source: "/cgi-bin/koha/circ/ysearch.pl",
22 select: function( event, ui ) {
23 $( "#patron" ).val( ui.item.cardnumber );
24 $( "#holds_patronsearch" ).submit();
28 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
29 return $( "<li></li>" )
30 .data( "ui-autocomplete-item", item )
31 .append( "<a>" + item.surname + ", " + item.firstname +
32 " (" + item.cardnumber + ") <small>" + item.address +
33 " " + item.city + " " + item.zipcode + " " +
34 item.country + "</small></a>" )
38 $( ".ar-update-branchcode" ).on('focus', function(){
39 previous_branchcode = this.value;
40 }).on('change', function(){
41 var branchcode = this.value;
42 var c = confirm(_("Are you sure you want to change the pickup library from %s to %s for this request?").format( previous_branchcode, branchcode ));
45 var id = this.id.split("branchcode-")[1];
46 $("#update-processing-" + id ).css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 200);
50 url: '/cgi-bin/koha/svc/article_request',
52 action: 'update_branchcode',
54 branchcode: branchcode,
56 success: function( data ) {
57 $("#update-processing-" + id ).css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);
63 this.value = previous_branchcode;
67 $(".ar-cancel-request").on("click", function(){
69 var notes = prompt(_("Reason for cancellation:"));
71 if ( notes != null ) {
72 var id = this.id.split("cancel-")[1];
73 $("#cancel-processing-" + id ).hide('slow');
74 $("#cancel-processing-spinner-" + id ).show('slow');
78 url: '/cgi-bin/koha/svc/article_request',
84 success: function( data ) {
85 a.parents('tr').hide('slow');
96 <body id="circ_request-article" class="circ">
97 [% INCLUDE 'header.inc' %]
98 [% INCLUDE 'circ-search.inc' %]
100 <div id="breadcrumbs">
101 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
103 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
105 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]">[% biblio.title | html %]</a>
110 <div id="doc3" class="yui-t2">
115 <h1>Request article from <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.id %]">[% biblio.title | html %]</a></h1>
116 [% IF no_patrons_found %]
117 <div class="dialog alert">
118 <h3>Patron not found</h3>
119 <p>No patron with this name, please, try another</p>
122 <form id="article_request_patron_results" method="post">
124 <table id="table_borrowers">
136 [% FOREACH patron IN patrons %]
138 <td><input type="radio" name="patron_id" value="[% patron.borrowernumber %]"/></td>
139 <td>[% patron.surname %], [% patron.firstname %]</td>
140 <td>[% patron.cardnumber %]</td>
141 <td>[% patron.categorycode %]</td>
142 <td>[% patron.branchcode %]</td>
143 <td>[% patron.address %]</td>
148 <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
149 <fieldset class="action"><input type="submit" value="Select" /></fieldset>
153 <form id="article_requests_patronsearch" action="request-article.pl" method="post">
154 <fieldset class="brief">
155 <label for="patron">Patron: </label>
156 <div class="hint">Enter patron card number or partial name:</div>
157 <input type="text" size="40" id="patron" class="focus" name="patron_cardnumber" />
158 <input type="submit" value="Search" />
159 <input type="hidden" name="biblionumber" value="[% biblio.id %]" />
163 [% IF biblio.can_article_request( patron ) %]
165 <form id="place-article-request" method="post" action="/cgi-bin/koha/circ/request-article.pl">
166 <input type="hidden" name="action" value="create" />
167 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber %]" />
168 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.id %]" />
170 <fieldset class="rows">
171 <legend>Place article request from [% biblio.title %] for [% patron.firstname %] [% patron.surname %] ( [% patron.cardnumber %] )</legend>
175 <label for="title">Title:</label>
176 <input type="text" name="title" id="title" size="50"/>
180 <label for="author">Author:</label>
181 <input type="text" name="author" id="author" size="50"/>
185 <label for="volume">Volume:</label>
186 <input type="text" name="volume" id="volume" size="50"/>
190 <label for="issue">Issue:</label>
191 <input type="text" name="issue" id="issue" size="50"/>
195 <label for="date">Date:</label>
196 <input type="text" name="date" id="date" size="50"/>
200 <label for="pages">Pages:</label>
201 <input type="text" name="pages" id="pages" size="50"/>
205 <label for="chapters">Chapters:</label>
206 <input type="text" name="chapters" id="chapters" size="50"/>
210 <label for="patron_notes">Patron notes:</label>
211 <input type="text" name="patron_notes" id="patron_notes" size="50"/>
215 <label for="branchcode">Pickup library:</label>
216 <select name="branchcode" id="branchcode">
217 [% FOREACH b IN Branches.all %]
218 [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
219 <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option>
221 <option value="[% b.branchcode %]">[% b.branchname %]</option>
229 [% SET article_request_type = biblio.article_request_type( patron ) %]
230 [% IF article_request_type != 'bib_only' %]
231 <table id="current-requests-table" class="ar-table table table-bordered table-striped">
232 <caption>Select item:</caption>
238 <th>Home library</th>
245 [% FOREACH item IN biblio.items %]
246 [% IF item.can_article_request( patron ) %]
249 [% IF article_request_type == 'item_only' && !checked %]
250 [% SET checked = 1 %]
251 <input type="radio" name="itemnumber" value="[% item.itemnumber %]" checked="checked" />
253 <input type="radio" name="itemnumber" value="[% item.itemnumber %]" />
257 [% ItemTypes.GetDescription( item.itype ) %]
263 [% Branches.GetName( item.homebranch ) %]
266 [% item.itemcallnumber %]
275 [% IF article_request_type != 'item_only' %]
278 <input type="radio" name="itemnumber" value="" checked="checked"/>
290 <input type="submit" class="btn" value="Place request" />
294 No article requests can be made for this record.
299 [% IF biblio.article_requests_current && !patron %]
300 <fieldset class="rows left" id="current-article-requests-fieldset">
301 <legend>Current article requests</legend>
303 <table id="current-article-requests-table">
314 <th>Patron notes</th>
317 <th>Pickup library</th>
321 [% FOREACH ar IN biblio.article_requests_current %]
323 <td>[% ar.created_on | $KohaDates %]</td>
324 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ar.borrowernumber %]">[% ar.borrower.firstname %] [% ar.borrower.surname %]</a></td>
325 <td>[% ar.title %]</td>
326 <td>[% ar.author %]</td>
327 <td>[% ar.volume %]</td>
328 <td>[% ar.issue %]</td>
329 <td>[% ar.date %]</td>
330 <td>[% ar.pages %]</td>
331 <td>[% ar.chapters %]</td>
332 <td>[% ar.patron_notes %]</td>
335 <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% ar.itemnumber %]&biblionumber=[% ar.biblionumber %]">[% ar.item.barcode %]</a>
339 [% IF ar.status == 'PENDING' %]
341 [% ELSIF ar.status == 'PROCESSING' %]
343 [% ELSIF ar.status == 'COMPLETED' %]
345 [% ELSIF ar.status == 'CANCELED' %]
350 <i id="update-processing-[% ar.id %]" class="fa fa-cog fa-spin hidden"></i>
351 <select name="branchcode" id="branchcode-[% ar.id %]" class="ar-update-branchcode">
352 [% FOREACH b IN Branches.all %]
353 [% IF b.branchcode == ar.branchcode %]
354 <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option>
356 <option value="[% b.branchcode %]">[% b.branchname %]</option>
362 <a title="Cancel article request" href="#" id="cancel-[% ar.id %]" class="ar-cancel-request">
363 <i id="cancel-processing-spinner-[% ar.id %]" class="fa fa-cog fa-spin hide"></i>
364 <i id="cancel-processing-[% ar.id %]" class="fa fa-times fa-lg" style="color:red"></i>
376 [% INCLUDE 'biblio-view-menu.inc' %]
380 [% INCLUDE 'intranet-bottom.inc' %]