|
Line 0
Link Here
|
|
|
1 |
[% USE KohaDates %] |
| 2 |
[% USE ItemTypes %] |
| 3 |
[% USE Branches %] |
| 4 |
[% USE AuthorisedValues %] |
| 5 |
|
| 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> |
| 10 |
</head> |
| 11 |
|
| 12 |
<body id="circ_view_holdsqueue" class="circ"> |
| 13 |
[% INCLUDE 'header.inc' %] |
| 14 |
[% INCLUDE 'cat-search.inc' %] |
| 15 |
|
| 16 |
<script type="text/javascript">//<![CDATA[ |
| 17 |
$(document).ready(function() { |
| 18 |
$('#article-request-tabs').tabs(); |
| 19 |
|
| 20 |
[% IF article_requests_pending.count %] |
| 21 |
$(".ar-pending-none").hide(); |
| 22 |
[% END %] |
| 23 |
|
| 24 |
[% IF article_requests_processing.count %] |
| 25 |
$(".ar-processing-none").hide(); |
| 26 |
[% END %] |
| 27 |
}); |
| 28 |
|
| 29 |
function PrintSlip(link) { |
| 30 |
window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
| 31 |
} |
| 32 |
|
| 33 |
function Cancel( id, a ) { |
| 34 |
notes = prompt(_("Reason for cancelation:")); |
| 35 |
if ( notes == null ) { |
| 36 |
return; |
| 37 |
} |
| 38 |
|
| 39 |
a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/loading-small.gif"/>'); |
| 40 |
a.closest('div').hide(); |
| 41 |
$.ajax({ |
| 42 |
type: "POST", |
| 43 |
url: '/cgi-bin/koha/svc/article_request', |
| 44 |
data: { |
| 45 |
action: 'cancel', |
| 46 |
id: id, |
| 47 |
notes: notes |
| 48 |
}, |
| 49 |
success: function( data ) { |
| 50 |
a.closest('tr').remove(); |
| 51 |
UpdateTabCounts() |
| 52 |
}, |
| 53 |
dataType: 'json' |
| 54 |
}); |
| 55 |
} |
| 56 |
|
| 57 |
function Process( id, a ) { |
| 58 |
var table_row = a.closest('tr').clone(); |
| 59 |
table_row.find('.ar-process-request').remove(); |
| 60 |
|
| 61 |
a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/loading-small.gif"/>'); |
| 62 |
a.closest('div').hide(); |
| 63 |
$.ajax({ |
| 64 |
type: "POST", |
| 65 |
url: '/cgi-bin/koha/svc/article_request', |
| 66 |
data: { |
| 67 |
action: 'process', |
| 68 |
id: id, |
| 69 |
}, |
| 70 |
success: function( data ) { |
| 71 |
a.closest('tr').remove(); |
| 72 |
$("#article-requests-processing-table").append( table_row ); |
| 73 |
$("#article-requests-processing-table .ar-processing-none").hide(); |
| 74 |
UpdateTabCounts() |
| 75 |
}, |
| 76 |
dataType: 'json' |
| 77 |
}); |
| 78 |
} |
| 79 |
|
| 80 |
function Complete( id, a ) { |
| 81 |
a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/loading-small.gif"/>'); |
| 82 |
a.closest('div').hide(); |
| 83 |
$.ajax({ |
| 84 |
type: "POST", |
| 85 |
url: '/cgi-bin/koha/svc/article_request', |
| 86 |
data: { |
| 87 |
action: 'complete', |
| 88 |
id: id, |
| 89 |
}, |
| 90 |
success: function( data ) { |
| 91 |
a.closest('tr').remove(); |
| 92 |
UpdateTabCounts() |
| 93 |
}, |
| 94 |
dataType: 'json' |
| 95 |
}); |
| 96 |
} |
| 97 |
|
| 98 |
function UpdateTabCounts() { |
| 99 |
var pending_count = $('#article-requests-pending-table tbody tr.ar-row').length; |
| 100 |
$("#ar_pending_count").html( pending_count ); |
| 101 |
if ( pending_count == 0 ) $(".ar-pending-none").show(); |
| 102 |
|
| 103 |
var processing_count = $('#article-requests-processing-table tbody tr.ar-row').length; |
| 104 |
$("#ar_processing_count").html( processing_count ); |
| 105 |
if ( processing_count == 0 ) $(".ar-processing-none").show(); |
| 106 |
} |
| 107 |
//]]></script> |
| 108 |
|
| 109 |
<div id="breadcrumbs"> |
| 110 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
| 111 |
› |
| 112 |
<a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> |
| 113 |
› |
| 114 |
<a href="/cgi-bin/koha/circ/article-requests.pl">Article requests</a> |
| 115 |
</div> |
| 116 |
|
| 117 |
<div id="doc" class="yui-t7"> |
| 118 |
<div id="bd"> |
| 119 |
<div id="yui-main"> |
| 120 |
<div class="yui-g"> |
| 121 |
|
| 122 |
<h1>Article requests</h1> |
| 123 |
|
| 124 |
<form id="ar-branchcode-form" method="post"> |
| 125 |
<select name="branchcode" id="branchcode"> |
| 126 |
<option value="">All libraries</option> |
| 127 |
[% FOREACH b IN Branches.all %] |
| 128 |
[% IF b.branchcode == branchcode %] |
| 129 |
<option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option> |
| 130 |
[% ELSE %] |
| 131 |
<option value="[% b.branchcode %]">[% b.branchname %]</option> |
| 132 |
[% END %] |
| 133 |
[% END %] |
| 134 |
</select> |
| 135 |
<button type="submit" class="btn btn-small" type="submit"> |
| 136 |
<i class="fa fa-refresh"></i> Update |
| 137 |
</button> |
| 138 |
</form> |
| 139 |
|
| 140 |
<div id="article-request-tabs" class="toptabs"> |
| 141 |
<ul> |
| 142 |
<li> |
| 143 |
<a href="#article-requests-pending"> |
| 144 |
Pending (<span id="ar_pending_count">[% article_requests_pending.count %]</span>) |
| 145 |
</a> |
| 146 |
</li> |
| 147 |
|
| 148 |
<li> |
| 149 |
<a href="#article-requests-processing"> |
| 150 |
Processing (<span id="ar_processing_count">[% article_requests_processing.count %]</span>) |
| 151 |
</a> |
| 152 |
</li> |
| 153 |
</ul> |
| 154 |
|
| 155 |
<div id="article-requests-pending"> |
| 156 |
<table id="article-requests-pending-table"> |
| 157 |
<thead> |
| 158 |
<tr> |
| 159 |
<th class="ar-title">Title</th> |
| 160 |
<th class="ar-request">Requested article</th> |
| 161 |
<th class="ar-collection">Collection</th> |
| 162 |
<th class="ar-itemtype">Item type</th> |
| 163 |
<th class="ar-callnumber">Call number</th> |
| 164 |
<th class="ar-copynumber">Copy number</th> |
| 165 |
<th class="ar-enumchron">Enumeration</th> |
| 166 |
<th class="ar-barcode">Barcode</th> |
| 167 |
<th class="ar-patron">Patron</th> |
| 168 |
<th class="ar-date">Date</th> |
| 169 |
<th class="ar-actions">Actions</th> |
| 170 |
</tr> |
| 171 |
</thead> |
| 172 |
|
| 173 |
<tbody> |
| 174 |
<tr class="ar-pending-none"> |
| 175 |
<td colspan="11"> |
| 176 |
There are no pending article requests at this time. |
| 177 |
</td> |
| 178 |
</tr> |
| 179 |
|
| 180 |
[% FOREACH ar IN article_requests_pending %] |
| 181 |
<tr class="ar-row ar-pending"> |
| 182 |
<td class="ar-title"> |
| 183 |
<p> |
| 184 |
<a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% ar.biblionumber %]"> |
| 185 |
<strong>[% ar.biblio.title | html %]</strong> |
| 186 |
[% FOREACH s IN itemsloo.subtitle %] [% s %][% END %] |
| 187 |
</a> |
| 188 |
</p> |
| 189 |
|
| 190 |
<p> |
| 191 |
<div class="ar-biblionumber content_hidden">[% ar.biblionumber %]</div> |
| 192 |
<div class="ar-author">[% ar.biblio.author %]</div> |
| 193 |
<div class="ar-pubdata"> |
| 194 |
[% ar.biblio.biblioitem.publishercode %] |
| 195 |
|
| 196 |
[% IF ar.biblio.biblioitem.publicationyear %] |
| 197 |
, [% ar.biblio.biblioitem.publicationyear %] |
| 198 |
[% ELSIF ar.biblio.copyrightdate %] |
| 199 |
, [% ar.biblio.copyrightdate %] |
| 200 |
[% END %] |
| 201 |
|
| 202 |
[% IF ar.biblio.biblioitem.pages %] |
| 203 |
: [% ar.biblio.biblioitem.pages %] |
| 204 |
[% END %] |
| 205 |
|
| 206 |
[% r.biblio.biblioitem.size %] |
| 207 |
|
| 208 |
[% IF ar.biblio.biblioitem.isbn %] |
| 209 |
ISBN: [% ar.biblio.biblioitem.isbn %] |
| 210 |
[% END %] |
| 211 |
</div> |
| 212 |
</p> |
| 213 |
</td> |
| 214 |
<td class="ar-request"> |
| 215 |
[% IF ar.title %] <p><strong>Title:</strong> [% ar.title %] </p> [% END %] |
| 216 |
[% IF ar.author %] <p><strong>Author:</strong> [% ar.author %] </p> [% END %] |
| 217 |
[% IF ar.volume %] <p><strong>Volume:</strong> [% ar.volume %] </p> [% END %] |
| 218 |
[% IF ar.issue %] <p><strong>Issue:</strong> [% ar.issue %] </p> [% END %] |
| 219 |
[% IF ar.date %] <p><strong>Date:</strong> [% ar.date %] </p> [% END %] |
| 220 |
[% IF ar.pages %] <p><strong>Pages:</strong> [% ar.pages %] </p> [% END %] |
| 221 |
[% IF ar.chapters %] <p><strong>Chapters:</strong> [% ar.chapters %] </p> [% END %] |
| 222 |
[% IF ar.patron_notes %] <p><strong>Patron notes:</strong> [% ar.patron_notes %] </p> [% END %] |
| 223 |
</td> |
| 224 |
<td class="ar-collection">[% AuthorisedValues.GetByCode( 'CCODE', ar.item.ccode ) %]</td> |
| 225 |
<td class="ar-itemtype">[% ItemTypes.GetDescription( ar.item.effective_itemtype ) %]</td> |
| 226 |
<td class="ar-callnumber"> |
| 227 |
[% IF ar.item.location %] |
| 228 |
<em>[% AuthorisedValues.GetByCode( 'LOC', ar.item.location ) %]</em> |
| 229 |
[% END %] |
| 230 |
|
| 231 |
[% ar.item.itemcallnumber %] |
| 232 |
</td> |
| 233 |
<td class="ar-copynumber">[% ar.item.copynumber %]</td> |
| 234 |
<td class="ar-enumchron">[% ar.item.enumchron %]</td> |
| 235 |
<td class="ar-barcode">[% ar.item.barcode %]</td> |
| 236 |
<td class="ar-patron"> |
| 237 |
<p> |
| 238 |
<a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% ar.borrower.cardnumber %]"> |
| 239 |
[% ar.borrower.surname %][% IF ar.borrower.firstname %], [% ar.borrower.firstname %][% END %] ([% ar.borrower.cardnumber %]) |
| 240 |
</a> |
| 241 |
</p> |
| 242 |
|
| 243 |
<p>[% ar.borrower.phone %]</p> |
| 244 |
</td> |
| 245 |
<td class="ar-date"><span title="[% ar.created_on %]">[% ar.created_on | $KohaDates %]</span></td> |
| 246 |
<td class="ar-actions"> |
| 247 |
<div class="dropdown"> |
| 248 |
<a class="btn btn-mini dropdown-toggle" id="ar-actions" role="button" data-toggle="dropdown" href="#"> |
| 249 |
Actions <b class="caret"></b> |
| 250 |
</a> |
| 251 |
|
| 252 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="ar-actions"> |
| 253 |
<li> |
| 254 |
<a class="ar-process-request" href="#" onclick="Process( [% ar.id %], $(this) ); return false;"> |
| 255 |
<i class="icon-ok-circle"></i> |
| 256 |
Process request |
| 257 |
</a> |
| 258 |
|
| 259 |
<a class="ar-complete-request" href="#" onclick="Complete( [% ar.id %], $(this) ); return false;"> |
| 260 |
<i class="icon-ok-circle"></i> |
| 261 |
Complete request |
| 262 |
</a> |
| 263 |
|
| 264 |
<a class="ar-cancel-request" href="#" onclick="Cancel( [% ar.id %], $(this) ); return false;"> |
| 265 |
<i class="icon-remove-circle"></i> |
| 266 |
Cancel request |
| 267 |
</a> |
| 268 |
|
| 269 |
<a class="ar-print-request" href="#" onclick="PrintSlip('article-request-slip.pl?id=[% ar.id %]'); return false;"> |
| 270 |
<i class="icon-print"></i> |
| 271 |
Print slip |
| 272 |
</a> |
| 273 |
</li> |
| 274 |
</ul> |
| 275 |
</div> |
| 276 |
</td> |
| 277 |
</tr> |
| 278 |
[% END %] |
| 279 |
</tbody> |
| 280 |
</table> |
| 281 |
</div> |
| 282 |
|
| 283 |
<div id="article-requests-processing"> |
| 284 |
<table id="article-requests-processing-table"> |
| 285 |
<thead> |
| 286 |
<tr> |
| 287 |
<th class="ar-title">Title</th> |
| 288 |
<th class="ar-request">Requested article</th> |
| 289 |
<th class="ar-collection">Collection</th> |
| 290 |
<th class="ar-itemtype">Item type</th> |
| 291 |
<th class="ar-callnumber">Call number</th> |
| 292 |
<th class="ar-copynumber">Copy number</th> |
| 293 |
<th class="ar-enumchron">Enumeration</th> |
| 294 |
<th class="ar-barcode">Barcode</th> |
| 295 |
<th class="ar-patron">Patron</th> |
| 296 |
<th class="ar-date">Date</th> |
| 297 |
<th class="ar-actions">Actions</th> |
| 298 |
</tr> |
| 299 |
</thead> |
| 300 |
|
| 301 |
<tbody> |
| 302 |
<tr class="ar-processing-none"> |
| 303 |
<td colspan="11"> |
| 304 |
There are no article requests in processing at this time. |
| 305 |
</td> |
| 306 |
</tr> |
| 307 |
|
| 308 |
[% FOREACH ar IN article_requests_processing %] |
| 309 |
<tr class="ar-row ar-processing"> |
| 310 |
<td class="ar-title"> |
| 311 |
<p> |
| 312 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% ar.biblionumber %]"> |
| 313 |
<strong>[% ar.biblio.title | html %]</strong> |
| 314 |
[% FOREACH s IN itemsloo.subtitle %] [% s %][% END %] |
| 315 |
</a> |
| 316 |
</p> |
| 317 |
|
| 318 |
<p> |
| 319 |
<div class="ar-biblionumber content_hidden">[% ar.biblionumber %]</div> |
| 320 |
<div class="ar-author">[% ar.biblio.author %]</div> |
| 321 |
<div class="ar-pubdata"> |
| 322 |
[% ar.biblio.biblioitem.publishercode %] |
| 323 |
|
| 324 |
[% IF ar.biblio.biblioitem.publicationyear %] |
| 325 |
, [% ar.biblio.biblioitem.publicationyear %] |
| 326 |
[% ELSIF ar.biblio.copyrightdate %] |
| 327 |
, [% ar.biblio.copyrightdate %] |
| 328 |
[% END %] |
| 329 |
|
| 330 |
[% IF ar.biblio.biblioitem.pages %] |
| 331 |
: [% ar.biblio.biblioitem.pages %] |
| 332 |
[% END %] |
| 333 |
|
| 334 |
[% r.biblio.biblioitem.size %] |
| 335 |
|
| 336 |
[% IF ar.biblio.biblioitem.isbn %] |
| 337 |
ISBN: [% ar.biblio.biblioitem.isbn %] |
| 338 |
[% END %] |
| 339 |
</div> |
| 340 |
</p> |
| 341 |
</td> |
| 342 |
<td class="ar-request"> |
| 343 |
[% IF ar.title %] <p><strong>Title:</strong> [% ar.title %] </p> [% END %] |
| 344 |
[% IF ar.author %] <p><strong>Author:</strong> [% ar.author %] </p> [% END %] |
| 345 |
[% IF ar.volume %] <p><strong>Volume:</strong> [% ar.volume %] </p> [% END %] |
| 346 |
[% IF ar.issue %] <p><strong>Issue:</strong> [% ar.issue %] </p> [% END %] |
| 347 |
[% IF ar.date %] <p><strong>Date:</strong> [% ar.date %] </p> [% END %] |
| 348 |
[% IF ar.pages %] <p><strong>Pages:</strong> [% ar.pages %] </p> [% END %] |
| 349 |
[% IF ar.chapters %] <p><strong>Chapters:</strong> [% ar.chapters %] </p> [% END %] |
| 350 |
[% IF ar.patron_notes %] <p><strong>Patron notes:</strong> [% ar.patron_notes %] </p> [% END %] |
| 351 |
</td> |
| 352 |
<td class="ar-collection">[% AuthorisedValues.GetByCode( 'CCODE', ar.item.ccode ) %]</td> |
| 353 |
<td class="ar-itemtype">[% ItemTypes.GetDescription( ar.item.effective_itemtype ) %]</td> |
| 354 |
<td class="ar-callnumber"> |
| 355 |
[% IF ar.item.location %] |
| 356 |
<em>[% AuthorisedValues.GetByCode( 'LOC', ar.item.location ) %]</em> |
| 357 |
[% END %] |
| 358 |
|
| 359 |
[% ar.item.itemcallnumber %] |
| 360 |
</td> |
| 361 |
<td class="ar-copynumber">[% ar.item.copynumber %]</td> |
| 362 |
<td class="ar-enumchron">[% ar.item.enumchron %]</td> |
| 363 |
<td class="ar-barcode">[% ar.item.barcode %]</td> |
| 364 |
<td class="ar-patron"> |
| 365 |
<p> |
| 366 |
<a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% ar.borrower.cardnumber %]"> |
| 367 |
[% ar.borrower.surname %][% IF ar.borrower.firstname %], [% ar.borrower.firstname %][% END %] ([% ar.borrower.cardnumber %]) |
| 368 |
</a> |
| 369 |
</p> |
| 370 |
|
| 371 |
<p>[% ar.borrower.phone %]</p> |
| 372 |
</td> |
| 373 |
<td class="ar-date"><span title="[% ar.created_on %]">[% ar.created_on | $KohaDates %]</span></td> |
| 374 |
<td class="ar-actions"> |
| 375 |
<div class="dropdown"> |
| 376 |
<a class="btn btn-mini dropdown-toggle" id="ar-actions" role="button" data-toggle="dropdown" href="#"> |
| 377 |
Actions <b class="caret"></b> |
| 378 |
</a> |
| 379 |
|
| 380 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="ar-actions"> |
| 381 |
<li> |
| 382 |
<a href="#" onclick="Complete( [% ar.id %], $(this) ); return false;"> |
| 383 |
<i class="icon-ok-circle"></i> |
| 384 |
Complete request |
| 385 |
</a> |
| 386 |
|
| 387 |
<a href="#" onclick="Cancel( [% ar.id %], $(this) ); return false;"> |
| 388 |
<i class="icon-remove-circle"></i> |
| 389 |
Cancel request |
| 390 |
</a> |
| 391 |
|
| 392 |
<a href="#" onclick="PrintSlip('article-request-slip.pl?id=[% ar.id %]'); return false;"> |
| 393 |
<i class="icon-print"></i> |
| 394 |
Print slip |
| 395 |
</a> |
| 396 |
</li> |
| 397 |
</ul> |
| 398 |
</div> |
| 399 |
</td> |
| 400 |
</tr> |
| 401 |
[% END %] |
| 402 |
</tbody> |
| 403 |
</table> |
| 404 |
</div> |
| 405 |
</div> |
| 406 |
</div> |
| 407 |
</div> |
| 408 |
</div> |
| 409 |
[% INCLUDE 'intranet-bottom.inc' %] |