
<?php $__env->startSection('title'); ?> বিজ্ঞাপন | TESTPAPER <?php $__env->stopSection(); ?>
<?php $__env->startSection('ads'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('ads.index'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('styles'); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('main_content_section'); ?>
<div class="row py-3 ps-2">
    <div class="heading d-flex justify-content-start align-items-center">
        <h3 class="mb-0"><span> বিজ্ঞাপন তালিকা</span></h3>
    </div>
</div>

<div class="table_wrapper py-1 card">
    <div class="row my-2 aggregate-section-div">
        <div class="px-3 ">
            <div class=" d-flex justify-content-between align-items-center aggregate-section border">
                <div class="d-flex align-items-center">
                    <p class="mb-0"><a href="<?php echo e(route('ads.index')); ?>"
                            class="text-primary py-2 px-3">সব(<?php echo e($allAdsCount); ?>)</a>
                    </p>

                    <p class="mb-0"><a href="<?php echo e(route('active-ads-list')); ?>"
                            class="text-primary py-2 px-3 active">সক্রিয়(<?php echo e($data->count()); ?>)</a></p>
                    <p class="mb-0"><a href="<?php echo e(route('inactive-ads-list')); ?>"
                            class="text-primary py-2 px-3">নিষ্ক্রিয়(<?php echo e($inactiveAdsCount); ?>)</a></p>
                </div>
                <div class="d-none d-sm-block">
                    <?php if(Auth::user()->can('ads-create')): ?> 
                        <a href="<?php echo e(route('ads.create')); ?>"
                            class="btn btn-success rounded-0 d-flex align-items-center px-2 border-0"><span class="">নতুন
                                বিজ্ঞাপন</span></a>
                    <?php endif; ?>
                </div>
            </div>

            <?php if(Auth::user()->can('ads-create')): ?> 
                <div class="mt-2 btn btn-success d-block rounded-0 d-sm-none">
                    <a class="text-white" href="<?php echo e(route('ads.create')); ?>">নতুন বিজ্ঞাপন</a>
                </div>
            <?php endif; ?>
        </div>
    </div>



    <div class="row px-3">
        <div class="table-container table-responsive">
            <table id="" class="table table-bordered">
                <thead class="text-uppercase">
                    <tr class="me-3">
                        <th class="text-center" scope="col"><span>বিজ্ঞাপন</span></th>
                        <th class="text-center" scope="col"><span>আইডি</span></th>
                        <th class="text-center" scope="col"><span>বর্তমান অবস্থা</span></th>
                    </tr>
                </thead>
                <tbody class="text-center">

                    <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if(isset($item) && $item != null): ?>
                    <tr class="">

                        <td>
                            <div class="row_title custom-text-left">
                                <strong><a href="#" class="text-left"><?php echo Str::limit($item->ads_text, 150); ?></a></strong>
                            </div>
                            <div class="row-actions custom-text-left">
                                <?php if(Auth::user()->can('ads-edit')): ?> 
                                    <span><button class="edit_class_modal border-0 bg-transparent" value="<?php echo e($item->id); ?>">
                                            <a href="<?php echo e(route('ads.edit', $item->id)); ?>">সম্পাদন</a> </button> |
                                    </span>
                                <?php endif; ?>

                                <?php if($item->status == true): ?>
                                <span><a class="text-warning"
                                        href="<?php echo e(route('ads-inactive', $item->id)); ?>">নিস্ক্রিয়</a></span>
                                <?php else: ?>
                                <span><a class="text-success"
                                        href="<?php echo e(route('ads-active', $item->id)); ?>">সক্রিয়</a></span>
                                <?php endif; ?>
                            </div>
                        </td>

                        <td>
                            <b><?php echo e($item->id); ?></b>
                        </td>

                        <td>
                            <?php if($item->status == true): ?>
                            <span class="badge bg-success">সক্রিয়</span>
                            <?php else: ?>
                            <span class="badge bg-danger">নিষ্ক্রিয়</span>
                            <?php endif; ?>
                        </td>

                    </tr>
                    <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                </tbody>
            </table>
        </div>

        <div class="clearfix d-flex">
            <div class="float-left">
                <p class="text-muted">
                    <?php echo e(__('Showing')); ?>

                    <span class="font-weight-bold"><?php echo e($data->firstItem()); ?></span>
                    <?php echo e(__('to')); ?>

                    <span class="font-weight-bold"><?php echo e($data->lastItem()); ?></span>
                    <?php echo e(__('of')); ?>

                    <span class="font-weight-bold"><?php echo e($data->total()); ?></span>
                    <?php echo e(__('results')); ?>

                </p>
            </div>

            <div class="float-right custom-table-pagination">
                <?php echo $data->links('pagination::bootstrap-4'); ?>

            </div>
        </div>
    </div>


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

<?php $__env->startSection('scripts'); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Project\Personal-Project\Office-Project\update\test-paper-final\resources\views/admin/ads/activeList.blade.php ENDPATH**/ ?>