
<?php $__env->startSection('novedades','active'); ?>
<?php $__env->startSection('novedades_true','true'); ?>
<?php $__env->startSection('novedades_show','show'); ?>
<?php $__env->startSection('novedades_collapsed','collapsed'); ?>
<?php $__env->startSection('form'); ?>

<style>
    form{
        margin-bottom: 40px !important;
        height: 100%;
    }
    main{
        max-height: none;
    }
</style>

<div class="container">
    <div class="row">
        <div class="col-12">
            <div class="d-flex justify-content-between">
                <h2>Listado de novedades</h2>
                <a href="<?php echo e(route('crearNovedad')); ?>" class="btn btn-success" >Agregar novedad</a>
            </div>
            
        </div>
        <div class="col-12">
            <table class="table">
                <thead>
                    <tr>
                        <th scope="col">Orden</th>
                        <th scope="col">T&iacute;tulo</th>
                        <th scope="col">Foto</th>
                        <th scope="col">Acci&oacute;n</th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach($novedades as $novedad){ ?>
                        <tr>
                            <td><?= $novedad->orden ?></td>
                            <td><?= $novedad->titulo ?></td>
                            <td>
                                <?php if($novedad->foto){ ?>
                                    <img src="<?php echo e(asset(Storage::url($novedad->foto))); ?>" class="img-thumbnail" style="width: 200px; height: 200px;">
                                <?php } ?>
                            </td>
                            <td>
                                <a class="btn btn-warning" role="button" href="<?= route('editarNovedad', ['id' => $novedad->id]) ?>">
                                    Editar novedad
                                </a>
                                <a class="btn btn-danger" role="button" href="<?= route('eliminarNovedad', ['id' => $novedad->id]) ?>">
                                    Eliminar novedad
                                </a>
                            </td>
                        </tr>
                    <?php } ?>
                </tbody>
            </table>
        </div>
    </div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('adm.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/d11osolecom/public_html/grupohelmont/resources/views/adm/novedades/index.blade.php ENDPATH**/ ?>