<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('sweet::alert', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    <h1 class="page-title">
        Gesti&oacute;n de Bolsa de trabajo
    </h1>
    <div class="portlet light portlet-fit portlet-datatable bordered">

        <div class="portlet-body">

            <div class="portlet light portlet-fit portlet-form bordered">
                <div class="portlet-title col-lg-12 col-xs-12" style="padding: 25px 25px 25px 25px;">
                    <div class="caption">
                        <span class="caption-subject font-green sbold uppercase"> Alumnos candidatos </span>
                    </div>
                </div>

                <div class="col-lg-12 col-xs-12" style="padding: 25px 25px 25px 25px;">

                    <div class="col-lg-3">
                        <span class="caption-subject uppercase">Especialidad: </span>

                        <select class="bs-select form-control" id="selectEspecialidad">
                            <?php $__currentLoopData = $especialidad; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($item->id); ?>"><?php echo e($item->nombre); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>

                    <div class="col-lg-2">
                        <span class="caption-subject uppercase">Ciclo: </span>

                        <select class="bs-select form-control" id="selectCiclo">
                            <?php $__currentLoopData = $ciclo; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($item->id); ?>"><?php echo e($item->nombre); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>

                    <div class="col-lg-1">
                        <button class="btn blue btn-outline sbold" onclick="filter()" style="margin-top: 20px;">Aplicar</button>
                    </div>


                </div>

                <?php if(count($alumnos) > 0): ?>
                    <div id="divalumnos">

                        <div class="row margin-bottom-20 stories-cont">
                            <?php $__currentLoopData = $alumnos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-lg-4 col-md-6">
                                    <div class="portlet light">
                                        <div class="photo">
                                            <?php if($item->urlimage == null): ?>
                                                <img src="<?php echo e(asset('img/demo/perfil.jpg')); ?>" alt=""
                                                     class="img-responsive"/>
                                            <?php else: ?>
                                                <img src="<?php echo e(asset($item->urlimagen)); ?>" alt=""
                                                     class="img-responsive"/>
                                            <?php endif; ?>
                                        </div>
                                        <div class="title">
                                                <span> <?php echo e($item->apellido_paterno); ?> <?php echo e($item->apellido_materno); ?>

                                                    , <?php echo e($item->nombres); ?></span>
                                        </div>
                                        <div class="desc">
                                            <span> <?php echo e($item->descripcion); ?> </span>
                                            <div class="row">
                                                <a type="button"
                                                   href="<?php echo e(url('bolsatrabajo/usuario/detalle',['id' => $item->id ])); ?>"
                                                   class="btn green featured-price sbold uppercase price-button">
                                                    Ver Detalle
                                                </a>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>

                        <div class="row margin-bottom-20 stories-cont" style="margin-left: 20px;">
                            <?php echo e($alumnos->links()); ?>

                        </div>

                    </div>
                <?php else: ?>
                    <div class="row"></div>
                    <div class="portlet-body">
                        <div class="well" style="text-align: center;"> No se encontraron alumnos candidatos.</div>
                    </div>
                <?php endif; ?>

            </div>

        </div>

    </div>

    <script>
        function filter() {

            var cicloid = $("#selectCiclo").val();

            var especialidadid = $("#selectEspecialidad").val();

            window.location.href = "<?php echo e(url('gestionbolsa/tbalumnos')); ?>" + "/" + especialidadid + "/" + cicloid;


        }

    </script>

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