<table id="tabla_entidades_bancarias" class="table table-bordered text-right table-hover">
  <thead>
    <tr class="text-center" style="background-color:#eeeeee;">
      <th>Código Entidad</th>
      <th>Nombre</th>
      <th>Nombre Corto</th>
      <th>Grupo</th>
      <th>Nombre Grupo</th>
      <th class="no-sort"></th>
      <th class="no-sort"></th>
    </tr>
  </thead>

  <tbody>
  @foreach ($ent_bancaria as $banco)
    <tr>
      <td class="id_banco">{{$banco->id_banco}}</td>
      <td class="nombre text-left">{{$banco->nombre}}</td>
      <td class="nombre_corto text-left">{{$banco->nombre_corto}}</td>
      <td class="grupo text-left">{{$banco->grupo}}</td>
      <td class="nombre_grupo text-left">{{$banco->nombre_grupo}}</td>
      <td>
      <button id="modificar_{{$banco->id_banco}}" type="button" class="btn btn-success text-center" data-bs-toggle="modal" data-bs-target="#modalEntidadesBancarias">
      Modificar
      </button>
      </td>
      <td>
      <button id="baja_{{$banco->id_banco}}" type="button" class="btn btn-danger text-center" disabled>Baja</button>
      <!--/form-->
      </td>
    </tr>
  @endforeach
  </tbody>
    
  <tfoot>
    <tr class="text-center" style="background-color:#eeeeee;">
      <th>Código Entidad</th>
      <th>Nombre</th>
      <th>Nombre Corto</th>
      <th>Grupo</th>
      <th>Nombre Grupo</th>
      <th class="no-sort"></th>
      <th class="no-sort"></th>
    </tr>
  </tfoot>


</table>



<script>
    function crearDataTable(tabla){
        $(tabla).DataTable( {
            "pageLength": 10,
            "pagingType": "full_numbers",
            "ordering": true,
            "info":     true,
        'columnDefs': [
            { 'orderData':[3], 'targets': [2] },{
                'targets': [3],
                'searchable': true
            },],
            "lengthMenu": [ [-1, 10, 25, 50, 100], ["Todos", 10, 25, 50, 100] ],
            "language": {
            "lengthMenu": "Mostrar _MENU_ registros por página",
            "zeroRecords": "No se encontraron  resultados para esa búsqueda",
            //"info": "Mostrando página _PAGE_ de _PAGES_",
            "info": "Mostrando  _START_  de  _END_ - <b>Total:</b> _TOTAL_ registros",      
            "infoEmpty": "No hay registros disponibles",
            "infoFiltered": "(filtrados de _MAX_ total de registros)",   
            "sSearch":        "Buscar",
            "oPaginate": {
                "sFirst":     "Primera",
                "sPrevious":  "Anterior",
                "sNext":      "Siguiente",
                "sLast":      "Última"
            },
            }
        });
    }
    crearDataTable("#tabla_entidades_bancarias");
</script>