

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

<?php $__env->startSection('content'); ?>
<div class="page-content">
    <nav class="page-breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></li>
            <li class="breadcrumb-item active" aria-current="page">Data Kurikulum</li>
        </ol>
    </nav>
    <div class="row">
        <div class="col-md-12 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">
                    <div class="panel-heading mb-3 d-flex justify-content-between align-items-center">
                        <h1 class="card-title">Data Kurikulum</h1>
                        <a href="<?php echo e(route('kurikulum.create')); ?>" class="btn btn-primary">
                            <i class="fa fa-plus fa-fw"></i> Tambah Kurikulum
                        </a>
                    </div>
                    <div class="panel-body">
                        <?php if(session('message')): ?>
                            <div class="alert alert-success alert-dismissible fade show" role="alert">
                                <?php echo e(session('message')); ?>

                                <button type="button" class="btn-close" data-bs-dismiss="alert"
                                    aria-label="Close"></button>
                            </div>
                        <?php endif; ?>
                        <div class="table-responsive">
                            <table class="table table-bordered table-striped">
                                <thead>
                                    <tr>
                                        <th>No</th>
                                        <th>Jurusan</th>
                                        <th>File</th>
                                        <th>Aksi</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__empty_1 = true; $__currentLoopData = $kurikulums; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                        <tr>
                                            <td><?php echo e(($kurikulums->currentPage() - 1) * $kurikulums->perPage() + $index + 1); ?></td>
                                            <td><?php echo e($item->jurusan); ?></td>
                                            <td>
                                                <?php if($item->file): ?>
                                                    <a href="<?php echo e(asset('storage/kurikulumFiles/' . $item->file)); ?>" target="_blank">
                                                        <?php echo e($item->file); ?>

                                                    </a>
                                                <?php else: ?>
                                                    <span class="text-muted">Tidak Ada</span>
                                                <?php endif; ?>
                                            </td>
                                            <td>
                                                <div class="d-flex flex-wrap gap-2">
                                                    <a href="<?php echo e(route('kurikulum.edit', $item->id_kurikulum)); ?>"
                                                        class="btn btn-warning btn-sm">Edit</a>
                                                    <form action="<?php echo e(route('kurikulum.delete', $item->id_kurikulum)); ?>"
                                                        method="POST" style="display:inline-block;">
                                                        <?php echo csrf_field(); ?>
                                                        <?php echo method_field('DELETE'); ?>
                                                        <button type="submit" class="btn btn-danger btn-sm"
                                                            onclick="return confirm('Yakin ingin menghapus data ini?')">Hapus</button>
                                                    </form>
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                        <tr>
                                            <td colspan="4" class="text-center">Tidak ada data kurikulum</td>
                                        </tr>
                                    <?php endif; ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="mt-3">
                        <?php echo e($kurikulums->links('vendor.pagination.simple-bootstrap-5')); ?>

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

<?php echo $__env->make('dashboard.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u142502046/domains/alamin-indramayu.info/IAI/resources/views/admin/kurikulum/index.blade.php ENDPATH**/ ?>