<?php
$table_name='front_pages'
?>
<?php $__env->startSection('table'); ?>
<?php echo e($table_name); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('mainContent'); ?>
<section class="sms-breadcrumb mb-20 white-box">
<div class="container-fluid">
<div class="row justify-content-between">
<h1><?php echo e(__('frontendmanage.Pages')); ?></h1>
<div class="bc-pages">
<a href="<?php echo e(url('dashboard')); ?>"><?php echo e(__('dashboard.Dashboard')); ?></a>
<a href="#"><?php echo e(__('frontendmanage.Frontend CMS')); ?></a>
<a href="<?php echo e(route('frontend.page.index')); ?>"><?php echo e(__('frontendmanage.Pages')); ?></a>
</div>
</div>
</div>
</section>
<section class="admin-visitor-area up_st_admin_visitor">
<div class="container-fluid p-0">
<h4 class="pl-4 mb-3">
<div class="row justify-content-start pr-4">
<?php if(permissionCheck('frontend.page.create')): ?>
<a href="<?php echo e(route('frontend.page.create')); ?>" class="primary-btn small fix-gr-bg">
<span class="ti-plus"></span>
<?php echo e(__('common.Add')); ?> <?php echo e(__('frontendmanage.Pages')); ?>
</a>
<?php endif; ?>
</div>
</h4>
<div class="col-lg-12">
<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(__('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 $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td> <?php echo e(Str::limit($value->title,30)); ?>
<?php if($value->homepage==1): ?>
<b>
<small>
(<?php echo e(__('common.Homepage')); ?>)
</small>
</b>
<?php endif; ?>
</td>
<td> <?php echo e(Str::limit($value->slug,30)); ?></td>
<td>
<?php if($value->is_static!='1'): ?>
<?php if (isset($component)) { $__componentOriginal1ef2730688790b586eceddc76ba04e8872862a29 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\Backend\Status::class, ['id' => $value->id,'status' => $value->status,'route' => 'frontend.page.change-status']); ?>
<?php $component->withName('backend.status'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?> <?php if (isset($__componentOriginal1ef2730688790b586eceddc76ba04e8872862a29)): ?>
<?php $component = $__componentOriginal1ef2730688790b586eceddc76ba04e8872862a29; ?>
<?php unset($__componentOriginal1ef2730688790b586eceddc76ba04e8872862a29); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php endif; ?>
</td>
<td>
<div class="dropdown CRM_dropdown">
<button class="btn btn-secondary dropdown-toggle"
type="button"
id="dropdownMenu2" data-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-toggle="modal"
data-url="<?php echo e(route('frontend.page.destroy',$value->id)); ?>"
data-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>
</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="close"
data-dismiss="modal" style="color: #000">
×
</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-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>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('backend.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/bouloter/infix/Modules/FrontendManage/Resources/views/front_page/index.blade.php ENDPATH**/ ?>