<?php $__env->startSection('title', 'Accueil'); ?>

<?php $__env->startSection('content'); ?>
<div class="pagetitle">
    <h1>CSDs</h1>
    <nav>
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="">Accueil</a></li>
            <li class="breadcrumb-item active">CSDs</li>
        </ol>
    </nav>
</div>

<section class="section">
    <div class="row">
        <div class="col-lg-12">

            <div class="card">
                <div class="card-body">
                    <h5 class="card-title">
                        <a href="<?php echo e(route('csds.create')); ?>" class="btn btn-primary rounded-pill">
                            <i class="bi bi-plus-circle"></i> Ajouter
                        </a>
                    </h5>

                    <button onclick="exportTableToExcel('cadre-sectoriel-table', 'cadre_sectoriel.xlsx', {includeColumns: [0,1,2]})" 
        class="btn btn-success">
            Exporter en Excel
            </button>
                  
                    <table class="table datatable table-custom" id="cadre-sectoriel-table">
                        <thead>
                            <tr>
                                <th style="min-width: 100px;">Code</th>
                                <th>Nom</th>
                                <th>Description</th>
                                <th>Editer</th>
                                <th>Supprimer</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $csds; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $csd): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($csd->code); ?></td>
                                    <td><?php echo e($csd->nom); ?></td>
                                    <td><?php echo e($csd->description); ?></td>
                                    <td>
                                        <a href="<?php echo e(route('csds.edit', $csd->id)); ?>" class="btn-sm-status btn-sm-status-info">
                                            <i class="bi bi-pen"></i>
                                        </a>
                                    </td>
                                    <td>
                                        <a href="<?php echo e(route('csds.destroy', $csd->id)); ?>" 
                                           class="btn-sm-status btn-sm-status-danger"
                                           onclick="return confirm('Supprimer ce CSD ?')">
                                           <i class="bi bi-trash"></i>
                                        </a>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                    <!-- End Table -->

                </div>
            </div>

        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/phaso/resources/views/csds/index.blade.php ENDPATH**/ ?>