👁 查看:c190ff0fa65c6aa673451a159a535feca50f4ed0.php
路径:/home/boguraj1/.trash/storage/framework/views/c190ff0fa65c6aa673451a159a535feca50f4ed0.php
大小:3.77 KB · 修改:2026-07-24 17:26:51 · 权限:0644 · 可写
<div class="d-flex justify-content-between align-items-center mb-3">
    <h6 class="fw-bold mb-0 text-muted"><?php echo e($title); ?></h6>
    <button type="button" class="btn btn-sm btn-outline-danger" data-bs-toggle="modal" data-bs-target="#addMenuModal">
        <i class="bi bi-plus-circle me-1"></i> Add Item
    </button>
</div>

<?php if($items->isEmpty()): ?>
<div class="alert alert-light text-center text-muted py-4">
    <i class="bi bi-list-ul fs-3 d-block mb-2"></i>
    No menu items yet. Click "Add Item" to create one.
</div>
<?php else: ?>
<div class="table-responsive">
<table class="table table-bordered align-middle mb-0" style="font-size:14px">
    <thead class="table-light">
        <tr>
            <th style="width:50px">Order</th>
            <th>Label</th>
            <th>URL</th>
            <th style="width:130px">Route Name</th>
            <th style="width:110px">Icon</th>
            <th style="width:100px">Open In</th>
            <th style="width:90px" class="text-center">Enabled</th>
            <th style="width:60px"></th>
        </tr>
    </thead>
    <tbody>
    <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
    <tr>
        <td>
            <input type="number" name="items[<?php echo e($item->id); ?>][sort_order]"
                value="<?php echo e($item->sort_order); ?>"
                class="form-control form-control-sm text-center" style="width:55px">
        </td>
        <td>
            <input type="text" name="items[<?php echo e($item->id); ?>][label]"
                value="<?php echo e($item->label); ?>"
                class="form-control form-control-sm">
        </td>
        <td>
            <input type="text" name="items[<?php echo e($item->id); ?>][url]"
                value="<?php echo e($item->url); ?>"
                class="form-control form-control-sm">
        </td>
        <td>
            <input type="text" name="items[<?php echo e($item->id); ?>][route_name]"
                value="<?php echo e($item->route_name); ?>"
                class="form-control form-control-sm" placeholder="optional">
        </td>
        <td>
            <input type="text" name="items[<?php echo e($item->id); ?>][icon]"
                value="<?php echo e($item->icon); ?>"
                class="form-control form-control-sm" placeholder="bi-house">
        </td>
        <td>
            <select name="items[<?php echo e($item->id); ?>][target]" class="form-select form-select-sm">
                <option value="_self" <?php echo e($item->target === '_self' ? 'selected' : ''); ?>>Same Tab</option>
                <option value="_blank" <?php echo e($item->target === '_blank' ? 'selected' : ''); ?>>New Tab</option>
            </select>
        </td>
        <td class="text-center">
            <div class="form-check form-switch d-flex justify-content-center">
                <input class="form-check-input" type="checkbox" role="switch"
                    name="items[<?php echo e($item->id); ?>][is_enabled]"
                    <?php echo e($item->is_enabled ? 'checked' : ''); ?>

                    style="width:2.2em;height:1.2em;cursor:pointer">
            </div>
        </td>
        <td class="text-center">
            <button type="button" class="btn btn-sm btn-outline-danger border-0"
                title="Delete"
                onclick="deleteMenuItem('<?php echo e(route('admin.menus.destroy', $item)); ?>')">
                <i class="bi bi-trash"></i>
            </button>
        </td>
    </tr>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody>
</table>
</div>
<?php endif; ?>
<?php /**PATH /home/boguraj1/public_html/udoktaecom/resources/views/admin/menu/_table.blade.php ENDPATH**/ ?>