Lines 32-38
Link Here
|
32 |
<div id="yui-main"> |
32 |
<div id="yui-main"> |
33 |
<div class="yui-b"> |
33 |
<div class="yui-b"> |
34 |
|
34 |
|
35 |
<h1>Manage staged MARC records |
35 |
<h1 id="managed_records">Manage staged MARC records |
36 |
[% IF ( import_batch_id ) %] |
36 |
[% IF ( import_batch_id ) %] |
37 |
› Batch [% import_batch_id %] |
37 |
› Batch [% import_batch_id %] |
38 |
[% END %] |
38 |
[% END %] |
Lines 60-66
Link Here
|
60 |
<div class="dialog message"> |
60 |
<div class="dialog message"> |
61 |
<p>No records have been staged.</p> |
61 |
<p>No records have been staged.</p> |
62 |
<p><a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC records for import</a>.</p> |
62 |
<p><a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC records for import</a>.</p> |
63 |
</div> |
63 |
/div> |
64 |
[% END %] |
64 |
[% END %] |
65 |
[% END %] |
65 |
[% END %] |
66 |
|
66 |
|
Lines 270-275
Link Here
|
270 |
[% END %] |
270 |
[% END %] |
271 |
</div> |
271 |
</div> |
272 |
[% END %] |
272 |
[% END %] |
|
|
273 |
<div class="statictabs"> |
274 |
<ul> |
275 |
<li><a id="marcfileslink">Marc files</a></li> |
276 |
<li><a id="draftrecordslink" name="draft_record_to_display" value="1">Draft records</a></li> |
277 |
</ul> |
278 |
|
279 |
<div class="tabs-container"> |
280 |
<div id="marcfiles"> |
273 |
<table> |
281 |
<table> |
274 |
<tr> |
282 |
<tr> |
275 |
<th>#</th> |
283 |
<th>#</th> |
Lines 284-291
Link Here
|
284 |
</tr> |
292 |
</tr> |
285 |
[% FOREACH batch_lis IN batch_list %] |
293 |
[% FOREACH batch_lis IN batch_list %] |
286 |
<tr> |
294 |
<tr> |
287 |
<td>[% batch_lis.import_batch_id %]</td> |
295 |
<td class="import_batch_id">[% batch_lis.import_batch_id %]</td> |
288 |
<td><a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]">[% batch_lis.file_name %]</a></td> |
296 |
<td><a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]&display_file_content=1">[% batch_lis.file_name %]</a></td> |
289 |
<td>[% batch_lis.comments %]</td> |
297 |
<td>[% batch_lis.comments %]</td> |
290 |
<td>[% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %]</td> |
298 |
<td>[% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %]</td> |
291 |
<td> |
299 |
<td> |
Lines 307-313
Link Here
|
307 |
</td> |
315 |
</td> |
308 |
<td>[% batch_lis.upload_timestamp %]</td> |
316 |
<td>[% batch_lis.upload_timestamp %]</td> |
309 |
<td>[% batch_lis.num_records %]</td> |
317 |
<td>[% batch_lis.num_records %]</td> |
310 |
<td>[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] <a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]&op=create_labels">(Create label batch)</a>[% END %]</td> |
318 |
<td>[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] <a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]&display_file_content=1&op=create_labels">(Create label batch)</a>[% END %]</td> |
311 |
<td class="actions"> |
319 |
<td class="actions"> |
312 |
[% IF ( batch_lis.can_clean ) %] |
320 |
[% IF ( batch_lis.can_clean ) %] |
313 |
<form method="post" action="[% batch_lis.script_name %]" name="clean_batch_[% batch_lis.import_batch_id %]" id="clean_batch_[% batch_lis.import_batch_id %]" class="batch_form batch_clean" > |
321 |
<form method="post" action="[% batch_lis.script_name %]" name="clean_batch_[% batch_lis.import_batch_id %]" id="clean_batch_[% batch_lis.import_batch_id %]" class="batch_form batch_clean" > |
Lines 326-331
Link Here
|
326 |
</tr> |
334 |
</tr> |
327 |
[% END %] |
335 |
[% END %] |
328 |
</table> |
336 |
</table> |
|
|
337 |
</div> |
338 |
|
339 |
<div id="draftrecords" onload="document.getElementById("draftrecords").style.display ='none';"> |
340 |
<p> To edit or save these draft records click the 'Edit' link beside the appropriate record. </p> |
341 |
<table id="records-table"> |
342 |
<thead> |
343 |
<tr> |
344 |
<th>#</th> |
345 |
<th>Citation</th> |
346 |
<th>Status</th> |
347 |
<th>Match type</th> |
348 |
<th>Match details</th> |
349 |
<th><abbr title="Differences between the original biblio and the imported">Diff</abbr></th> |
350 |
<th>Record</th> |
351 |
<th>Catalog link</th> |
352 |
</tr> |
353 |
</thead> |
354 |
</table> |
355 |
</div> |
356 |
</div> |
357 |
</div> |
358 |
|
329 |
[% IF ( pages ) %] |
359 |
[% IF ( pages ) %] |
330 |
<div class="pages"> |
360 |
<div class="pages"> |
331 |
[% FOREACH page IN pages %] |
361 |
[% FOREACH page IN pages %] |
Lines 396-402
Link Here
|
396 |
$(this).parent().hide(); |
426 |
$(this).parent().hide(); |
397 |
}); |
427 |
}); |
398 |
|
428 |
|
399 |
[% IF import_batch_id %] |
429 |
[% IF !(import_batch_id) %] |
|
|
430 |
document.getElementById('draftrecords').style.display = 'none'; |
431 |
var marcfileslink = document.getElementById("marcfileslink"); |
432 |
marcfileslink.style.backgroundColor = "#FFF"; |
433 |
[% END %] |
434 |
|
435 |
var marcfiles = document.getElementById("marcfiles"); |
436 |
var draftrecords = document.getElementById("draftrecords"); |
437 |
var draftrecordslink = document.getElementById("draftrecordslink"); |
438 |
var marcfileslink = document.getElementById("marcfileslink"); |
439 |
|
440 |
$("#draftrecordslink").click(function(e){ |
441 |
draftrecords.style.display = "block"; |
442 |
draftrecordslink.style.backgroundColor = "#FFF"; |
443 |
marcfileslink.style.backgroundColor= "#e6f0f2"; |
444 |
marcfiles.style.display = "none"; |
445 |
if (document.getElementById("draftrecords").style.display === 'block') { |
446 |
[% draft_record_to_display = 1 %] |
447 |
} |
448 |
}); |
449 |
|
450 |
$("#marcfileslink").click(function(e){ |
451 |
draftrecords.style.display = "none"; |
452 |
marcfiles.style.display = "block"; |
453 |
draftrecordslink.style.backgroundColor = "#e6f0f2"; |
454 |
marcfileslink.style.backgroundColor= "#FFF"; |
455 |
}); |
456 |
|
457 |
[% IF (import_batch_id || draft_record_to_display) %] |
400 |
$("#records-table").dataTable($.extend(true, {}, dataTablesDefaults, { |
458 |
$("#records-table").dataTable($.extend(true, {}, dataTablesDefaults, { |
401 |
"bAutoWidth": false, |
459 |
"bAutoWidth": false, |
402 |
"bFilter": false, |
460 |
"bFilter": false, |
Lines 412-422
Link Here
|
412 |
{ "mDataProp": "overlay_status" }, |
470 |
{ "mDataProp": "overlay_status" }, |
413 |
{ "mDataProp": "match_citation" }, |
471 |
{ "mDataProp": "match_citation" }, |
414 |
{ "mDataProp": "diff_url" }, |
472 |
{ "mDataProp": "diff_url" }, |
415 |
{ "mDataProp": "matched" } |
473 |
{ "mDataProp": "matched" }, |
|
|
474 |
[% IF !(import_batch_id) %] { "mDataProp": "catalog_link" } [% END %] |
416 |
], |
475 |
], |
417 |
"fnServerData": function ( sSource, aoData, fnCallback ) { |
476 |
[% IF (import_batch_id) %] |
418 |
aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); |
477 |
"fnServerData": function ( sSource, aoData, fnCallback ) { |
419 |
|
478 |
aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); |
|
|
479 |
[% ELSE %] |
480 |
"fnServerData": function ( sSource, aoData, fnCallback ) { |
481 |
aoData.push( { "name": "import_batch_id", "value": [% draft_record_to_display %] } ); |
482 |
[% END %] |
420 |
$.ajax({ |
483 |
$.ajax({ |
421 |
'dataType': 'json', |
484 |
'dataType': 'json', |
422 |
'type': 'POST', |
485 |
'type': 'POST', |
Lines 475-480
Link Here
|
475 |
'<a target="_blank" href="' + record_details_url |
538 |
'<a target="_blank" href="' + record_details_url |
476 |
+ aData['matched'] + '">' + aData['matched'] + '</a>' |
539 |
+ aData['matched'] + '">' + aData['matched'] + '</a>' |
477 |
); |
540 |
); |
|
|
541 |
[% IF !(import_batch_id) %] |
542 |
if (aData['catalog_link']){ |
543 |
$('td:eq(7)', nRow).html( |
544 |
'<a href="' + aData['catalog_link'] + '">' + "Edit" + '</a>' |
545 |
); |
546 |
} |
547 |
[% END %] |
478 |
}, |
548 |
}, |
479 |
})); |
549 |
})); |
480 |
$("#import_batch_form").on("submit",function(){ |
550 |
$("#import_batch_form").on("submit",function(){ |