<?php $__env->startSection('content'); ?>

    <div class="row">
        <div class="col-12 box-margin">
            <div class="card">
                <div class="card-body">
                    <div class="d-md-flex justify-content-between align-items-center mb-20">
                        <h6 class="card-title mb-0"><?php echo e(__('content.gallery')); ?>

                            <!-- Button -->
                            <a id="hoverButton" class="iyzi-btn"><i class="fas fa-camera"></i> <?php echo e(__('content.view_draft')); ?></a>
                            <!-- Modal -->
                            <div id="imageModal" class="border border-success iyzi-modal">
                                <img class="img-fluid " src="<?php echo e(asset('uploads/img/dummy/style/gallery-style1.jpg')); ?>" alt="draft image">
                            </div>
                        </h6>
                        <div>
                            <button type="button" class="btn btn-primary mb-3 mr-2" data-toggle="modal" data-target="#galleryImageSectionModal"><?php echo e(__('content.section_title_and_description')); ?></button>
                            <a href="<?php echo e(route('gallery.create')); ?>" class="btn btn-primary float-right mb-3">+ <?php echo e(__('content.add_gallery')); ?></a>
                        </div>
                    </div>

                    <?php if(count($items) > 0): ?>
                        <div>
                            <input id="check_all" type="checkbox" onclick="showHideDeleteButton(this)">
                            <label for="check_all"><?php echo e(__('content.all')); ?></label>
                            <a id="deleteChecked" class="ml-2" href="#" data-toggle="modal" data-target="#deleteCheckedModal">
                                <i class="fa fa-trash text-danger font-18"></i>
                            </a>
                        </div>
                        <?php if($demo_mode == "on"): ?>
                        <!-- Include Alert Blade -->
                            <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                        <?php else: ?>
                            <form onsubmit="return btnCheckListGet()" action="<?php echo e(route('gallery.destroy_checked')); ?>" method="POST">
                                <?php echo method_field('DELETE'); ?>
                                <?php echo csrf_field(); ?>
                                <?php endif; ?>

                            <input type="hidden" id="checked_lists" name="checked_lists" value="">

                            <!-- Modal -->
                            <div class="modal fade" id="deleteCheckedModal" tabindex="-1" role="dialog" aria-labelledby="deleteCheckedModalCenterTitle" aria-hidden="true">
                                <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h5 class="modal-title" id="deleteCheckedModalCenterTitle"><?php echo e(__('content.delete')); ?></h5>
                                            <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('content.close')); ?>">
                                                <span aria-hidden="true">&times;</span>
                                            </button>
                                        </div>
                                        <div class="modal-body text-center">
                                            <?php echo e(__('content.delete_selected')); ?>

                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo e(__('content.cancel')); ?></button>
                                            <button onclick="btnCheckListGet()" type="submit" class="btn btn-success"><?php echo e(__('content.yes_delete_it')); ?></button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <table id="basic-datatable" class="table table-striped dt-responsive w-100">
                            <thead>
                            <tr>
                                <th scope="col">#</th>
                                <th><?php echo e(__('content.image')); ?></th>
                                <th><?php echo e(__('content.title')); ?></th>
                                <th><?php echo e(__('content.subtitle')); ?></th>
                                <th><?php echo e(__('content.order')); ?></th>
                                <th class="custom-width-action"><?php echo e(__('content.action')); ?></th>
                            </tr>
                            </thead>

                            <tbody>
                            <?php $desc = count($items); $asc=0; ?>
                            <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td>
                                        <input name="check_list[]" type="checkbox" value="<?php echo e($item->id); ?>" onclick="showHideDeleteButton2(this)"> <span class="d-none"><?php echo e($asc++); ?><?php echo e($desc--); ?></span>
                                    </td>
                                    <td>
                                        <?php if(!empty($item->section_image)): ?>
                                            <img class="image-size img-fluid" src="<?php echo e(asset('uploads/img/gallery/'.$item->section_image)); ?>" alt="blog image">
                                        <?php else: ?>
                                            <img class="image-size img-fluid" src="<?php echo e(asset('uploads/img/dummy/no-image.jpg')); ?>" alt="no image">
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e($item->title); ?></td>
                                    <td><?php echo e($item->subtitle); ?></td>
                                    <td><?php echo e($item->order); ?></td>
                                    <td>
                                        <div>
                                            <a href="<?php echo e(route('gallery.edit', $item->id)); ?>" class="mr-2">
                                                <i class="fa fa-edit text-info font-18"></i>
                                            </a>
                                            <a href="#" data-toggle="modal" data-target="#deleteModal<?php echo e($item->id); ?>">
                                                <i class="fa fa-trash text-danger font-18"></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>

                                <!-- Modal -->
                                <div class="modal fade" id="deleteModal<?php echo e($item->id); ?>" tabindex="-1" role="dialog" aria-labelledby="counterModalCenterTitle" aria-hidden="true">
                                    <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <h5 class="modal-title" id="counterModalCenterTitle"><?php echo e(__('content.delete')); ?></h5>
                                                <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('content.close')); ?>">
                                                    <span aria-hidden="true">&times;</span>
                                                </button>
                                            </div>
                                            <div class="modal-body text-center">
                                                <?php echo e(__('content.you_wont_be_able_to_revert_this')); ?>

                                            </div>
                                            <div class="modal-footer">
                                            <?php if($demo_mode == "on"): ?>
                                                <!-- Include Alert Blade -->
                                                    <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                                <?php else: ?>
                                                    <form class="d-inline-block" action="<?php echo e(route('gallery.destroy', $item->id)); ?>" method="POST">
                                                        <?php echo method_field('DELETE'); ?>
                                                        <?php echo csrf_field(); ?>
                                                        <?php endif; ?>

                                                    <button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo e(__('content.cancel')); ?></button>
                                                    <button type="submit" class="btn btn-success"><?php echo e(__('content.yes_delete_it')); ?></button>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    <?php else: ?>
                        <span><?php echo e(__('content.not_yet_created')); ?></span>
                    <?php endif; ?>

                </div> <!-- end card body-->
            </div> <!-- end card -->
        </div><!-- end col-->
    </div><!-- end row-->

    <div class="modal fade" id="galleryImageSectionModal" tabindex="-1" role="dialog" aria-labelledby="galleryImageSectionModalLabel" aria-modal="false">
        <div class="modal-dialog modal-md">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title mt-0 font-16" id="galleryImageSectionModalLabel"><?php echo e(__('content.section_title_and_description')); ?></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                </div>
                <div class="modal-body">
                    <?php if(isset($item_section)): ?>
                        <?php if($demo_mode == "on"): ?>
                            <!-- Include Alert Blade -->
                                <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php else: ?>
                                <form action="<?php echo e(route('gallery-section.update', $item_section->id)); ?>" method="POST">
                                    <?php echo method_field('PUT'); ?>
                                    <?php echo csrf_field(); ?>
                                    <?php endif; ?>

                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="title"><?php echo e(__('content.title')); ?></label>
                                        <input type="text" name="title" class="form-control" id="title" value="<?php echo e($item_section->title); ?>">
                                        <small class="form-text text-muted"><?php echo e(__('content.recommended_tags')); ?>

                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('a', 'title')"><?php echo e(__('<a href="">')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('br', 'title')"><?php echo e(__('<br>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('b', 'title')"><?php echo e(__('<b>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('i', 'title')"><?php echo e(__('<i>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('span', 'title')"><?php echo e(__('<span>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('p', 'title')"><?php echo e(__('<p>')); ?></span>
                                        </small>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="description"><?php echo e(__('content.description')); ?></label>
                                        <textarea name="description" class="form-control" id="description" rows="3"><?php echo e($item_section->description); ?></textarea>
                                        <small class="form-text text-muted"><?php echo e(__('content.recommended_tags')); ?>

                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('a', 'description')"><?php echo e(__('<a href="">')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('br', 'description')"><?php echo e(__('<br>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('b', 'description')"><?php echo e(__('<b>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('i', 'description')"><?php echo e(__('<i>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('span', 'description')"><?php echo e(__('<span>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('p', 'description')"><?php echo e(__('<p>')); ?></span>
                                        </small>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="section_item"><?php echo e(__('content.section_item')); ?> <span class="text-red">*</span></label>
                                        <input type="number" name="section_item" class="form-control" id="section_item" value="<?php echo e($item_section->section_item); ?>" required>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="paginate_item"><?php echo e(__('content.paginate_item')); ?> <span class="text-red">*</span></label>
                                        <input type="number" name="paginate_item" class="form-control" id="paginate_item" value="<?php echo e($item_section->paginate_item); ?>" required>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <small class="form-text text-muted"><?php echo e(__('content.required_fields')); ?></small>
                                    </div>
                                </div>
                            </div>
                            <button type="submit" class="btn btn-sm btn-primary mr-2"><?php echo e(__('content.submit')); ?></button>
                                    <a href="#" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#galleryImageSectionDestroyModal<?php echo e($item_section->id); ?>">
                                        <i class="fa fa-trash"></i> Reset
                                    </a>
                        </form>

                            <!-- Modal -->
                            <div class="modal fade" id="galleryImageSectionDestroyModal<?php echo e($item_section->id); ?>" tabindex="-1" role="dialog" aria-labelledby="serviceSectionDestroyModalCenterTitle" aria-hidden="true">
                                <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h5 class="modal-title" id="galleryImageSectionDestroyModalCenterTitle"><?php echo e(__('content.delete')); ?></h5>
                                            <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('content.close')); ?>">
                                                <span aria-hidden="true">&times;</span>
                                            </button>
                                        </div>
                                        <div class="modal-body text-center">
                                            <?php echo e(__('content.you_wont_be_able_to_revert_this')); ?>

                                        </div>
                                        <div class="modal-footer">
                                            <?php if($demo_mode == "on"): ?>
                                                <!-- Include Alert Blade -->
                                                <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                            <?php else: ?>
                                                <form class="d-inline-block" action="<?php echo e(route('gallery-section.destroy', $item_section->id)); ?>" method="POST">
                                                    <?php echo method_field('DELETE'); ?>
                                                    <?php echo csrf_field(); ?>
                                                    <?php endif; ?>

                                                <button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo e(__('content.cancel')); ?></button>
                                                <button type="submit" class="btn btn-success"><?php echo e(__('content.yes_delete_it')); ?></button>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        <?php else: ?>
                                    <?php if($demo_mode == "on"): ?>
                                    <!-- Include Alert Blade -->
                                        <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                    <?php else: ?>
                                        <form action="<?php echo e(route('gallery-section.store')); ?>"  method="POST">
                                            <?php echo csrf_field(); ?>
                                            <?php endif; ?>

                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="title"><?php echo e(__('content.title')); ?></label>
                                        <input type="text" name="title" class="form-control" id="title">
                                        <small class="form-text text-muted"><?php echo e(__('content.recommended_tags')); ?>

                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('a', 'title')"><?php echo e(__('<a href="">')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('br', 'title')"><?php echo e(__('<br>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('b', 'title')"><?php echo e(__('<b>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('i', 'title')"><?php echo e(__('<i>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('span', 'title')"><?php echo e(__('<span>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('p', 'title')"><?php echo e(__('<p>')); ?></span>
                                        </small>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="description"><?php echo e(__('content.description')); ?></label>
                                        <textarea name="description" class="form-control" id="description" rows="3"></textarea>
                                        <small class="form-text text-muted"><?php echo e(__('content.recommended_tags')); ?>

                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('a', 'description')"><?php echo e(__('<a href="">')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('br', 'description')"><?php echo e(__('<br>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('b', 'description')"><?php echo e(__('<b>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('i', 'description')"><?php echo e(__('<i>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('span', 'description')"><?php echo e(__('<span>')); ?></span>
                                            <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('p', 'description')"><?php echo e(__('<p>')); ?></span>
                                        </small>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="section_item"><?php echo e(__('content.section_item')); ?> <span class="text-red">*</span></label>
                                        <input type="number" name="section_item" class="form-control" id="section_item" value="3" required>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="paginate_item"><?php echo e(__('content.paginate_item')); ?> <span class="text-red">*</span></label>
                                        <input type="number" name="paginate_item" class="form-control" id="paginate_item" value="6" required>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <small class="form-text text-muted"><?php echo e(__('content.required_fields')); ?></small>
                                    </div>
                                </div>
                            </div>
                            <button type="submit" class="btn btn-sm btn-primary"><?php echo e(__('content.submit')); ?></button>
                        </form>
                    <?php endif; ?>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/lltrusti/casinonexus.online/ajay/resources/views/admin/gallery/index.blade.php ENDPATH**/ ?>