<?php $__env->startSection('title', translate('Banner List')); ?>

<?php $__env->startPush('css_or_js'); ?>

<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
    <div class="content container-fluid">
        <!-- Page Header -->
        <div class="page-header">
            <div class="row align-items-center">
                <div class="col-sm mb-2 mb-sm-0">
                    <h1 class="page-header-title"><i class="tio-filter-list"></i> <?php echo e(\App\CentralLogics\translate('banner')); ?> <?php echo e(\App\CentralLogics\translate('list')); ?></h1>
                </div>
            </div>
        </div>
        <!-- End Page Header -->
        <div class="row gx-2 gx-lg-3">
            <div class="col-sm-12 col-lg-12 mb-3 mb-lg-2">
                <!-- Card -->
                <div class="card">
                    <!-- Header -->
                    <div class="card-header flex-between">
                        <div class="flex-start">
                            <h5 class="card-header-title"><?php echo e(\App\CentralLogics\translate('Banner Table')); ?> <span class="card-header-title text-primary mx-1">(<?php echo e($banners->total()); ?>)</span></h5>
                        </div>
                        <div>
                            <h5 class="card-header-title"></h5>
                            <a href="<?php echo e(route('admin.banner.add-new')); ?>" class="btn btn-primary pull-right"><i
                                    class="tio-add-circle"></i> <?php echo e(\App\CentralLogics\translate('add')); ?> <?php echo e(\App\CentralLogics\translate('new')); ?> <?php echo e(\App\CentralLogics\translate('banner')); ?></a>
                        </div>
                    </div>
                    <!-- End Header -->

                    <!-- Table -->
                    <div class="table-responsive datatable-custom">
                        <table class="table table-borderless table-thead-bordered table-nowrap table-align-middle card-table">
                            <thead class="thead-light">
                            <tr>
                                <th><?php echo e(\App\CentralLogics\translate('#')); ?></th>
                                <th style="width: 30%"><?php echo e(\App\CentralLogics\translate('title')); ?></th>
                                <th style="width: 25%"><?php echo e(\App\CentralLogics\translate('image')); ?></th>
                                <th><?php echo e(\App\CentralLogics\translate('status')); ?></th>
                                <th><?php echo e(\App\CentralLogics\translate('action')); ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $__currentLoopData = $banners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$banner): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($banners->firstitem()+$key); ?></td>
                                    <td>
                                        <span class="d-block font-size-sm text-body">
                                            <?php echo e($banner['title']); ?>

                                        </span>
                                    </td>
                                    <td>
                                        <div style="height: 100px; width: 100px; overflow-x: hidden;overflow-y: hidden">
                                            <img src="<?php echo e(asset('storage/app/public/banner')); ?>/<?php echo e($banner['image']); ?>" style="width: 100px"
                                                 onerror="this.src='<?php echo e(asset('public/assets/admin/img/160x160/img2.jpg')); ?>'">
                                        </div>
                                    </td>
                                    <td>
                                        <?php if($banner['status']==1): ?>
                                            <div style="padding: 10px;border: 1px solid;cursor: pointer"
                                                 onclick="location.href='<?php echo e(route('admin.banner.status',[$banner['id'],0])); ?>'">
                                                <span class="legend-indicator bg-success"></span><?php echo e(translate('Active')); ?>

                                            </div>
                                        <?php else: ?>
                                            <div style="padding: 10px;border: 1px solid;cursor: pointer"
                                                 onclick="location.href='<?php echo e(route('admin.banner.status',[$banner['id'],1])); ?>'">
                                                <span class="legend-indicator bg-danger"></span><?php echo e(translate('Disabled')); ?>

                                            </div>
                                        <?php endif; ?>
                                    </td>
                                    <td>
                                        <!-- Dropdown -->
                                        <div class="dropdown">
                                            <button class="btn btn-secondary dropdown-toggle" type="button"
                                                    id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
                                                    aria-expanded="false">
                                                <i class="tio-settings"></i>
                                            </button>
                                            <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                                                <a class="dropdown-item"
                                                   href="<?php echo e(route('admin.banner.edit',[$banner['id']])); ?>"><?php echo e(\App\CentralLogics\translate('edit')); ?></a>
                                                <a class="dropdown-item" href="javascript:"
                                                   onclick="form_alert('banner-<?php echo e($banner['id']); ?>','<?php echo e(\App\CentralLogics\translate('Want to delete this banner ?')); ?>')"><?php echo e(\App\CentralLogics\translate('delete')); ?></a>
                                                <form action="<?php echo e(route('admin.banner.delete',[$banner['id']])); ?>"
                                                      method="post" id="banner-<?php echo e($banner['id']); ?>">
                                                    <?php echo csrf_field(); ?> <?php echo method_field('delete'); ?>
                                                </form>
                                            </div>
                                        </div>
                                        <!-- End Dropdown -->
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                        <hr>
                        <table>
                            <tfoot>
                            <?php echo $banners->links(); ?>

                            </tfoot>
                        </table>
                    </div>
                    <!-- End Table -->
                </div>
                <!-- End Card -->
            </div>
        </div>
    </div>

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

<?php $__env->startPush('script_2'); ?>

<?php $__env->stopPush(); ?>

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