<?php $__env->startSection('content'); ?>
    <section class="container all-container">
        <div class="header-titulo">
            Modulos
        </div>
        <div class="card mb-3">
            <div class="card-header title-buscador-container">
                <div class="title">
                    <div class="icon-titulo">
                    </div>
                </div>
                <div class="tabla-buscador">
                    <div class="barra-container">
                        <a role="button" href="<?php echo e(route('agregarModulos')); ?>" class="btn btn-secondary btn-agregar"  data-toggle="tooltip" data-placement="bottom" title="Crear Modulo">
                            <i class="fas fa-plus"></i>
                        </a>
                        <input type="text" id="myInput" class="form-control" placeholder="Buscar">
                        <select class="form-control pagination-option" url="<?php echo e(route('modulos')); ?>" url2="<?php echo e(route('modulo')); ?>" id="appSelect" onchange="filtrarModulosServidor(this.value)">
                                <option value="">-Filtrar por app</option>
                                <option value="Todos">Todos</option>
                            <?php $__currentLoopData = $aplicaciones; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $aplicacion): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($aplicacion->id); ?>"><?php echo e($aplicacion->nombre); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                        </select>
                    </div>
                </div>
            </div>
            <div class="card-body">
                <div class="table-container">
                    <table class="table table-hover table-bordered text-center">
                        <thead>
                        <tr class="table-active">
                            <th>Nombre</th>
                            <th>Descripcion</th>
                            <th>Aplicacion</th>
                            <th>Fecha</th>
                            <th><i class="fab fa-wpforms"></i></th>
                        </tr>
                        </thead>
                        <tbody id="myTable">
                            <?php if($Allmodulos == '[]'): ?>
                                <tr>
                                    <td colspan="5"><span class="text-muted">No hay Modulos</span></td>
                                </tr>
                            <?php endif; ?>
                            <?php $__currentLoopData = $modulos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $modulo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
                                <tr style="cursor:pointer;z-index:-99" onclick="window.location='<?php echo e(route("modulo",[$modulo->id])); ?>'">
                                    <td><?php echo e(ucfirst($modulo->nombre)); ?></td>
                                    <td><?php echo e($modulo->Descripcion); ?></td>
                                    <td><?php echo e($modulo->app_name); ?></td>
                                    <td><?php echo e($modulo->updated_at); ?></td>
                                    <td><?php echo e($modulo->formC); ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="card-footer small text-muted" id="paginador">
                <?php echo e($modulos->links()); ?>                    
            </div>
        </div>
    </section>
    <style>        
        #mainNav.navbar-dark .navbar-collapse .navbar-sidenav>.nav-item>.modulosLink {color:#1cff2f;}
    </style>
	<script src="<?php echo e(asset('js/modulo.js')); ?>"></script>
	<script src="<?php echo e(asset('js/user.js')); ?>"></script>
	<link  media="all" rel="stylesheet" type="text/css" href="<?php echo e(asset('css/general.css')); ?>">

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