HEX
Server: Apache/2.4.61 (Ubuntu)
System: Linux hosting106 7.0.12-1-pve #1 SMP PREEMPT_DYNAMIC PMX 7.0.12-1 (2026-06-09T21:07Z) x86_64
User: clinicadentalargarate.com (1193)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/cursos.ril.es/storage/framework/views/c1ab3f34f2d9ad8eadbe37374239743026e91934.php
<?php $__env->startSection('header'); ?>
    @parent

    <title>Interesados</title>
    <?php echo Html::style('styles/lista.css'); ?>

    <?php echo Html::style('styles/jquery.growl.css'); ?>



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

<?php $__env->startSection('pagina'); ?>

    <div class="separacion-top"></div>

    <div class="col-sm-8 col-sm-offset-2">

        <div class="page-header">
            <h1><span class="fi-torsos-all"></span> Lista Interesados del curso: <small><?php echo e($curso->resumen . " " . $curso->fechaInicio); ?></small> <a href="/admin/alumnoscursos/<?php echo e($curso->id); ?>" class="btn btn-primary">Ir al curso</a></h1>

            <input type="hidden" id="idCurso" name="idCurso" value="<?php echo e($curso->id); ?>">
            <div class="form-group">
                <select name="plantillas" id="plantillas" class="form-control">
                    <?php foreach($plantillas as $plantilla): ?>
                        <option value="<?php echo e($plantilla->id); ?>"><?php echo e($plantilla->nombre); ?></option>
                    <?php endforeach; ?>
                </select>
            </div>
            <button class="btn btn-info" id="enviar">Enviar <span class="fi-mail"></span></button>
        </div>

        <div class="col-sm-12" style="padding: 0;">
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>Nombre y apellidos</th>
                        <th>Email</th>
                        <th>Puede</th>
                        <th>Nº Intentos</th>
                        <th>Quitar</th>
                    </tr>
                    </thead>

                    <tbody>
                    <?php foreach($listaInteresados as $dts): ?>
                    <tr>
                        <td><?php echo e($dts['nombreApellidos']); ?></td>
                        <td><?php echo e($dts['email']); ?></td>
                        <td>
                            <form action="/listaInteresados/puede/<?php echo e($dts['puede']); ?>/<?php echo e($dts['ids']); ?>" method="post">
                                <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
                                <?php if($dts['puede']==0): ?>
                                    <button type="submit" class="btn btn-warning">No</button>
                                <?php else: ?>
                                    <button type="submit" class="btn btn-success">Si</button>
                                <?php endif; ?>
                            </form>
                        </td>
                        <td><?php echo e($dts['intentos']); ?></td>
                        <td>
                            <button class='btn btn-default' data-toggle='modal' data-target='#quitarAlumno' onclick='modal("<?php echo e($dts['ids']); ?>");'><span class='fi-x'></span></button>
                        </td>
                    </tr>
                    <?php endforeach; ?>
                    </tbody>

                </table>
            </div>
            <button class="btn btn-primary" id="insertar">Nuevo Interesado</button>
            <a href="/listaInteresados/pasar/<?php echo e($curso->id); ?>" class="btn btn-success">Pasar Alumnos</a>
        </div>
    </div>


    <!--
    ---------------------------------------------------------------------------------------------------
                                                MODAL'S
    ---------------------------------------------------------------------------------------------------
    -->

<div class="col-sm-12">
    <div class="contenedor" data-behaviour="search-on-list">
        <input type="text" class="input-query" data-search-on-list="search" placeholder="Buscar..."/>
        <span class="counter" data-search-on-list="counter"></span>
        <div class="list-wrap">
            <ul class="list" data-search-on-list="list">
                <?php foreach($alumnos as $alumno): ?>
                    <li class="list-item" data-search-on-list="list-item">
                        <a href="/listaInteresados/insertaralumno/<?php echo e($curso->id); ?>/<?php echo e($alumno->id); ?>" class="list-item-link"><?php echo e($alumno->name . ' ' . $alumno->apellidos); ?> <span class="item-list-subtext"><?php echo e($alumno->email); ?></span></a>
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>
    </div>
</div>


    <div id="quitarAlumno" class="modal fade" role="dialog">
        <div class="modal-dialog">

            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">Quitar el Alumno</h4>
                </div>
                <div class="modal-body">
                    <p>¿Quitar al Alumno de la lista de Interesados?</p>
                </div>
                <div id="modal-append" class="modal-footer">

                </div>
            </div>

        </div>
    </div>


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

<?php $__env->startSection('footer'); ?>
    @parent


    <script src="https://code.jquery.com/jquery-2.2.3.min.js" integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
    <?php echo Html::script('jquery.growl.js'); ?>

    <script>

        (function() {
            // TODO: be more elegant here
            function format(text) {
                return text.replace(/ /g, '').replace(/(<([^>]+)>)/ig, '').toLowerCase();
            }

            var SearchOnList = {
                $LIST: '[data-search-on-list=list]',
                $SEARCH: '[data-search-on-list=search]',
                $LIST_ITEM: '[data-search-on-list=list-item]',
                $COUNTER: '[data-search-on-list=counter]',
                TEMPLATE_EMTPY: '<li class="list-item list-item--disable">No se encontraron resultados</li>',

                init: function($element) {
                    this.items = [];
                    this.itemsMatched = [];

                    this.$element = $element;
                    this.$list = this.$element.find(this.$LIST);
                    this.$search = this.$element.find(this.$SEARCH);
                    this.$counter = this.$element.find(this.$COUNTER);

                    this.items = this._getAllItems();
                    this.itemsMatched = this.items;

                    this._updateCounter();
                    this._handleResults();
                    this._setEventListeners();
                },

                _setEventListeners: function() {
                    this.$search
                            .on('keyup', $.proxy(this._onKeyup, this))
                            .on('query:changed', $.proxy(this._handleQueryChanged, this))
                            .on('query:results:some', $.proxy(this._handleResults, this))
                            .on('query:results:none', $.proxy(this._handleNoResults, this))
                },

                _onKeyup: function() {
                    var query = this.$search.val(),
                            previousQuery = this.$search.data('previousQuery', query);

                    // TODO: Decide when query actually changed
                    if (this._queryChanged()) {
                        this.$search.trigger('query:changed', {
                            query: query,
                            previousQuery: previousQuery
                        });
                    }
                },

                _queryChanged: function() {
                    var query = this.$search.val();
                    if ($.trim(query).length === 0 && this.$search.data('previousQuery') === undefined) {
                        return false;
                    }
                    return true;
                },

                _handleQueryChanged: function(e, data) {
                    this.itemsMatched = this.items.map(function(item) {
                        if (format(item.name).match(format(data.query))) {
                            return {
                                name: item.name,
                                visible: true
                            }
                        }
                        return {
                            name: item.name,
                            visible: false
                        }
                    });

                    this._render();
                    this._updateCounter();
                },

                _handleNoResults: function() {
                    this.$list.html(this.TEMPLATE_EMTPY);
                },

                _handleResults: function() {
                    this.$list.empty().append(this._renderItemsVisible())
                },

                _someItemsVisible: function() {
                    return this.itemsMatched.some(function(item) {
                        return item.visible;
                    });
                },

                _render: function() {
                    (this._someItemsVisible()) ?
                            this.$search.trigger('query:results:some'):
                            this.$search.trigger('query:results:none');
                },

                _updateCounter: function() {
                    (this._someItemsVisible()) ?
                            this.$counter.text(this._renderItemsVisible().length):
                            this.$counter.text('');
                },

                _getAllItems: function() {
                    var $items = this.$list.find(this.$LIST_ITEM);

                    return $items.map(function() {
                        var $item = $(this);

                        return {
                            name: $item.html(),
                            visible: true
                        };
                    }).toArray();
                },

                _renderItemsVisible: function() {
                    var itemInTemplate;
                    return this.itemsMatched.sort(function(a, b) {
                        if (a.name < b.name) return -1
                        if (a.name > b.name) return 1;
                        return 0;
                    }).reduce(function(items, item) {
                        itemInTemplate = '<li class="list-item" data-search-on-list="list-item">' + item.name + '</li>';
                        if (item.visible) {
                            items.push(itemInTemplate);
                        }
                        return items;
                    }, []);
                }
            };

            window.SearchOnList = SearchOnList;
        })();

        SearchOnList.init($('[data-behaviour=search-on-list]'));


        $(document).ready(function(){
            $(".contenedor").hide();

            $("#insertar").click(function(){
                if($(".contenedor").is(":visible")){
                    $(".contenedor").hide();
                }
                else{
                    $(".contenedor").show();
                }
            });
        });


    </script>

    <script>
        function modal(ids){
            $("#modal-append").empty();
            var form = "<form method='POST' action='/listaInteresados/quitar/" + ids + "' style='float: right;'><input type='hidden' name='_token' value='<?php echo csrf_token(); ?>'><input name='_method' type='hidden' value='DELETE'><button type='submit' class='btn btn-danger'></span> Borrar</button></form>";
            var boton = "<button type='button' class='btn btn-default' data-dismiss='modal' style='float: left;'>Cancelar</button>";
            $("#modal-append").append(form);
            $("#modal-append").append(boton);
        }

        $(document).ready(function() {

            $('#enviar').click(function(){
                $.ajaxSetup({
                    headers: {
                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                    }
                });
                $.ajax({
                    url: "/listaInteresados/mails",
                    method: "POST",
                    data:
                    {
                        id : $("#idCurso").val(),
                        idPlantilla : $("#plantillas").val(),
                    },
                    datatype: "text"
                }).done(function(){
                    $.growl.notice({ message: "Se enviaron los mails con éxito" });
                });
            });

        });

    </script>

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