<commit_before><?php if(count($search)==0):?>

  <div class="warn_message no_record_msg">
    <?php echo __('There is no corresponding records.');?>
    <?php if($form->getValue('only_errors')):?>
      <br /><?php echo __('You may want to include <em>rows without errors</em>');?>
      <script language="javascript">
        $(document).ready(function () {
          $('.no_record_msg em').click(function(){
            $('#staging_filters_only_errors').removeAttr('checked');
            $('#import_filter').submit();
          })
        });
      </script>

    <?php endif;?>
<?php else:?>
  <?php include_partial('global/pager', array('pagerLayout' => $pagerLayout)); ?>
  <?php include_partial('global/pager_info', array('form' => $form, 'pagerLayout' => $pagerLayout)); ?>  

  <div class="edition">
  <table class="staging_table results ">
    <thead>
     <th><?php echo __('Codes');?></th>
    <?php foreach($fields as $name=>$title):?>
      <th><?php echo $title;?></th>
    <?php endforeach;?>
      <th><?php echo __('Linked Info');?></th>
      <th><?php echo __('Status');?></th>
      <th></th>
    </thead>
    <?php foreach($search as $row):?>
      <tr>
        <td>
          <ul class="codes">
            <?php foreach($row['codes'] as $k=>$v):?>
              <li>
                <?php echo $v->code_prefix.$v->code_prefix_separator.
                $v->code.$v->code_suffix.$v->code_suffix_separator;?>
              </li>
            <?php endforeach;?>
          </ul>
        </td>
        <?php foreach($fields as $name=>$title):?>
          <td class="<?php echo $row->getStatusFor($name);?>"><?php echo $row[$name];?></td>
        <?php endforeach;?>
        <td><?php echo $row['linked_info'];?></td>
        <td <?php if(count($row['status']) != 0 ):?> class="fld_tocomplete"<?php endif;?>>
          <?php if(count($row['status']) != 0 ):?>
            <?php echo __('Error');?>
          <?php endif;?>
        </td>
        <td>
          <?php if(count($row['status']) != 0 ):?>
            <?php echo link_to(image_tag('edit.png', array("title" => __("Edit"))), 'staging/edit?id='.$row['id']);?>
          <?php endif;?>
          <?php echo link_to(image_tag('remove.png', array("title" => __("Delete"))), 'staging/delete?id='.$row['id'],'class=remove_staging');?>
        </td>
        </tr>
    <?php endforeach;?>
  </table>
  <br/>
  <div class="blue_link"><?php echo link_to(__('Back to Import'), 'import/index');?></div>
  <?php echo link_to(__('Import "Ok" lines'), 'staging/markok?import='.$import->getId() ,'class=but');?><commit_msg>Add some green when ok<commit_after><?php if(count($search)==0):?>

  <div class="warn_message no_record_msg">
    <?php echo __('There is no corresponding records.');?>
    <?php if($form->getValue('only_errors')):?>
      <br /><?php echo __('You may want to include <em>rows without errors</em>');?>
      <script language="javascript">
        $(document).ready(function () {
          $('.no_record_msg em').click(function(){
            $('#staging_filters_only_errors').removeAttr('checked');
            $('#import_filter').submit();
          })
        });
      </script>

    <?php endif;?>
<?php else:?>
  <?php include_partial('global/pager', array('pagerLayout' => $pagerLayout)); ?>
  <?php include_partial('global/pager_info', array('form' => $form, 'pagerLayout' => $pagerLayout)); ?>  

  <div class="edition">
  <table class="staging_table results ">
    <thead>
     <th><?php echo __('Codes');?></th>
    <?php foreach($fields as $name=>$title):?>
      <th><?php echo $title;?></th>
    <?php endforeach;?>
      <th><?php echo __('Linked Info');?></th>
      <th><?php echo __('Status');?></th>
      <th></th>
    </thead>
    <?php foreach($search as $row):?>
      <tr>
        <td>
          <ul class="codes">
            <?php foreach($row['codes'] as $k=>$v):?>
              <li>
                <?php echo $v->code_prefix.$v->code_prefix_separator.
                $v->code.$v->code_suffix.$v->code_suffix_separator;?>
              </li>
            <?php endforeach;?>
          </ul>
        </td>
        <?php foreach($fields as $name=>$title):?>
          <td class="<?php echo $row->getStatusFor($name);?>"><?php echo $row[$name];?></td>
        <?php endforeach;?>
        <td><?php echo $row['linked_info'];?></td>
        <td  class="<?php if(count($row['status']) != 0 ):?>fld_tocomplete<?php else:?>fld_ok<?php endif;?>">
          <?php if(count($row['status']) != 0 ):?>
            <?php echo __('Error');?>
          <?php else:?>
            <?php echo __('No problems detected');?>
          <?php endif;?>
        </td>
        <td>
          <?php if(count($row['status']) != 0 ):?>
            <?php echo link_to(image_tag('edit.png', array("title" => __("Edit"))), 'staging/edit?id='.$row['id']);?>
          <?php endif;?>
          <?php echo link_to(image_tag('remove.png', array("title" => __("Delete"))), 'staging/delete?id='.$row['id'],'class=remove_staging');?>
        </td>
        </tr>
    <?php endforeach;?>
  </table>
  <br/>
  <div class="blue_link"><?php echo link_to(__('Back to Import'), 'import/index');?></div>
  <?php echo link_to(__('Import "Ok" lines'), 'staging/markok?import='.$import->getId() ,'class=but');?>
{'fraction_non_alphanumeric': 0.2371563981042654, 'fraction_numerical': 0.0015165876777251184, 'mean_word_length': 2.837090909090909, 'pattern_counts': {'":': 0, '<': 156, '<?xml version=': 0, '>': 188, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5932996', 'n_tokens_mistral': 1728, 'n_tokens_neox': 1716, 'n_words': 339}