| Lines 1-38
          
      
      
        Link Here | 
            
              | 1 | [% BLOCK final_match_link %] |  |  | 
            
              | 2 |     [% IF ( record.record_type == 'biblio' ) %] | 
            
              | 3 |         <a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% record.final_match_id %]">[% record.final_match_id %]</a> | 
            
              | 4 |     [% ELSIF ( record.record_type == 'auth' ) %] | 
            
              | 5 |         <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% record.final_match_id %]">[% record.final_match_id %]</a> | 
            
              | 6 |     [% END %] | 
            
              | 7 | [% END %] | 
            
              | 8 | [% BLOCK match_link %] | 
            
              | 9 |     [% IF ( record_lis.match_id ) %] | 
            
              | 10 |         <tr> | 
            
              | 11 |             <td /> | 
            
              | 12 |             [% IF ( record.record_type == 'biblio' ) %] | 
            
              | 13 |                 <td class="highlight" colspan="4">Matches biblio [% record_lis.match_id %] (score = [% record_lis.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% record_lis.match_id %]">[% record_lis.match_citation %]</a></td> | 
            
              | 14 |             [% ELSIF ( record.record_type == 'auth' ) %] | 
            
              | 15 |                 <td class="highlight" colspan="4">Matches authority [% record_lis.match_id %] (score = [% record_lis.match_score %]): <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% record_lis.match_id %]">[% record_lis.match_citation %]</a> | | 
            
              | 16 |         <a href="/cgi-bin/koha/authorities/merge.pl?mergereference=breeding&authid=[% record_lis.match_id %]&authid=[% record_lis.import_record_id %]">Merge</a> | 
            
              | 17 |                 </td> | 
            
              | 18 |             [% END %] | 
            
              | 19 |         </tr> | 
            
              | 20 |     [% ELSIF ( record.record_type == 'auth') %] | 
            
              | 21 |         <tr data-authid="[% record_lis.import_record_id %]"> | 
            
              | 22 |             <td /> | 
            
              | 23 |             <td class="highlight" colspan="4"><a href="#" class="merge_auth">Search for a record to merge in a new window</a></td> | 
            
              | 24 |         </tr> | 
            
              | 25 |     [% END %] | 
            
              | 26 | [% END %] | 
        
          | 27 | [% INCLUDE 'doc-head-open.inc' %] | 1 | [% INCLUDE 'doc-head-open.inc' %] | 
        
          | 28 | <title>Koha › Tools › Manage staged MARC records | 2 | <title>Koha › Tools › Manage staged MARC records | 
        
          | 29 | [% IF ( import_batch_id ) %] | 3 | [% IF ( import_batch_id ) %] | 
        
          | 30 |  › Batch [% import_batch_id %] | 4 |  › Batch [% import_batch_id %] | 
        
          | 31 | [% END %] | 5 | [% END %] | 
        
          | 32 | </title> | 6 | </title> | 
            
              | 33 | [% INCLUDE 'greybox.inc' %] |  |  | 
        
          | 34 | [% INCLUDE 'doc-head-close.inc' %] | 7 | [% INCLUDE 'doc-head-close.inc' %] | 
        
          | 35 | <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" /> | 
            
              | 10 | <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.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> | 
        
          | 36 | <script type="text/JavaScript" language="JavaScript"> | 14 | <script type="text/JavaScript" language="JavaScript"> | 
        
          | 37 | //<![CDATA[ | 15 | //<![CDATA[ | 
        
          | 38 | var MSG_CONFIRM_CLEAN = _("Clear all reservoir records staged in this batch?  This cannot be undone."); | 16 | var MSG_CONFIRM_CLEAN = _("Clear all reservoir records staged in this batch?  This cannot be undone."); | 
  
    | Lines 49-61
          $(document).ready(function(){
      
      
        Link Here | 
        
          | 49 |       $(this).parent().hide(); | 27 |       $(this).parent().hide(); | 
        
          | 50 |   }); | 28 |   }); | 
        
          | 51 |  | 29 |  | 
          
            
              | 52 |   $('.merge_auth').click(function(event) { | 30 |   $("#records-table").dataTable({ | 
            
              | 53 |       event.preventDefault(); | 31 |       "aLengthMenu": [[10, 15, 20, 25, 50, 100], [10, 15, 20, 25, 50, 100]], | 
            
              | 54 |       var authid = $(this).parents('tr').attr('data-authid'); | 32 |       "iDisplayLength" : 20, | 
            
              | 55 |       $.cookie('auth_to_merge', JSON.stringify({ 'authid': authid, 'summary': $('tr[data-id="' + authid + '"] .citation').text(), 'mergereference': 'breeding' }), { 'path': '/' }); | 33 |       "bAutoWidth": false, | 
            
              | 56 |       window.open("/cgi-bin/koha/authorities/authorities-home.pl"); | 34 |       "bFilter": false, | 
            
              |  |  | 35 |       "bProcessing": true, | 
            
              | 36 |       "bServerSide": true, | 
            
              | 37 |       "sAjaxSource": 'batch_records_ajax.pl', | 
            
              | 38 |       "sPaginationType": "full_numbers", | 
            
              | 39 |       "aoColumns": [ | 
            
              | 40 |           { "mDataProp": "import_record_id" }, | 
            
              | 41 |           { "mDataProp": "citation" }, | 
            
              | 42 |           { "mDataProp": "status" }, | 
            
              | 43 |           { "mDataProp": "overlay_status" }, | 
            
              | 44 |           { "mDataProp": "match_citation" }, | 
            
              | 45 |           { "mDataProp": "matched" }, | 
            
              | 46 |       ], | 
            
              | 47 |       "fnServerData": function ( sSource, aoData, fnCallback ) { | 
            
              | 48 |           aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); | 
            
              | 49 |  | 
            
              | 50 |           $.getJSON( sSource, aoData, function (json) { | 
            
              | 51 |               fnCallback(json) | 
            
              | 52 |           } ); | 
            
              | 53 |       }, | 
            
              | 54 |       "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { | 
            
              | 55 |         $('td:eq(1)', nRow).html( | 
            
              | 56 |             '<a href="javascript:void()" onclick="show_marc(' | 
            
              | 57 |             + aData['import_record_id'] | 
            
              | 58 |             + ')">' + aData['citation'] + '</a>' | 
            
              | 59 |         ); | 
            
              | 60 |  | 
            
              | 61 |         if ( aData['match_id'] ) { | 
            
              | 62 |             $('td:eq(4)', nRow).html( | 
            
              | 63 |                 _("Matches biblio ") | 
            
              | 64 |                 + aData['match_id'] | 
            
              | 65 |                 + " (" + _("score") + "=" | 
            
              | 66 |                 + aData['score'] | 
            
              | 67 |                 + '):' + '<a target="_blank" href="http://staff.kohadev/cgi-bin/koha/catalogue/detail.pl?biblionumber=' | 
            
              | 68 |                 + aData['match_id'] + '">' + aData['match_citation'] + '</a>' | 
            
              | 69 |             ); | 
            
              | 70 |         } | 
            
              | 71 |  | 
            
              | 72 |         $('td:eq(5)', nRow).html( | 
            
              | 73 |             '<a target="_blank" href="http://staff.kohadev/cgi-bin/koha/catalogue/detail.pl?biblionumber=' | 
            
              | 74 |             + aData['matched'] + '">' + aData['matched'] + '</a>' | 
            
              | 75 |         ); | 
            
              | 76 |       }, | 
        
          | 57 |   }); | 77 |   }); | 
        
          | 58 | }); | 78 | }); | 
            
              |  |  | 79 |  | 
            
              | 80 | function show_marc( id ) { | 
            
              | 81 |     var page = "/cgi-bin/koha/catalogue/showmarc.pl?importid=" + id; | 
            
              | 82 |  | 
            
              | 83 |     var $dialog = $('<div></div>') | 
            
              | 84 |         .html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>') | 
            
              | 85 |         .dialog({ | 
            
              | 86 |             autoOpen: false, | 
            
              | 87 |             modal: true, | 
            
              | 88 |             height: 625, | 
            
              | 89 |             width: 500, | 
            
              | 90 |             title: _("MARC Preview") | 
            
              | 91 |         }); | 
            
              | 92 |  | 
            
              | 93 |     $dialog.dialog('open'); | 
            
              | 94 | } | 
        
          | 59 | //]]> | 95 | //]]> | 
        
          | 60 | </script> | 96 | </script> | 
        
          | 61 | <style type="text/css"> | 97 | <style type="text/css"> | 
  
    | Lines 374-458
          Page
      
      
        Link Here | 
        
          | 374 |   [% END %] | 410 |   [% END %] | 
        
          | 375 | [% END %] | 411 | [% END %] | 
        
          | 376 |  | 412 |  | 
          
            
              | 377 | [% IF ( record_list ) %] | 413 | <table id="records-table"> | 
            
              | 378 |   [% IF ( pages ) %] | 414 |     <thead> | 
            
              | 379 | <div class="pages"> | 415 |         <tr> | 
            
              | 380 | Page  | 416 |             <th>#</th> | 
            
              | 381 |     [% FOREACH page IN pages %] | 417 |             <th>Citation</th> | 
            
              | 382 |       [% IF ( page.current_page ) %] | 418 |             <th>Status</th> | 
            
              | 383 |       <span class="current">[% page.page_number %]</span> | 419 |             <th>Match?</th> | 
            
              | 384 |       [% ELSE %] | 420 |             <th> </th> | 
            
              | 385 |       <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a> | 421 |             <th>Record</th> | 
            
              | 386 |       [% END %] | 422 |         </tr> | 
            
              | 387 |     [% END %] | 423 |     </thead> | 
            
              | 388 | </div> |  |  | 
            
              | 389 |   [% END %] | 
            
              | 390 | <table> | 
            
              | 391 |   <tr> | 
            
              | 392 |     <th>#</th> | 
            
              | 393 |     <th>Citation</th> | 
            
              | 394 |     <th>Status</th> | 
            
              | 395 |     <th>Match?</th> | 
            
              | 396 |     <th>Record</th> | 
            
              | 397 |  | 
            
              | 398 |   </tr> | 
            
              | 399 |   [% FOREACH record_lis IN record_list %] | 
            
              | 400 |   [% UNLESS ( loop.odd ) %]<tr data-id="[% record_lis.import_record_id %]" class="highlight">[% ELSE %]<tr data-id="[% record_lis.import_record_id %]">[% END %] | 
            
              | 401 |     <td>[% record_lis.record_sequence %]</td> | 
            
              | 402 |     <td><a class="citation" href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% record_lis.import_record_id %]" rel="gb_page_center[600,500]">[% record_lis.citation %]</a></td> | 
            
              | 403 |     <td> | 
            
              | 404 |         [% IF ( record_lis.status == 'imported' ) %] | 
            
              | 405 |             Imported | 
            
              | 406 |         [% ELSIF ( record_lis.status == 'ignored' ) %] | 
            
              | 407 |             Ignored | 
            
              | 408 |         [% ELSIF ( record_lis.status == 'reverted' ) %] | 
            
              | 409 |             Reverted | 
            
              | 410 |         [% ELSIF ( record_lis.status == 'staged' ) %] | 
            
              | 411 |             Staged | 
            
              | 412 |         [% ELSIF ( record_lis.status == 'error' ) %] | 
            
              | 413 |             Error | 
            
              | 414 |         [% ELSE %] | 
            
              | 415 |           [% record_lis.status %] | 
            
              | 416 |         [% END %] | 
            
              | 417 |     </td> | 
            
              | 418 |     <td> | 
            
              | 419 |         [% IF ( record_lis.overlay_status == 'no_match' ) %] | 
            
              | 420 |             No match | 
            
              | 421 |         [% ELSIF ( record_lis.overlay_status == 'match_applied' ) %] | 
            
              | 422 |             Match applied | 
            
              | 423 |         [% ELSIF ( record_lis.overlay_status == 'auto_match' ) %] | 
            
              | 424 |             Match found | 
            
              | 425 |         [% ELSE %] | 
            
              | 426 |             [% record_lis.overlay_status %] | 
            
              | 427 |         [% END %] | 
            
              | 428 |     </td> | 
            
              | 429 |     <td>[% IF ( record_lis.final_match_id ) %] | 
            
              | 430 |         [% PROCESS final_match_link record=record_lis %] | 
            
              | 431 |         [% END %] | 
            
              | 432 |     </td> | 
            
              | 433 |   </tr> | 
            
              | 434 |     [% PROCESS match_link record=record_lis %] | 
            
              | 435 |   [% END %] | 
        
          | 436 | </table> | 424 | </table> | 
            
              | 437 |   [% IF ( pages ) %] |  |  | 
            
              | 438 | <div class="pages"> | 
            
              | 439 | Page  | 
            
              | 440 |     [% FOREACH page IN pages %] | 
            
              | 441 |       [% IF ( page.current_page ) %] | 
            
              | 442 |       <span class="current">[% page.page_number %]</span> | 
            
              | 443 |       [% ELSE %] | 
            
              | 444 |       <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a> | 
            
              | 445 |       [% END %] | 
            
              | 446 |     [% END %] | 
            
              | 447 | </div> | 
            
              | 448 |   [% END %] | 
            
              | 449 | [% ELSE %] | 
            
              | 450 |   [% IF ( batch_info ) %] | 
            
              | 451 |     <div class="dialog alert">There are no records in this batch to import. | 
            
              | 452 |     <a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.</div> | 
            
              | 453 |  | 
            
              | 454 |   [% END %] | 
            
              | 455 | [% END %] | 
        
          | 456 |  | 425 |  | 
        
          | 457 | </div> | 426 | </div> | 
        
          | 458 | </div> | 427 | </div> |