<?php $__env->startSection('title', 'Tipo Base'); ?>
<?php $__env->startSection('content'); ?>
<div class="col-sm-12 col-md-9 col-lg-10 col-xl-10">
    <h3 class="text-center titulo">Tipo Base</h3>
    <div class="well bg-light col-12 text-right inferior borde-well">
        <a href="RegistrarTipoBase" class="btn btn-primary fa fa-plus sombra superior inferior" title="Registrar Nuevo"></a>
    </div>
    <table class="table table-striped table-condensed table-bordered" id="table" data-toggle="dataTable" data-form="deleteForm">
        <thead>
            <tr>
                <th>Nombre</th>
                <th>Clase</th>
                <th width="7%"></th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e(ucwords(mb_strtolower($row->nombre))); ?></td>
                    <td><?php echo e($row->clase); ?></td>
                    <td>
                        <a class="fa fa-pencil icons" href="<?php echo e(route('ModificarTipoBase', encrypt($row->id_unico))); ?>"></a>
                        <?php echo Form::model($data, ['method' => 'post', 'route' => ['EliminarTipoBase', encrypt($row->id_unico)], 'class' => 'form-tabla form-delete']); ?>

                        <?php echo Form::button(trans(''), ['class' => 'fa fa-trash icons btn-sin cursor', 'type' => 'submit']); ?>

                        <?php echo Form::hidden('id_unico', encrypt($row->id_unico)); ?>

                        <?php echo Form::close(); ?>

                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('modal-confirm', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->startSection('script'); ?>
<script>
    $('table[data-form="deleteForm"]').on('click', '.form-delete', function(e){
        e.preventDefault();
        var $form=$(this);
        $('#confirm').modal({ backdrop: 'static', keyboard: false })
            .on('click', '#delete-btn', function(){
                $form.submit();
            });
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>