<?php $__env->startSection('content'); ?>
<div class="clearfix">
    <div class="full-width-container">
        <?php echo $__env->make('masterHeaderAdmin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        <main class="main-container">
            <?php echo $__env->make('masterSidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <div class="page-body">
                <div class="nav-breadcrumbs">
                    <ul class="breadcrumbs">
                        <li>
                            <a href="<?php echo e(route('admin')); ?>" class="breadcrumbs-link">TRANG CHỦ</a>
                        </li>
                        <li>
                            <a href="<?php echo e(route('quanlytintuc')); ?>" class="breadcrumbs-link">QUẢN LÝ TIN TỨC</a>
                        </li>
                        <li>
                            <a href="<?php echo e(route('danhsachbaiviet')); ?>" class="breadcrumbs-link">DANH SÁCH BÀI VIẾT</a>
                        </li>
                    </ul>
                    <a href="<?php echo e(route('quanlytintuc')); ?>" class="page-button">
                        <i class="fa-solid fa-rotate-left"></i> Quay lại
                    </a>
                </div>
                <div class="page-table">
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="small">STT</th>
                                <th>Tiêu đề</th>
                                <th>Thời gian cập nhật</th>
                                <th>Loại tin</th>
                                <th>Link chi tiết</th>
                                <th class="small">Xem</th>
                                <th class="small">Sửa</th>
                                <th class="small">Xóa</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $tintucs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tintuc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($tintuc->MaTinTuc); ?></td>
                                <td><?php echo e($tintuc->TieuDe); ?></td>
                                <td><?php echo e($tintuc->updated_at); ?></td>
                                <td><?php echo e($tintuc->loaitin->TenLoaiTin); ?></td>
                                <td><?php echo e($tintuc->LinkChiTiet); ?></td>
                                <td >
                                    <a href="<?php echo e(url('/tin-tuc')); ?>/<?php echo e($tintuc->LinkChiTiet); ?>" class="table-icon" target="_blank">
                                        <i class="fa-solid fa-eye "></i>
                                    </a>
                                </td>
                                <td>
                                    <a href="<?php echo e(route('suabaiviet',$tintuc->MaTinTuc)); ?>" class="table-icon">
                                        <i class="fa-solid fa-file-pen"></i>
                                    </a>
                                </td>
                                <td>
                                    <a href="<?php echo e(route('del_baiviet',$tintuc->MaTinTuc)); ?>"  onclick="return confirm('Bạn có chắc muốn xóa mục này? Thao tác này không thể hoàn trả.')" class="table-icon">
                                        <i class="fa-solid fa-trash"></i>
                                    </a>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>

            </div>
        </main>

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

<?php echo $__env->make('masterAdmin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/demo/public_html/resources/views/admin/danhsachbaiviet.blade.php ENDPATH**/ ?>