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 class="main container-fluid">
26 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
28 <h1>Article requests</h1>
30 <form id="ar-branchcode-form" method="post">
31 <select name="branchcode" id="branchcode">
32 <option value="">All libraries</option>
33 [% FOREACH b IN Branches.all( only_from_group => 1 ) %]
34 [% IF b.branchcode == branchcode %]
35 <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option>
37 <option value="[% b.branchcode %]">[% b.branchname %]</option>
41 <button type="submit" class="btn btn-default btn-xs">
42 <i class="fa fa-refresh"></i> Update
46 <div id="article-request-tabs" class="toptabs">
49 <a href="#article-requests-pending">
50 Pending (<span id="ar_pending_count">[% article_requests_pending.count %]</span>)
55 <a href="#article-requests-processing">
56 Processing (<span id="ar_processing_count">[% article_requests_processing.count %]</span>)
61 <div id="article-requests-pending">
62 <table id="article-requests-pending-table">
65 <th class="ar-title">Title</th>
66 <th class="ar-request">Requested article</th>
67 <th class="ar-collection">Collection</th>
68 <th class="ar-itemtype">Item type</th>
69 <th class="ar-callnumber">Call number</th>
70 <th class="ar-copynumber">Copy number</th>
71 <th class="ar-enumchron">Enumeration</th>
72 <th class="ar-barcode">Barcode</th>
73 <th class="ar-patron">Patron</th>
74 <th class="ar-date">Date</th>
75 <th class="ar-actions">Actions</th>
80 <tr class="ar-pending-none">
82 There are no pending article requests at this time.
86 [% FOREACH ar IN article_requests_pending %]
87 <tr class="ar-row ar-pending">
90 <a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% ar.biblionumber %]">
91 <strong>[% ar.biblio.title | html %]</strong>
92 [% FOREACH s IN itemsloo.subtitle %] [% s %][% END %]
97 <div class="ar-biblionumber content_hidden">[% ar.biblionumber %]</div>
98 <div class="ar-author">[% ar.biblio.author %]</div>
99 <div class="ar-pubdata">
100 [% ar.biblio.biblioitem.publishercode %]
102 [% IF ar.biblio.biblioitem.publicationyear %]
103 [% ar.biblio.biblioitem.publicationyear %]
104 [% ELSIF ar.biblio.copyrightdate %]
105 [% ar.biblio.copyrightdate %]
108 [% IF ar.biblio.biblioitem.pages %]
109 : [% ar.biblio.biblioitem.pages %]
112 [% r.biblio.biblioitem.size %]
114 [% IF ar.biblio.biblioitem.isbn %]
115 ISBN: [% ar.biblio.biblioitem.isbn %]
120 <td class="ar-request">
121 [% IF ar.title %] <p><strong>Title:</strong> [% ar.title %] </p> [% END %]
122 [% IF ar.author %] <p><strong>Author:</strong> [% ar.author %] </p> [% END %]
123 [% IF ar.volume %] <p><strong>Volume:</strong> [% ar.volume %] </p> [% END %]
124 [% IF ar.issue %] <p><strong>Issue:</strong> [% ar.issue %] </p> [% END %]
125 [% IF ar.date %] <p><strong>Date:</strong> [% ar.date %] </p> [% END %]
126 [% IF ar.pages %] <p><strong>Pages:</strong> [% ar.pages %] </p> [% END %]
127 [% IF ar.chapters %] <p><strong>Chapters:</strong> [% ar.chapters %] </p> [% END %]
128 [% IF ar.patron_notes %] <p><strong>Patron notes:</strong> [% ar.patron_notes %] </p> [% END %]
130 <td class="ar-collection">[% AuthorisedValues.GetByCode( 'CCODE', ar.item.ccode ) %]</td>
131 <td class="ar-itemtype">[% ItemTypes.GetDescription( ar.item.effective_itemtype ) %]</td>
132 <td class="ar-callnumber">
133 [% IF ar.item.location %]
134 <em>[% AuthorisedValues.GetByCode( 'LOC', ar.item.location ) %]</em>
137 [% ar.item.itemcallnumber %]
139 <td class="ar-copynumber">[% ar.item.copynumber %]</td>
140 <td class="ar-enumchron">[% ar.item.enumchron %]</td>
141 <td class="ar-barcode">[% ar.item.barcode %]</td>
142 <td class="ar-patron">
144 <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% ar.borrower.cardnumber %]">
145 [% ar.borrower.surname %][% IF ar.borrower.firstname %], [% ar.borrower.firstname %][% END %] ([% ar.borrower.cardnumber %])
149 <p>[% ar.borrower.phone %]</p>
151 <td class="ar-date"><span title="[% ar.created_on %]">[% ar.created_on | $KohaDates %]</span></td>
152 <td class="ar-actions">
153 <div class="dropdown">
154 <a class="btn btn-default btn-xs dropdown-toggle" id="ar-actions" role="button" data-toggle="dropdown" href="#">
155 Actions <b class="caret"></b>
158 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="ar-actions">
160 <a class="ar-process-request" href="#" onclick="Process( [% ar.id %], $(this) ); return false;">
161 <i class="fa fa-cog"></i>
165 <a class="ar-complete-request" href="#" onclick="Complete( [% ar.id %], $(this) ); return false;">
166 <i class="fa fa-check-circle"></i>
170 <a class="ar-cancel-request" href="#" onclick="Cancel( [% ar.id %], $(this) ); return false;">
171 <i class="fa fa-minus-circle"></i>
175 <a class="ar-print-request" href="#" onclick="PrintSlip('article-request-slip.pl?id=[% ar.id %]'); return false;">
176 <i class="fa fa-print"></i>
189 <div id="article-requests-processing">
190 <table id="article-requests-processing-table">
193 <th class="ar-title">Title</th>
194 <th class="ar-request">Requested article</th>
195 <th class="ar-collection">Collection</th>
196 <th class="ar-itemtype">Item type</th>
197 <th class="ar-callnumber">Call number</th>
198 <th class="ar-copynumber">Copy number</th>
199 <th class="ar-enumchron">Enumeration</th>
200 <th class="ar-barcode">Barcode</th>
201 <th class="ar-patron">Patron</th>
202 <th class="ar-date">Date</th>
203 <th class="ar-actions">Actions</th>
208 <tr class="ar-processing-none">
210 There are no article requests in processing at this time.
214 [% FOREACH ar IN article_requests_processing %]
215 <tr class="ar-row ar-processing">
216 <td class="ar-title">
218 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% ar.biblionumber %]">
219 <strong>[% ar.biblio.title | html %]</strong>
220 [% FOREACH s IN itemsloo.subtitle %] [% s %][% END %]
225 <div class="ar-biblionumber content_hidden">[% ar.biblionumber %]</div>
226 <div class="ar-author">[% ar.biblio.author %]</div>
227 <div class="ar-pubdata">
228 [% ar.biblio.biblioitem.publishercode %]
230 [% IF ar.biblio.biblioitem.publicationyear %]
231 [% ar.biblio.biblioitem.publicationyear %]
232 [% ELSIF ar.biblio.copyrightdate %]
233 [% ar.biblio.copyrightdate %]
236 [% IF ar.biblio.biblioitem.pages %]
237 : [% ar.biblio.biblioitem.pages %]
240 [% r.biblio.biblioitem.size %]
242 [% IF ar.biblio.biblioitem.isbn %]
243 ISBN: [% ar.biblio.biblioitem.isbn %]
248 <td class="ar-request">
249 [% IF ar.title %] <p><strong>Title:</strong> [% ar.title %] </p> [% END %]
250 [% IF ar.author %] <p><strong>Author:</strong> [% ar.author %] </p> [% END %]
251 [% IF ar.volume %] <p><strong>Volume:</strong> [% ar.volume %] </p> [% END %]
252 [% IF ar.issue %] <p><strong>Issue:</strong> [% ar.issue %] </p> [% END %]
253 [% IF ar.date %] <p><strong>Date:</strong> [% ar.date %] </p> [% END %]
254 [% IF ar.pages %] <p><strong>Pages:</strong> [% ar.pages %] </p> [% END %]
255 [% IF ar.chapters %] <p><strong>Chapters:</strong> [% ar.chapters %] </p> [% END %]
256 [% IF ar.patron_notes %] <p><strong>Patron notes:</strong> [% ar.patron_notes %] </p> [% END %]
258 <td class="ar-collection">[% AuthorisedValues.GetByCode( 'CCODE', ar.item.ccode ) %]</td>
259 <td class="ar-itemtype">[% ItemTypes.GetDescription( ar.item.effective_itemtype ) %]</td>
260 <td class="ar-callnumber">
261 [% IF ar.item.location %]
262 <em>[% AuthorisedValues.GetByCode( 'LOC', ar.item.location ) %]</em>
265 [% ar.item.itemcallnumber %]
267 <td class="ar-copynumber">[% ar.item.copynumber %]</td>
268 <td class="ar-enumchron">[% ar.item.enumchron %]</td>
269 <td class="ar-barcode">[% ar.item.barcode %]</td>
270 <td class="ar-patron">
272 <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% ar.borrower.cardnumber %]">
273 [% ar.borrower.surname %][% IF ar.borrower.firstname %], [% ar.borrower.firstname %][% END %] ([% ar.borrower.cardnumber %])
277 <p>[% ar.borrower.phone %]</p>
279 <td class="ar-date"><span title="[% ar.created_on %]">[% ar.created_on | $KohaDates %]</span></td>
280 <td class="ar-actions">
281 <div class="dropdown">
282 <a class="btn btn-default btn-xs dropdown-toggle" id="ar-actions" role="button" data-toggle="dropdown" href="#">
283 Actions <b class="caret"></b>
286 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="ar-actions">
288 <a href="#" onclick="Complete( [% ar.id %], $(this) ); return false;">
289 <i class="icon-ok-circle"></i>
293 <a href="#" onclick="Cancel( [% ar.id %], $(this) ); return false;">
294 <i class="icon-remove-circle"></i>
298 <a href="#" onclick="PrintSlip('article-request-slip.pl?id=[% ar.id %]'); return false;">
299 <i class="icon-print"></i>
316 [% MACRO jsinclude BLOCK %]
317 <script type="text/javascript">
318 $(document).ready(function() {
319 $('#article-request-tabs').tabs();
321 [% IF article_requests_pending.count %]
322 $(".ar-pending-none").hide();
325 [% IF article_requests_processing.count %]
326 $(".ar-processing-none").hide();
330 function PrintSlip(link) {
331 window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
334 function Cancel( id, a ) {
335 notes = prompt(_("Reason for cancellation:"));
336 if ( notes == null ) {
340 a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
341 a.closest('div').hide();
344 url: '/cgi-bin/koha/svc/article_request',
350 success: function( data ) {
351 a.closest('tr').remove();
358 function Process( id, a ) {
359 var table_row = a.closest('tr').clone();
360 table_row.find('.ar-process-request').remove();
362 a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
363 a.closest('div').hide();
366 url: '/cgi-bin/koha/svc/article_request',
371 success: function( data ) {
372 a.closest('tr').remove();
373 $("#article-requests-processing-table").append( table_row );
374 $("#article-requests-processing-table .ar-processing-none").hide();
381 function Complete( id, a ) {
382 a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>');
383 a.closest('div').hide();
386 url: '/cgi-bin/koha/svc/article_request',
391 success: function( data ) {
392 a.closest('tr').remove();
399 function UpdateTabCounts() {
400 var pending_count = $('#article-requests-pending-table tbody tr.ar-row').length;
401 $("#ar_pending_count").html( pending_count );
402 if ( pending_count == 0 ) $(".ar-pending-none").show();
404 var processing_count = $('#article-requests-processing-table tbody tr.ar-row').length;
405 $("#ar_processing_count").html( processing_count );
406 if ( processing_count == 0 ) $(".ar-processing-none").show();
411 [% INCLUDE 'intranet-bottom.inc' %]