Lines 8-16
Link Here
|
8 |
[% USE TablesSettings %] |
8 |
[% USE TablesSettings %] |
9 |
[% USE To %] |
9 |
[% USE To %] |
10 |
[% PROCESS 'html_helpers.inc' %] |
10 |
[% PROCESS 'html_helpers.inc' %] |
11 |
|
11 |
[% PROCESS 'i18n.inc' %] |
12 |
[% INCLUDE 'doc-head-open.inc' %] |
12 |
[% INCLUDE 'doc-head-open.inc' %] |
13 |
<title>Batch modify holds › Tools › Koha</title> |
13 |
[% FILTER collapse %] |
|
|
14 |
<title> [% t("Batch modify holds") | html %] › [% t("Tools") | html %] › [% t("Koha") | html %] </title> |
15 |
[% END %] |
14 |
[% INCLUDE 'doc-head-close.inc' %] |
16 |
[% INCLUDE 'doc-head-close.inc' %] |
15 |
[% Asset.css("css/humanmsg.css") | $raw %] |
17 |
[% Asset.css("css/humanmsg.css") | $raw %] |
16 |
</head> |
18 |
</head> |
Lines 25-36
Link Here
|
25 |
[% WRAPPER breadcrumb_item %] |
27 |
[% WRAPPER breadcrumb_item %] |
26 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> |
28 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> |
27 |
[% END %] |
29 |
[% END %] |
28 |
[% IF ( view == 'form' || view == 'report' ) %] |
30 |
[% IF ( view == 'report' ) %] |
29 |
[% WRAPPER breadcrumb_item %] |
31 |
[% WRAPPER breadcrumb_item %] |
30 |
<a href="/cgi-bin/koha/tools/batch_modify_holds.pl">Batch modify holds</a> |
32 |
<a href="/cgi-bin/koha/tools/batch_modify_holds.pl">Batch modify holds</a> |
31 |
[% END %] |
33 |
[% END %] |
32 |
[% ELSE %] |
|
|
33 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
34 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
|
|
35 |
<span>Modified holds</span> |
36 |
[% END %] |
37 |
[% ELSE %] |
38 |
[% WRAPPER breadcrumb_item %] |
34 |
<span>Batch modify holds</span> |
39 |
<span>Batch modify holds</span> |
35 |
[% END %] |
40 |
[% END %] |
36 |
[% END %] |
41 |
[% END %] |
Lines 41-48
Link Here
|
41 |
<div class="row"> |
46 |
<div class="row"> |
42 |
<div class="col-sm-10 col-sm-push-2 order-sm-1"> |
47 |
<div class="col-sm-10 col-sm-push-2 order-sm-1"> |
43 |
<main> |
48 |
<main> |
44 |
<h1>Batch modify holds</h1> |
|
|
45 |
[% IF view == "cud-form" %] |
49 |
[% IF view == "cud-form" %] |
|
|
50 |
<h1>Batch modify holds</h1> |
46 |
<div id="modify_holds_search"> |
51 |
<div id="modify_holds_search"> |
47 |
<form method="get" action="/cgi-bin/koha/tools/batch_modify_holds.pl" id="modify_holds_form"> |
52 |
<form method="get" action="/cgi-bin/koha/tools/batch_modify_holds.pl" id="modify_holds_form"> |
48 |
<fieldset class="rows"> |
53 |
<fieldset class="rows"> |
Lines 101-106
Link Here
|
101 |
</div> |
106 |
</div> |
102 |
<!-- /#modify_holds_search --> |
107 |
<!-- /#modify_holds_search --> |
103 |
[% ELSIF view == "report" %] |
108 |
[% ELSIF view == "report" %] |
|
|
109 |
<h1>Modified holds</h1> |
104 |
<div id="modified_holds_results-wrapper"> |
110 |
<div id="modified_holds_results-wrapper"> |
105 |
<div id="modified_holds_results" class="page-section"> |
111 |
<div id="modified_holds_results" class="page-section"> |
106 |
<table id="modified_holds"> |
112 |
<table id="modified_holds"> |
Lines 108-119
Link Here
|
108 |
<tr> |
114 |
<tr> |
109 |
<th>Title</th> |
115 |
<th>Title</th> |
110 |
<th>Patron</th> |
116 |
<th>Patron</th> |
111 |
<th>Pickup Location</th> |
117 |
<th>Pickup location</th> |
112 |
<th>Priority</th> |
118 |
<th>Priority</th> |
113 |
<th>Expiration Date</th> |
119 |
<th>Expiration date</th> |
114 |
<th>Status</th> |
120 |
<th>Status</th> |
115 |
<th>Suspended</th> |
121 |
<th>Suspended</th> |
116 |
<th>Suspended Until</th> |
122 |
<th>Suspended until</th> |
117 |
<th>Notes</th> |
123 |
<th>Notes</th> |
118 |
<!-- Add other columns as needed --> |
124 |
<!-- Add other columns as needed --> |
119 |
</tr> |
125 |
</tr> |
Lines 121-128
Link Here
|
121 |
<tbody> |
127 |
<tbody> |
122 |
[% FOREACH hold IN updated_holds_obj %] |
128 |
[% FOREACH hold IN updated_holds_obj %] |
123 |
<tr> |
129 |
<tr> |
124 |
<td>[% hold.biblio.title | html %]</td> |
130 |
<td>[% INCLUDE 'biblio-title.inc' biblio=hold.biblio link = 1 %]</td> |
125 |
<td>[% hold.borrower.firstname | html %] [% hold.borrower.surname | html %]</td> |
131 |
<td>[% INCLUDE 'patron-title.inc' invert_name=1 patron=hold.borrower hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]</td> |
126 |
<td>[% hold.branch.branchname | html %]</td> |
132 |
<td>[% hold.branch.branchname | html %]</td> |
127 |
<td>[% hold.priority | html %]</td> |
133 |
<td>[% hold.priority | html %]</td> |
128 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
134 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
Lines 247-252
Link Here
|
247 |
[% INCLUDE 'calendar.inc' %] |
253 |
[% INCLUDE 'calendar.inc' %] |
248 |
[% INCLUDE 'datatables.inc' %] |
254 |
[% INCLUDE 'datatables.inc' %] |
249 |
[% INCLUDE 'select2.inc' %] |
255 |
[% INCLUDE 'select2.inc' %] |
|
|
256 |
[% INCLUDE 'js-biblio-format.inc' %] |
250 |
[% INCLUDE 'js-patron-format.inc' %] |
257 |
[% INCLUDE 'js-patron-format.inc' %] |
251 |
[% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] |
258 |
[% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] |
252 |
<script> |
259 |
<script> |
Lines 347-353
Link Here
|
347 |
} |
354 |
} |
348 |
|
355 |
|
349 |
function search_holds(modify_holds_form){ |
356 |
function search_holds(modify_holds_form){ |
350 |
var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'holds_to_modify', 'json' ) | $raw %]; |
357 |
var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'batch_hold_modification', 'holds_to_modify', 'json' ) | $raw %]; |
351 |
var searchpattern = ""; |
358 |
var searchpattern = ""; |
352 |
var filters = { |
359 |
var filters = { |
353 |
"me.expirationdate": function(){ |
360 |
"me.expirationdate": function(){ |
Lines 410-421
Link Here
|
410 |
} |
417 |
} |
411 |
}, |
418 |
}, |
412 |
"me.suspend_until": function(){ |
419 |
"me.suspend_until": function(){ |
413 |
var suspend_until_from = modify_holds_form.find("#suspend_until_from").val(); |
420 |
var suspend_until_from = modify_holds_form.find("#suspend_until_from").val(); |
414 |
var suspend_until_to = modify_holds_form.find("#suspend_until_to").val(); |
421 |
var suspend_until_to = modify_holds_form.find("#suspend_until_to").val(); |
415 |
|
|
|
416 |
searchpattern += suspend_until_from && suspend_until_to ? _("suspend date between ")+ suspend_until_from +" and "+suspend_until_to : ""; |
417 |
|
422 |
|
418 |
return suspend_until_from && suspend_until_to ? {"-between": [suspend_until_from, suspend_until_to]} : ""; |
423 |
if (suspend_until_from && suspend_until_to){ |
|
|
424 |
searchpattern += _("suspend date between ") + suspend_until_from + " and " + suspend_until_to + " "; |
425 |
return {"-between": [suspend_until_from, suspend_until_to]}; |
426 |
} |
427 |
else if (suspend_until_from && !suspend_until_to){ |
428 |
searchpattern += _("suspend date from ") + suspend_until_from + " "; |
429 |
return {">=": suspend_until_from }; |
430 |
} else if (!suspend_until_from && suspend_until_to){ |
431 |
searchpattern += _("suspend date to ") + suspend_until_to + " "; |
432 |
return {"<=": suspend_until_to }; |
433 |
} |
419 |
}, |
434 |
}, |
420 |
"me.notes": function(){ |
435 |
"me.notes": function(){ |
421 |
var holdnotes = modify_holds_form.find("#holdnotes").val(); |
436 |
var holdnotes = modify_holds_form.find("#holdnotes").val(); |
Lines 430-448
Link Here
|
430 |
} |
445 |
} |
431 |
|
446 |
|
432 |
var holds_modify_table = $("#holds_to_modify").kohaTable({ |
447 |
var holds_modify_table = $("#holds_to_modify").kohaTable({ |
433 |
"ajax": { |
448 |
ajax: { |
434 |
"url": "/api/v1/holds" |
449 |
"url": "/api/v1/holds" |
435 |
}, |
450 |
}, |
436 |
"embed": [ |
451 |
embed: [ |
437 |
"biblio", |
452 |
"biblio", |
438 |
"item", |
453 |
"item", |
439 |
"pickup_library", |
454 |
"pickup_library", |
440 |
"patron" |
455 |
"patron" |
441 |
], |
456 |
], |
442 |
"destroy": true, |
457 |
destroy: true, |
443 |
"autoWidth": false, |
458 |
autoWidth: false, |
444 |
"processing": true, |
459 |
processing: true, |
445 |
"columns": [ |
460 |
order: [ |
|
|
461 |
[1, 'asc'] |
462 |
], |
463 |
columns: [ |
446 |
{ |
464 |
{ |
447 |
"data": "hold_id", |
465 |
"data": "hold_id", |
448 |
"name": "checkbox", |
466 |
"name": "checkbox", |
Lines 451-456
Link Here
|
451 |
return '<input class="selection" type="checkbox" value="'+ encodeURIComponent(data) +'"/>' |
469 |
return '<input class="selection" type="checkbox" value="'+ encodeURIComponent(data) +'"/>' |
452 |
} |
470 |
} |
453 |
}, |
471 |
}, |
|
|
472 |
{ |
473 |
"data": "hold_date", |
474 |
"name": "hold_date", |
475 |
"type": "date", |
476 |
"title": _("Hold date"), |
477 |
"orderable": true, |
478 |
"render": function( data, type, row, meta ) { |
479 |
return $date(data); |
480 |
} |
481 |
}, |
454 |
{ |
482 |
{ |
455 |
"data": "expiration_date", |
483 |
"data": "expiration_date", |
456 |
"name": "expiration_date", |
484 |
"name": "expiration_date", |
Lines 462-474
Link Here
|
462 |
} |
490 |
} |
463 |
}, |
491 |
}, |
464 |
{ |
492 |
{ |
465 |
"data": "biblio.title", |
493 |
"data": "biblio.title:biblio.subtitle:biblio.medium", |
466 |
"name": "title", |
|
|
467 |
"title": _("Title"), |
494 |
"title": _("Title"), |
|
|
495 |
"searchable": true, |
468 |
"orderable": true, |
496 |
"orderable": true, |
469 |
"render": function( data, type, row, meta ) { |
497 |
"render": function(data, type, row, meta) { |
470 |
return '<a href="/cgi-bin/koha/catalogue/detail.pl?' + |
498 |
return $biblio_to_html(row.biblio, { link: 1 }); |
471 |
'biblionumber=' + encodeURIComponent( row.biblio_id ) + '">' + escape_str( data ) + '</a>'; |
|
|
472 |
} |
499 |
} |
473 |
}, |
500 |
}, |
474 |
{ |
501 |
{ |
475 |
- |
|
|