<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('sweet::alert', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

    <div class="portlet light portlet-fit portlet-datatable bordered">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green sbold uppercase"> Asistencia Alumnos </span>
            </div>
        </div>
        <div class="portlet-body">

            <div class="row">
                <div class="col-lg-12">
                    <div class="col-lg-2">
                        <span class="caption-subject uppercase">Ver por: </span>
                    </div>
                    <div class="col-lg-2">

                        <select class="bs-select form-control" id="selectView">
                            <option value="1">Curso y sección</option>
                            <option value="2">Alumno</option>
                        </select>

                    </div>
                </div>
            </div>
            <div class="Forum-ForumTopicList row" style="margin:20px">
                <div class="col-lg-12" id="divTable">
                </div>
            </div>


        </div>

    </div>


<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
    <script>

        $(document).ready(function () {

            if ($("#selectView").val() == "1") {

                $("#divTable").empty();

                $.ajax({

                    url: "<?php echo e(url('reportesasistencia/alumnos/cursos')); ?>",
                    success: function (data) {
                        $("#divTable").html(data);
                    }

                });

            }
            else {

                $("#divTable").empty();

                $.ajax({

                    url: "<?php echo e(url('reportesasistencia/alumnos/lista')); ?>",
                    success: function (data) {
                        $("#divTable").html(data);
                    }

                });

            }

        });


        $("#selectView").change(function () {

            if ($("#selectView").val() == "1") {

                $("#divTable").empty();

                $.ajax({

                    url: "<?php echo e(url('reportesasistencia/alumnos/cursos')); ?>",
                    success: function (data) {
                        $("#divTable").html(data);
                    }

                });

            }
            else {

                $("#divTable").empty();

                $.ajax({

                    url: "<?php echo e(url('reportesasistencia/alumnos/lista')); ?>",
                    success: function (data) {
                        $("#divTable").html(data);
                    }

                });

            }

        });

    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('template.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>