<?php $__env->startSection('content'); ?>
    <div class="container">
        <div>
            <h2 class="pb-2">Bibliothèque projets
                <?php if(Auth::user()->can('add_bibliotheque_projets')): ?>
                    <a class="btn btn-outline-success float-right mb-4" href="<?php echo e(route('bibliotheque_projets.create')); ?>">Ajouter</a>
                <?php endif; ?>
            </h2>
        </div>

        <?php echo $__env->make('layouts.commons.errors', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        <?php echo $__env->make('layouts.commons.success', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        <?php if(sizeof($bibliotheque_projets) > 0): ?>
            <table class="table table-striped table-bordered">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>Objet</th>
                    <th>Actions</th>
                </tr>
                </thead>
                <tbody>
                <?php $__currentLoopData = $bibliotheque_projets; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($p->id); ?></td>
                        <td><?php echo e($p->objet); ?></td>
                        <td style="width: 15%">
                            <a class="btn btn-outline-info" href="<?php echo e(route('bibliotheque_projets.show', $p->id)); ?>"
                                data-toggle="tooltip" data-placement="top" title="Voir">
                                <i class="fas fa-eye"></i>
                            </a>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('creer_projet_from_bibliotheque_projets')): ?>
                                <a class="btn btn-outline-primary" href="<?php echo e(route('bibliotheques_projets.creer_projet', $p->id)); ?>"
                                    data-toggle="tooltip" data-placement="top" title="Créer projet">
                                    <i class="fas fa-folder-plus"></i>
                                </a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete_bibliotheque_projets')): ?>
                                <form class="inline-form-table" action="<?php echo e(route('bibliotheque_projets.destroy', $p->id)); ?>" method="POST">
                                    <?php echo csrf_field(); ?>
                                    <?php echo e(method_field('DELETE')); ?>

                                    <button type="submit" class="btn btn-outline-danger"
                                        data-toggle="tooltip" data-placement="top" title="Supprimer">
                                        <i class="fas fa-trash-alt"></i>
                                    </button>
                                </form>
                            <?php endif; ?>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>

            
        <?php else: ?>
            <div class="pt-2">
                <h4>Pas de données disponible.</h4>
            </div>
        <?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/resources/views/bibliotheque_projets/index.blade.php ENDPATH**/ ?>