@extends('template.layout')


@section('styles')
    <link href="{{asset('css/icheck/skins/all.css')}}" rel="stylesheet" type="text/css"/>

    <style>
        option{
            background-color: white;
        }
        .min-tardanza{
            width: 10%;
        }
        .tbPersonal_filter{
            display: none;
        }
        .onoffswitch-inner:before{
            content: 'Rindio' !important;
        }
        .onoffswitch-inner:after{
            content: 'No Rindio' !important;
        }
        .onoffswitch{
            width: 100px;
        }
        .onoffswitch-switch{
            right: 70px;
        }
    </style>
@endsection

@section('content')
    <h1 class="page-title">
        <a class=" icon-action-undo" href="{{ url('registro/secciones') }}" style="padding: 5px;"></a>
        Detalle de Notas Registradas | {{ $curso['nombre']  }}
    </h1>
    <div class="portlet light bordered">
        <div class="portlet-title">
            <div class="caption">
                <h4 class="modal-title caption-subject font-blue-secondary sbold uppercase"> Listado de Alumnos | Evaluaci&oacute;n: {{ $detalle['nombre'] }}</h4>
                <input type="hidden" id="evalucion" value="{{ $detalle['nombre'] }}" data-curso="{{ $detalle['id'] }}" />
            </div>
        </div>
        <div class="portlet-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="col-md-12">
                        <div class="col-md-6">
                            <h4><i class="glyphicon glyphicon-search"></i>  Busqueda avanzada</h4>
                        </div>
                        <div class="col-md-6">
                            <h6 style="margin-bottom: 0px; margin-top: 16px">Por: C&oacute;digo, Nombre y Apellidos del Alumno</h6>
                        </div>
                        <input type="search" class="form-control input-md" id="text-filter" aria-controls="tbEncuestas">
                    </div>
                </div>
            </div>
            <div class="Forum-ForumTopicList row" style="margin:20px">
                <table class="table table-hover nowrap dataTable dtr-inline collapsed tbPersonal"
                       id="tbPersonal"
                       width="100%" role="grid" aria-describedby="tbPersonal_info">
                    <thead class="thead-default" style="text-align: center !important;">
                    <tr style="text-align: center !important;">
                        <th class="col-sm-2 col-md-2 col-lg-2" style="text-align: center !important;">C&oacute;digo de Alumno</th>
                        <th class="col-sm-2 col-md-2 col-lg-2" style="text-align: center !important;">Nombre del Alumno</th>
                        <th class="col-sm-2 col-md-2 col-lg-2" style="text-align: center !important;">Apellido Paterno</th>
                        <th class="col-sm-2 col-md-2 col-lg-2" style="text-align: center !important;">Apellido Materno</th>
                        <th class="col-sm-1 col-md-1 col-lg-1" style="text-align: center !important;">Nota</th>
                        <th class="col-sm-1 col-md-1 col-lg-1" style="text-align: center !important;">Peso</th>
                        <th class="col-sm-2 col-md-2 col-lg-2" style="text-align: center !important;">Estado</th>
                    </tr>
                    </thead>
                    <tbody style="text-align: center !important;">
                    @foreach($Arr as $item)
                        <tr>
                            <td> {{ $item->codigo }} </td>
                            <td> {{ $item->uNombre }} </td>
                            <td> {{ $item->uAP }} </td>
                            <td> {{ $item->uAM }} </td>
                            <td> {{ $item->nota }} </td>
                            <td> {{ $item->porcentaje }} %</td>
                            <td> {{ $item->descripcion }} </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <div id="ModalEval"></div>
@endsection

@section('scripts')
    <script>
        $(document).ready(function () {

            var tablePersonal = $('#tbPersonal').DataTable({
                "lengthMenu": [[40, 20, 50, -1], [40, 20, 50, "Todas"]],
                bFilter: true,
                "bLengthChange": false,
                bInfo: true,
                "searching": true,
                responsive: true,
                "autoWidth": true,
                dom: 'Bfrtip',
                buttons: [
                    {
                        extend: 'excelHtml5',
                        title: 'Reporte de Notas ingresadas'
                    }
                ],
                "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": true},
                    {"bSearchable": true},
                    {"bSearchable": true},
                    {"bSearchable": true},
                    {"bSearchable": false},
                    {"bSearchable": false},
                    {"bSearchable": false}
                ],
                "columns": [
                    {"orderable": true},
                    {"orderable": true},
                    {"orderable": true},
                    {"orderable": true},
                    {"orderable": false},
                    {"orderable": false},
                    {"orderable": false}
                ]
            });

            $("#tbPersonal_filter").hide();


            $("#text-filter").on('keyup',function () {
                tablePersonal
                    .search($(this).val())
                    .draw();
            });


        });

    </script>
@endsection

