<table class="table table-hover nowrap dataTable dtr-inline collapsed tbCurso" id="tbCurso" width="100%" role="grid"
       aria-describedby="tbCurso_info">
    <thead class="thead-default">
    <tr>

        <th>N°</th>
        <th>Ciclo</th>
        <th>Curso</th>
        <th>Sección</th>
        <th>Opciones</th>
    </tr>
    </thead>
    <tbody>
    @php ($count = 1)
    @foreach($tbcursos as $item)
        <tr>

            <td> {{ $count }} </td>
            <td> {{ $item->ciclo }} </td>
            <td> {{ $item->Curso }} </td>
            <td> {{ $item->nombre_seccion }} </td>
            <td>
                <a href="{{url('reportesasistencia/cursos/asistencias/alumnos/detalle',["seccionID" => $item->id])}}"
                   class="btn btn-outline btn-circle btn-sm">
                    <i class="fa fa-eye"></i> Ver Asistencias
                </a>
            </td>

        </tr>
        @php ($count++)
    @endforeach
    </tbody>
</table>

<script>
    $('#tbCurso').DataTable({
        "lengthMenu": [[25, 20, 50, -1], [25, 20, 50, "Todas"]],
        bFilter: true,
        "bLengthChange": false,
        bInfo: true,
        responsive: true,
        "autoWidth": true,
        "language": {
            "lengthMenu": "Mostrar _MENU_ Entradas",
            "zeroRecords": "No se encontraron registros",
            "info": "Mostrando la página _PAGE_ de _PAGES_",
            "infoEmpty": "No hay registros disponibles",
            "infoFiltered": "(filtrado de _MAX_ registros totales)",
            "search": "Buscar: ",
            "paginate": {
                "first": "Primero",
                "last": "Último",
                "next": "Siguiente",
                "previous": "Anterior"
            },
        },
        "order": [],
        "aoColumns": [
            {"bSearchable": false},
            {"bSearchable": true},
            {"bSearchable": true},
            {"bSearchable": true},
            {"bSearchable": false},
        ],
        "columns": [
            {"orderable": false},
            {"orderable": true},
            {"orderable": true},
            {"orderable": true},
            {"orderable": false},
        ],
        dom: 'Bfrtip',
        buttons: [
            {
                extend: 'excel',
                exportOptions: {
                    columns: [ 0, 1, 2,3 ]
                },
                title: 'Cursos'
            },{
                extend: 'pdf',
                exportOptions: {
                    columns: [ 0, 1, 2 ,3]
                },
                pageSize: 'LEGAL',
                customize: function(doc) {
                    //pageMargins [left, top, right, bottom]
                    doc.pageMargins = [ 120, 20, 20, 20 ];
                },
                title: 'Cursos'
            }

        ]
    });
</script>