|
Lines 7-16
Link Here
|
| 7 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
| 8 |
<script type="text/javascript" src="[% themelang %]/js/background-job-progressbar.js"></script> |
8 |
<script type="text/javascript" src="[% themelang %]/js/background-job-progressbar.js"></script> |
| 9 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
9 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
| 10 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> |
10 |
[% INCLUDE 'datatables.inc' %] |
| 11 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script> |
11 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script> |
| 12 |
[% INCLUDE 'datatables-strings.inc' %] |
|
|
| 13 |
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> |
| 14 |
<script type="text/JavaScript" language="JavaScript"> |
12 |
<script type="text/JavaScript" language="JavaScript"> |
| 15 |
//<![CDATA[ |
13 |
//<![CDATA[ |
| 16 |
var MSG_CONFIRM_CLEAN = _("Clear all reservoir records staged in this batch? This cannot be undone."); |
14 |
var MSG_CONFIRM_CLEAN = _("Clear all reservoir records staged in this batch? This cannot be undone."); |
|
Lines 27-81
$(document).ready(function(){
Link Here
|
| 27 |
$(this).parent().hide(); |
25 |
$(this).parent().hide(); |
| 28 |
}); |
26 |
}); |
| 29 |
|
27 |
|
| 30 |
$("#records-table").dataTable({ |
28 |
[% IF import_batch_id %] |
| 31 |
"aLengthMenu": [[10, 15, 20, 25, 50, 100], [10, 15, 20, 25, 50, 100]], |
29 |
$("#records-table").dataTable({ |
| 32 |
"iDisplayLength" : 20, |
30 |
"aLengthMenu": [[10, 15, 20, 25, 50, 100, -1], [10, 15, 20, 25, 50, 100, _("All")]], |
| 33 |
"bAutoWidth": false, |
31 |
"iDisplayLength" : 20, |
| 34 |
"bFilter": false, |
32 |
"bAutoWidth": false, |
| 35 |
"bProcessing": true, |
33 |
"bFilter": false, |
| 36 |
"bServerSide": true, |
34 |
"bProcessing": true, |
| 37 |
"sAjaxSource": 'batch_records_ajax.pl', |
35 |
"bServerSide": true, |
| 38 |
"sPaginationType": "full_numbers", |
36 |
"sAjaxSource": 'batch_records_ajax.pl', |
| 39 |
"sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', |
37 |
"sPaginationType": "full_numbers", |
| 40 |
"aoColumns": [ |
38 |
"sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', |
| 41 |
{ "mDataProp": "import_record_id" }, |
39 |
"aoColumns": [ |
| 42 |
{ "mDataProp": "citation" }, |
40 |
{ "mDataProp": "import_record_id" }, |
| 43 |
{ "mDataProp": "status" }, |
41 |
{ "mDataProp": "citation" }, |
| 44 |
{ "mDataProp": "overlay_status" }, |
42 |
{ "mDataProp": "status" }, |
| 45 |
{ "mDataProp": "match_citation" }, |
43 |
{ "mDataProp": "overlay_status" }, |
| 46 |
{ "mDataProp": "matched" }, |
44 |
{ "mDataProp": "match_citation" }, |
| 47 |
], |
45 |
{ "mDataProp": "matched" }, |
| 48 |
"fnServerData": function ( sSource, aoData, fnCallback ) { |
46 |
], |
| 49 |
aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); |
47 |
"fnServerData": function ( sSource, aoData, fnCallback ) { |
|
|
48 |
aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); |
| 50 |
|
49 |
|
| 51 |
$.getJSON( sSource, aoData, function (json) { |
50 |
$.ajax({ |
| 52 |
fnCallback(json) |
51 |
'dataType': 'json', |
| 53 |
} ); |
52 |
'type': 'POST', |
| 54 |
}, |
53 |
'url': sSource, |
| 55 |
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { |
54 |
'data': aoData, |
| 56 |
$('td:eq(1)', nRow).html( |
55 |
'success': function(json){ |
| 57 |
'<a href="javascript:void()" onclick="show_marc(' |
56 |
fnCallback(json); |
| 58 |
+ aData['import_record_id'] |
57 |
} |
| 59 |
+ ')">' + aData['citation'] + '</a>' |
58 |
}); |
| 60 |
); |
59 |
}, |
|
|
60 |
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { |
| 61 |
[% IF ( record_type == 'auth' ) %] |
| 62 |
var record_details_url = "/cgi-bin/koha/authorities/detail.pl?authid="; |
| 63 |
[% ELSE %] |
| 64 |
var record_details_url = "/cgi-bin/koha/catalogue/detail.pl?biblionumber="; |
| 65 |
[% END %] |
| 61 |
|
66 |
|
| 62 |
if ( aData['match_id'] ) { |
67 |
$('td:eq(1)', nRow).html( |
| 63 |
$('td:eq(4)', nRow).html( |
68 |
'<a href="javascript:void(0)" onclick="show_marc(' |
| 64 |
_("Matches biblio ") |
69 |
+ aData['import_record_id'] |
| 65 |
+ aData['match_id'] |
70 |
+ ')">' + aData['citation'] + '</a>' |
| 66 |
+ " (" + _("score") + "=" |
|
|
| 67 |
+ aData['score'] |
| 68 |
+ '):' + '<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' |
| 69 |
+ aData['match_id'] + '">' + aData['match_citation'] + '</a>' |
| 70 |
); |
71 |
); |
| 71 |
} |
|
|
| 72 |
|
72 |
|
| 73 |
$('td:eq(5)', nRow).html( |
73 |
$('td:eq(2)', nRow).html( |
| 74 |
'<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' |
74 |
aData['status'] == 'imported' ? _("Imported") : |
| 75 |
+ aData['matched'] + '">' + aData['matched'] + '</a>' |
75 |
aData['status'] == 'ignored' ? _("Ignored") : |
| 76 |
); |
76 |
aData['status'] == 'reverted' ? _("Reverted") : |
| 77 |
}, |
77 |
aData['status'] == 'staged' ? _("Staged") : |
| 78 |
}); |
78 |
aData['status'] == 'error' ? _("Error") : |
|
|
79 |
aData['status'] |
| 80 |
); |
| 81 |
|
| 82 |
$('td:eq(3)', nRow).html( |
| 83 |
aData['overlay_status'] == 'no_match' ? _("No match") : |
| 84 |
aData['overlay_status'] == 'match_applied' ? _("Match applied") : |
| 85 |
aData['overlay_status'] == 'auto_match' ? _("Match found") : |
| 86 |
aData['overlay_status'] |
| 87 |
); |
| 88 |
|
| 89 |
if ( aData['match_id'] ) { |
| 90 |
$('td:eq(4)', nRow).html( |
| 91 |
_("Matches biblio ") |
| 92 |
+ aData['match_id'] |
| 93 |
+ " (" + _("score") + "=" |
| 94 |
+ aData['score'] |
| 95 |
+ '):' + '<a target="_blank" href="' + record_details_url |
| 96 |
+ aData['match_id'] + '">' + aData['match_citation'] + '</a>' |
| 97 |
); |
| 98 |
} |
| 99 |
|
| 100 |
$('td:eq(5)', nRow).html( |
| 101 |
'<a target="_blank" href="' + record_details_url |
| 102 |
+ aData['matched'] + '">' + aData['matched'] + '</a>' |
| 103 |
); |
| 104 |
}, |
| 105 |
}); |
| 106 |
[% END %] |
| 79 |
}); |
107 |
}); |
| 80 |
|
108 |
|
| 81 |
function show_marc( id ) { |
109 |
function show_marc( id ) { |
|
Lines 412-429
Page
Link Here
|
| 412 |
[% END %] |
440 |
[% END %] |
| 413 |
[% END %] |
441 |
[% END %] |
| 414 |
|
442 |
|
| 415 |
<table id="records-table"> |
443 |
[% IF import_batch_id %] |
| 416 |
<thead> |
444 |
<table id="records-table"> |
| 417 |
<tr> |
445 |
<thead> |
| 418 |
<th>#</th> |
446 |
<tr> |
| 419 |
<th>Citation</th> |
447 |
<th>#</th> |
| 420 |
<th>Status</th> |
448 |
<th>Citation</th> |
| 421 |
<th>Match type</th> |
449 |
<th>Status</th> |
| 422 |
<th>Match details</th> |
450 |
<th>Match type</th> |
| 423 |
<th>Record</th> |
451 |
<th>Match details</th> |
| 424 |
</tr> |
452 |
<th>Record</th> |
| 425 |
</thead> |
453 |
</tr> |
| 426 |
</table> |
454 |
</thead> |
|
|
455 |
</table> |
| 456 |
[% END %] |
| 427 |
|
457 |
|
| 428 |
</div> |
458 |
</div> |
| 429 |
</div> |
459 |
</div> |