<?php $__env->startSection('title', 'Subjects'); ?>
<?php $__env->startSection('page_title', 'Subjects'); ?>
<?php $__env->startSection('breadcrumbs'); ?>
    <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Home</a></li><li class="breadcrumb-item active">Subjects</li>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page_actions'); ?>
    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('academics.create')): ?><a href="<?php echo e(route('subjects.create')); ?>" class="btn btn-primary"><i class="bi bi-plus-lg me-1"></i>Add Subject</a><?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="card"><div class="card-body">
        <table class="table table-hover align-middle js-datatable">
            <thead><tr><th>Subject</th><th>Code</th><th>Type</th><th class="text-center">Classes</th><th class="text-center">Status</th><th class="text-end">Actions</th></tr></thead>
            <tbody>
                <?php $__currentLoopData = $subjects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subject): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td class="fw-semibold"><?php echo e($subject->name); ?></td>
                        <td><?php echo e($subject->code ?: '—'); ?></td>
                        <td><?php if($subject->is_elective): ?><span class="badge bg-soft-warning">Elective</span><?php else: ?><span class="badge bg-soft-primary">Core</span><?php endif; ?></td>
                        <td class="text-center"><?php echo e($subject->classes_count); ?></td>
                        <td class="text-center"><?php if($subject->is_active): ?><span class="badge bg-soft-success">Active</span><?php else: ?><span class="badge bg-soft-danger">Inactive</span><?php endif; ?></td>
                        <td class="text-end">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('academics.update')): ?><a href="<?php echo e(route('subjects.edit', $subject)); ?>" class="btn btn-sm btn-light border"><i class="bi bi-pencil"></i></a><?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('academics.delete')): ?><form method="POST" action="<?php echo e(route('subjects.destroy', $subject)); ?>" class="d-inline" data-confirm="Delete <?php echo e($subject->name); ?>?"><?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?><button class="btn btn-sm btn-light border text-danger"><i class="bi bi-trash"></i></button></form><?php endif; ?>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    </div></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/u385418287/domains/itartificer.com/public_html/sms-erp/resources/views/academics/subjects/index.blade.php ENDPATH**/ ?>