<?php use_helper( 'UrlFunctions' ); ?>
<?php use_helper( 'UtilFunctions' ); ?>
<?php use_helper( 'IncludePartial' ); ?>


<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap4.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.datatables.net/fixedheader/3.1.7/css/fixedHeader.dataTables.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.datatables.net/responsive/2.2.5/css/responsive.bootstrap4.min.css" />
<!--<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css" />-->

<script type="text/javascript" src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/fixedheader/3.1.7/js/dataTables.fixedHeader.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.21/js/dataTables.bootstrap4.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.2.5/js/dataTables.responsive.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.2.5/js/responsive.bootstrap4.min.js"></script>


<table id="example" class="table table-striped table-bordered" style="width:100%">
    <thead>
        <tr>
            <th width="2%" style="text-align: center;"> # </th>
            <th style="text-align: center;">Fecha Registro</th>
            <th style="text-align: center;">Usuario</th>
            <th style="text-align: center;">Registro</th>
            <th style="text-align: center;">Dato</th>
            <th style="text-align: center;">Valor Anterior</th>
            <th style="text-align: center;">Valor Nuevo</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ( $a_RegistroHistorial as $key => $o_RegistroHistorialBN ) { ?>
            <tr>
                <td align="center"><?=$key+1?></td>
                <td align="center" nowrap=""><?=$o_RegistroHistorialBN->getIdFecha()?></td>
                <td align="center"><?=$o_RegistroHistorialBN->getUsuarioCreacion()?></td>
                <td align="center"><?=$o_RegistroHistorialBN->getCampoValor()?></td>
                <td align="center"><?=$o_RegistroHistorialBN->getCampoDescripcion()?></td>
                <td align="center"><?=$o_RegistroHistorialBN->getValorAnterior()?></td>
                <td align="center"><?=$o_RegistroHistorialBN->getValorNuevo()?></td>
            </tr>    
        <?php } ?>
    </tbody>
</table>

<script type="text/javascript">
$('#example').DataTable
(
    {
        language: { "url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json" },
        responsive: { details: true },
        searching: false,
        info:     false,
        lengthChange: false,
        //paging:   false,
        dom: 'lrtip',
        fixedHeader: 
        {
            header: true,
            footer: true
        }
    }
);
</script>