4 [% USE AuthorisedValues %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Circulation › Article requests</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <style type="text/css"> p { margin-top: 0; }</style>
12 <body id="circ_article-requests" class="circ">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
16 <div id="breadcrumbs">
17 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
21 <a href="/cgi-bin/koha/circ/article-requests.pl">Article requests</a>
24 <div id="doc" class="yui-t7">
29 <h1>Article requests</h1>
31 <form id="ar-branchcode-form" method="post">
32 <select name="branchcode" id="branchcode">
33 <option value="">All libraries</option>
34 [% FOREACH b IN Branches.all %]
35 [% IF b.branchcode == branchcode %]
36 <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option>
38 <option value="[% b.branchcode %]">[% b.branchname %]</option>
42 <button type="submit" class="btn btn-default btn-sm" type="submit">
43 <i class="fa fa-refresh"></i> Update
47 <div id="article-request-tabs" class="toptabs">
50 <a href="#article-requests-pending">
51 Pending (<span id="ar_pending_count">[% article_requests_pending.count %]</span>)
56 <a href="#article-requests-processing">
57 Processing (<span id="ar_processing_count">[% article_requests_processing.count %]</span>)
62 <div id="article-requests-pending">
63 <table id="article-requests-pending-table">
66 <th class="ar-title">Title</th>
67 <th class="ar-request">Requested article</th>
68 <th class="ar-collection">Collection</th>
69 <th class="ar-itemtype">Item type</th>
70 <th class="ar-callnumber">Call number</th>
71 <th class="ar-copynumber">Copy number</th>
72 <th class="ar-enumchron">Enumeration</th>
73 <th class="ar-barcode">Barcode</th>
74 <th class="ar-patron">Patron</th>
75 <th class="ar-date">Date</th>
76 <th class="ar-actions">Actions</th>
81 <tr class="ar-pending-none">
83 There are no pending article requests at this time.
87 [% FOREACH ar IN article_requests_pending %]
88 <tr class="ar-row ar-pending">
91 <a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% ar.biblionumber %]">
92 <strong>[% ar.biblio.title | html %]</strong>
93 [% FOREACH s IN itemsloo.subtitle %] [% s %][% END %]
98 <div class="ar-biblionumber content_hidden">[% ar.biblionumber %]</div>
99 <div class="ar-author">[% ar.biblio.author %]</div>
100 <div class="ar-pubdata">
101 [% ar.biblio.biblioitem.publishercode %]
103 [% IF ar.biblio.biblioitem.publicationyear %]
104 [% ar.biblio.biblioitem.publicationyear %]
105 [% ELSIF ar.biblio.copyrightdate %]
106 [% ar.biblio.copyrightdate %]
109 [% IF ar.biblio.biblioitem.pages %]
110 : [% ar.biblio.biblioitem.pages %]
113 [% r.biblio.biblioitem.size %]
115 [% IF ar.biblio.biblioitem.isbn %]
116 ISBN: [% ar.biblio.biblioitem.isbn %]
121 <td class="ar-request">
122 [% IF ar.title %] <p><strong>Title:</strong> [% ar.title %] </p> [% END %]
123 [% IF ar.author %] <p><strong>Author:</strong> [% ar.author %] </p> [% END %]
124 [% IF ar.volume %] <p><strong>Volume:</strong> [% ar.volume %] </p> [% END %]
125 [% IF ar.issue %] <p><strong>Issue:</strong> [% ar.issue %] </p> [% END %]
126 [% IF ar.date %] <p><strong>Date:</strong> [% ar.date %] </p> [% END %]
127 [% IF ar.pages %] <p><strong>Pages:</strong> [% ar.pages %] </p> [% END %]
128 [% IF ar.chapters %] <p><strong>Chapters:</strong> [% ar.chapters %] </p> [% END %]
129 [% IF ar.patron_notes %] <p><strong>Patron notes:</strong> [% ar.patron_notes %] </p> [% END %]
131 <td class="ar-collection">[% AuthorisedValues.GetByCode( 'CCODE', ar.item.ccode ) %]</td>
132 <td class="ar-itemtype">[% ItemTypes.GetDescription( ar.item.effective_itemtype ) %]</td>
133 <td class="ar-callnumber">
134 [% IF ar.item.location %]
135 <em>[% AuthorisedValues.GetByCode( 'LOC', ar.item.location ) %]</em>
138 [% ar.item.itemcallnumber %]
140 <td class="ar-copynumber">[% ar.item.copynumber %]</td>
141 <td class="ar-enumchron">[% ar.item.enumchron %]</td>
142 <td class="ar-barcode">[% ar.item.barcode %]</td>
143 <td class="ar-patron">
145 <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% ar.borrower.cardnumber %]">
146 [% ar.borrower.surname %][% IF ar.borrower.firstname %], [% ar.borrower.firstname %][% END %] ([% ar.borrower.cardnumber %])
150 <p>[% ar.borrower.phone %]</p>
152 <td class="ar-date"><span title="[% ar.created_on %]">[% ar.created_on | $KohaDates %]</span></td>
153 <td class="ar-actions">
154 <div class="dropdown">
155 <a class="btn btn-default btn-xs dropdown-toggle" id="ar-actions" role="button" data-toggle="dropdown" href="#">
156 Actions <b class="caret"></b>
159 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="ar-actions">
161 <a class="ar-process-request" href="#" onclick="Process( [% ar.id %], $(this) ); return false;">
162 <i class="fa fa-cog"></i>
166 <a class="ar-complete-request" href="#" onclick="Complete( [% ar.id %], $(this) ); return false;">
167 <i class="fa fa-check-circle"></i>
171 <a class="ar-cancel-request" href="#" onclick="Cancel( [% ar.id %], $(this) ); return false;">
172 <i class="fa fa-minus-circle"></i>
176 <a class="ar-print-request" href="#" onclick="PrintSlip('article-request-slip.pl?id=[% ar.id %]'); return false;">
177 <i class="fa fa-print"></i>
190 <div id="article-requests-processing">
191 <table id="article-requests-processing-table">
194 <th class="ar-title">Title</th>
195 <th class="ar-request">Requested article</th>
196 <th class="ar-collection">Collection</th>
197 <th class="ar-itemtype">Item type</th>
198 <th class="ar-callnumber">Call number</th>
199 <th class="ar-copynumber">Copy number</th>
200 <th class="ar-enumchron">Enumeration</th>
201 <th class="ar-barcode">Barcode</th>
202 <th class="ar-patron">Patron</th>
203 <th class="ar-date">Date</th>
204 <th class="ar-actions">Actions</th>
209 <tr class="ar-processing-none">
211 There are no article requests in processing at this time.
215 [% FOREACH ar IN article_requests_processing %]
216 <tr class="ar-row ar-processing">
217 <td class="ar-title">
219 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% ar.biblionumber %]">
220 <strong>[% ar.biblio.title | html %]</strong>
221 [% FOREACH s IN itemsloo.subtitle %] [% s %][% END %]
226 <div class="ar-biblionumber content_hidden">[% ar.biblionumber %]</div>
227 <div class="ar-author">[% ar.biblio.author %]</div>
228 <div class="ar-pubdata">
229 [% ar.biblio.biblioitem.publishercode %]
231 [% IF ar.biblio.biblioitem.publicationyear %]
232 [% ar.biblio.biblioitem.publicationyear %]
233 [% ELSIF ar.biblio.copyrightdate %]
234 [% ar.biblio.copyrightdate %]
237 [% IF ar.biblio.biblioitem.pages %]
238 : [% ar.biblio.biblioitem.pages %]
241 [% r.biblio.biblioitem.size %]
243 [% IF ar.biblio.biblioitem.isbn %]
244 ISBN: [% ar.biblio.biblioitem.isbn %]
249 <td class="ar-request">
250 [% IF ar.title %] <p><strong>Title:</strong> [% ar.title %] </p> [% END %]
251 [% IF ar.author %] <p><strong>Author:</strong> [% ar.author %] </p> [% END %]
252 [% IF ar.volume %] <p><strong>Volume:</strong> [% ar.volume %] </p> [% END %]
253 [% IF ar.issue %] <p><strong>Issue:</strong> [% ar.issue %] </p> [% END %]
254 [% IF ar.date %] <p><strong>Date:</strong> [% ar.date %] </p> [% END %]
255 [% IF ar.pages %] <p><strong>Pages:</strong> [% ar.pages %] </p> [% END %]
256 [% IF ar.chapters %] <p><strong>Chapters:</strong> [% ar.chapters %] </p> [% END %]
257 [% IF ar.patron_notes %] <p><strong>Patron notes:</strong> [% ar.patron_notes %] </p> [% END %]
259 <td class="ar-collection">[% AuthorisedValues.GetByCode( 'CCODE', ar.item.ccode ) %]</td>
260 <td class="ar-itemtype">[% ItemTypes.GetDescription( ar.item.effective_itemtype ) %]</td>
261 <td class="ar-callnumber">
262 [% IF ar.item.location %]
263 <em>[% AuthorisedValues.GetByCode( 'LOC', ar.item.location ) %]</em>
266 [% ar.item.itemcallnumber %]
268 <td class="ar-copynumber">[% ar.item.copynumber %]</td>
269 <td class="ar-enumchron">[% ar.item.enumchron %]</td>
270 <td class="ar-barcode">[% ar.item.barcode %]</td>
271 <td class="ar-patron">
273 <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% ar.borrower.cardnumber %]">
274 [% ar.borrower.surname %][% IF ar.borrower.firstname %], [% ar.borrower.firstname %][% END %] ([% ar.borrower.cardnumber %])
278 <p>[% ar.borrower.phone %]</p>
280 <td class="ar-date"><span title="[% ar.created_on %]">[% ar.created_on | $KohaDates %]</span></td>
281 <td class="ar-actions">
282 <div class="dropdown">
283 <a class="btn btn-default btn-xs dropdown-toggle" id="ar-actions" role="button" data-toggle="dropdown" href="#">
284 Actions <b class="caret"></b>
287 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="ar-actions">
289 <a href="#" onclick="Complete( [% ar.id %], $(this) ); return false;">
290 <i class="icon-ok-circle"></i>
294 <a href="#" onclick="Cancel( [% ar.id %], $(this) ); return false;">
295 <i class="icon-remove-circle"></i>
299 <a href="#" onclick="PrintSlip('article-request-slip.pl?id=[% ar.id %]'); return false;">
300 <i class="icon-print"></i>
317 [% MACRO jsinclude BLOCK %]
318 <script type="text/javascript">
319 $(document).ready(function() {
320 $('#article-request-tabs').tabs();
322 [% IF article_requests_pending.count %]
323 $(".ar-pending-none").hide();
326 [% IF article_requests_processing.count %]
327 $(".ar-processing-none").hide();
331 function PrintSlip(link) {
332 window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
335 function Cancel( id, a ) {
336 notes = prompt(_("Reason for cancellation:"));
337 if ( notes == null ) {
341 a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
342 a.closest('div').hide();
345 url: '/cgi-bin/koha/svc/article_request',
351 success: function( data ) {
352 a.closest('tr').remove();
359 function Process( id, a ) {
360 var table_row = a.closest('tr').clone();
361 table_row.find('.ar-process-request').remove();
363 a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
364 a.closest('div').hide();
367 url: '/cgi-bin/koha/svc/article_request',
372 success: function( data ) {
373 a.closest('tr').remove();
374 $("#article-requests-processing-table").append( table_row );
375 $("#article-requests-processing-table .ar-processing-none").hide();
382 function Complete( id, a ) {
383 a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
384 a.closest('div').hide();
387 url: '/cgi-bin/koha/svc/article_request',
392 success: function( data ) {
393 a.closest('tr').remove();
400 function UpdateTabCounts() {
401 var pending_count = $('#article-requests-pending-table tbody tr.ar-row').length;
402 $("#ar_pending_count").html( pending_count );
403 if ( pending_count == 0 ) $(".ar-pending-none").show();
405 var processing_count = $('#article-requests-processing-table tbody tr.ar-row').length;
406 $("#ar_processing_count").html( processing_count );
407 if ( processing_count == 0 ) $(".ar-processing-none").show();
412 [% INCLUDE 'intranet-bottom.inc' %]