<?php
    $table_name='front_pages'
?>
<?php $__env->startSection('table'); ?>
    <?php echo e($table_name); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('mainContent'); ?>
    <?php echo e(generateBreadcrumb()); ?>


    <?php if(permissionCheck('frontend.page.setting')): ?>

        <section class="admin-visitor-area up_st_admin_visitor white-box d-none">
            <div class="container-fluid p-0">
                <div class="row justify-content-center">
                    <div class="col-12">
                        <div class="box_header">
                            <div class="main-title d-flex">
                                <h3><?php echo e(__('setting.Setting')); ?></h3>

                            </div>
                        </div>
                    </div>
                    <div class="col-12">
                        <div class="">
                            <div class="row">

                                <div class="col-lg-12">
                                    <!-- tab-content  -->
                                    <div class="tab-content " id="myTabContent">
                                        <!-- General -->
                                        <div class="tab-pane fade show active" id="Activation"
                                             role="tabpanel"
                                             aria-labelledby="Activation-tab">
                                            <div class="main-title mb-25">


                                                <form
                                                    action="<?php echo e(route('frontend.page.setting')); ?>"
                                                    method="POST"
                                                    enctype="multipart/form-data">
                                                    <?php echo csrf_field(); ?>

                                                    <div class="single_system_wrap">
                                                        <div class="row">
                                                            <div class="col-xl-4">
                                                                <div class="primary_input mb-25">
                                                                    <label class="primary_input_label"
                                                                           for=""><?php echo e(__('page-builder.Page Builder')); ?> <?php echo e(__('setting.Type')); ?></label>
                                                                    <div class="row">
                                                                        <div class="col-md-4 mb-25">
                                                                            <label
                                                                                class="primary_checkbox d-flex mr-12 "
                                                                                for="btn_type11">
                                                                                <input type="radio"
                                                                                       class="common-radio "
                                                                                       id="btn_type11"
                                                                                       name="pagebuilder_type"
                                                                                       <?php echo e(Settings('pagebuilder_type')!='new'?'checked':''); ?>

                                                                                       value="old">
                                                                                <span
                                                                                    class="checkmark me-2"></span> <?php echo e(__('common.Old')); ?>

                                                                            </label>
                                                                        </div>
                                                                        <div class="col-md-4 mb-25">
                                                                            <label
                                                                                class="primary_checkbox d-flex mr-12 "
                                                                                for="btn_type12">
                                                                                <input type="radio"
                                                                                       class="common-radio"
                                                                                       id="btn_type12"
                                                                                       name="pagebuilder_type"
                                                                                       <?php echo e(Settings('pagebuilder_type')=='new'?'checked':''); ?>

                                                                                       value="new">
                                                                                <span
                                                                                    class="checkmark me-2"></span> <?php echo e(__('common.New')); ?>

                                                                            </label>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-12 text-center">
                                                        <div class="d-flex justify-content-center ">
                                                            <button type="submit"
                                                                    class="primary-btn   fix-gr-bg"
                                                                    id="save_button_parent"><i
                                                                    class="ti-check"></i><?php echo e(__('common.Save')); ?>

                                                            </button>
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>


                                    </div>


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

    <?php endif; ?>
    <section class="admin-visitor-area up_st_admin_visitor mt-4">
        <div class="container-fluid p-0">

            <div class="white-box">
                <div class="col-lg-12">
                    <span class="d-none" id="page_title"><?php echo e(__('frontendmanage.Pages')); ?></span>
                    <?php if(permissionCheck('frontend.page.create')): ?>
                        <a href="<?php echo e(route('frontend.page.create')); ?>"
                           class="primary-btn small fix-gr-bg mb-4 w-fit float-end">
                            <span class="ti-plus me-2"></span>
                            <?php echo e(__('common.Add')); ?> <?php echo e(__('frontendmanage.Pages')); ?>

                        </a>
                    <?php endif; ?>
                    <div class="QA_section QA_section_heading_custom check_box_table">
                        <div class="QA_table">
                            <!-- table-responsive -->
                            <div class="">
                                <table id="lms_table" class="table Crm_table_active3">
                                    <thead>

                                    <tr>
                                        <th width="15%"><?php echo e(__('common.SL')); ?></th>
                                        <th width="15%"><?php echo e(__('frontendmanage.Title')); ?></th>
                                        <th width="15%"><?php echo e(__('frontendmanage.Slug')); ?></th>
                                        
                                        <th width="15%"><?php echo e(__('common.Status')); ?></th>
                                        <th width="15%"><?php echo e(__('common.Action')); ?></th>
                                    </tr>
                                    </thead>


                                    <tbody>
                                    <?php $__currentLoopData = $frontPages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                        <tr>
                                            <td><?php echo e(++$key); ?></td>
                                            <td> <?php echo e($value->title); ?> <?php echo e($value->homepage==1?'('.trans('common.Current').' ' .trans('common.Homepage').')':''); ?> </td>
                                            <td> <?php echo e(Str::limit($value->slug,30)); ?></td>
                                            <td>
                                                <?php if($value->is_static!='1'): ?>
                                                    <?php if (isset($component)) { $__componentOriginala97154f7fc4a6c86651af7d45de58019 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala97154f7fc4a6c86651af7d45de58019 = $attributes; } ?>
<?php $component = App\View\Components\Backend\Status::resolve(['id' => $value->id,'status' => $value->status,'route' => 'frontend.page.change-status'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('backend.status'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\Backend\Status::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala97154f7fc4a6c86651af7d45de58019)): ?>
<?php $attributes = $__attributesOriginala97154f7fc4a6c86651af7d45de58019; ?>
<?php unset($__attributesOriginala97154f7fc4a6c86651af7d45de58019); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala97154f7fc4a6c86651af7d45de58019)): ?>
<?php $component = $__componentOriginala97154f7fc4a6c86651af7d45de58019; ?>
<?php unset($__componentOriginala97154f7fc4a6c86651af7d45de58019); ?>
<?php endif; ?>
                                                <?php endif; ?>
                                            </td>
                                            <td>


                                                <div class="dropdown CRM_dropdown">
                                                    <button class="btn btn-secondary dropdown-toggle"
                                                            type="button"
                                                            id="dropdownMenu2" data-bs-toggle="dropdown"
                                                            aria-haspopup="true" aria-expanded="false">
                                                        <?php echo e(__('common.Select')); ?>

                                                    </button>
                                                    <div class="dropdown-menu dropdown-menu-right"
                                                         aria-labelledby="dropdownMenu2">
                                                        <a class="dropdown-item" target="_blank"
                                                           href="<?php echo e($value->is_static!=1?url('pages/'.$value->slug):url($value->slug)); ?>"> <?php echo e(__('common.View')); ?></a>
                                                        <?php if(permissionCheck('frontend.page.edit')): ?>
                                                            <a class="dropdown-item"
                                                               href="<?php echo e(route('frontend.page.edit',$value->id)); ?>"> <?php echo e(__('common.Edit')); ?></a>
                                                            <?php if(hasDynamicPage()): ?>
                                                                <a class="dropdown-item" target="_blank"
                                                                   href="<?php echo e(route('frontend.page.show',$value->id)); ?>"> <?php echo e(__('common.Design')); ?></a>
                                                            <?php endif; ?>
                                                        <?php endif; ?>
                                                        <?php if(permissionCheck('frontend.page.delete')): ?>
                                                            <?php if($value->is_static!=1): ?>
                                                                <a class="dropdown-item deleteBtn"
                                                                   data-bs-toggle="modal"
                                                                   data-url="<?php echo e(route('frontend.page.destroy',$value->id)); ?>"
                                                                   data-bs-target="#deleteItem"><?php echo e(__('common.Delete')); ?></a>
                                                            <?php endif; ?>
                                                        <?php endif; ?>

                                                        <?php if(permissionCheck('frontend.page.changeHomepage')): ?>
                                                            <?php if($value->homepage!=1): ?>
                                                                <a href="<?php echo e(route('frontend.page.changeHomepage',$value->id)); ?>"
                                                                   class="dropdown-item "><?php echo e(__('frontendmanage.Make It Homepage')); ?></a>
                                                            <?php endif; ?>
                                                        <?php endif; ?>
                                                    </div>
                                                </div>


                                            </td>


                                        </tr>

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


                                </table>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <div class="modal fade admin-query" id="deleteItem">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title"><?php echo e(__('common.Delete')); ?> <?php echo e(__('frontendmanage.Page')); ?></h4>
                    <button type="button" class="btn-close"
                            data-bs-dismiss="modal" style="color: #000">
                        &times;
                    </button>
                </div>
                <div class="modal-body">
                    <div class="text-center">
                        <h4><?php echo e(__('footer.Are you sure')); ?>?</h4>
                    </div>
                    <div class="mt-40 d-flex justify-content-between">
                        <button type="button" class="primary-btn tr-bg"
                                data-bs-dismiss="modal"><?php echo e(__('footer.Cancel')); ?>

                        </button>
                        <form action=""
                              method="POST">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <input type="submit" class="primary-btn fix-gr-bg"
                                   value="Delete"/>
                        </form>
                    </div>
                </div>

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

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

    <script>
        $(document).on("click", ".deleteBtn", function (e) {
            e.preventDefault();
            let url = $(this).data('url');
            console.log(url);
            $('#deleteItem').find('form').attr('action', url);
        });

    </script>


    <script type="application/javascript">


        dataTableOptions = updateColumnExportOption(dataTableOptions, [0, 1, 2]);

        let table = $('#lms_table').DataTable(dataTableOptions);


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

<?php echo $__env->make('backend.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/minialms/app.minialms.com/Modules/FrontendManage/Resources/views/front_page/index.blade.php ENDPATH**/ ?>