@extends('template.layout')

@section('content')
    @include('sweet::alert')

    <div class="portlet light portlet-fit portlet-datatable bordered">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green sbold uppercase"> Trámites de alumnos </span>
            </div>
        </div>
        <div class="portlet-body">

            <div class="Forum-ForumTopicList row" style="margin:20px">
                <div class="col-lg-12" id="divTable">
                    <table class="table table-hover nowrap dataTable dtr-inline collapsed tbAlumnos"
                           id="tbAlumnos"
                           width="100%" role="grid" aria-describedby="tbAlumnos_info">
                        <thead class="thead-default">
                        <tr>
                            <th>N°</th>
                            <th>Código</th>
                            <th>Nombre alumno</th>
                            <th>Opciones</th>
                        </tr>
                        </thead>
                        <tbody>
                        @php ($count = 1)
                        @foreach($alumnos as $item)
                            <tr>
                                <td> {{ $count }} </td>
                                <td> {{ $item->codigo }}</td>
                                <td> {{ $item->apellido_paterno }} {{ $item->apellido_materno }}, {{ $item->nombres }} </td>
                                <td>
                                    <a href="{{url('reportestramite/alumnos/tramites',['id' => $item->userid ])}}"
                                       class="btn btn-outline btn-circle btn-sm purple">
                                        Ver tramites
                                    </a>
                                </td>
                            </tr>
                            @php ($count++)
                        @endforeach
                        </tbody>
                    </table>
                </div>
            </div>


        </div>

    </div>


@endsection
@section('scripts')
    <script>

        var tbAlumnos = $('#tbAlumnos').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": false},
            ],
            "columns": [
                {"orderable": false},
                {"orderable": true},
                {"orderable": true},
                {"orderable": false},
            ],
        });

    </script>
@endsection
