
<?php $__env->startSection('content'); ?>
<?php echo $__env->make('admin/manage_pages/script_js', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<div class='bg-white p-2 rounded m-2'>
    <div class="row justify-content-between p-3 rounded m-2  bg-light">
        <div class="col-12 col-md-6 align-self-center">
            <a class='text-decoration-none fw-bold ' href="<?php echo e(url('/home')); ?>"><?php echo e(trans('admin.Home')); ?></a> <span class="bi bi-caret-right"></span>
            <a class='text-decoration-none fw-bold text-dark' href=""> <?php echo e(trans('admin.pages')); ?></a>
        </div>
        <div class="col-12 col-md-6 align-self-center float-end ">
            <div class='align-self-center  text-center justify-content-center'>
                <div class="row">
                    <div class="col-7">
                        <div>
                            <input type="text" class="form-control rounded-pill bg-light" id="search_new" placeholder="<?php echo e(trans('admin.search')); ?>">
                        </div>
                    </div>
                    <div class="col-5">
                        <select id="status_filter" class="form-select rounded-pill">
                          <option value="" selected> <?php echo e(trans('admin.status')); ?></option>
                          <option value="1"> <?php echo e(trans('admin.active')); ?></option>
                          <option value="0"> <?php echo e(trans('admin.inactive')); ?> </option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class='table-responsive p-3'>
        <table class='table table-border data-table w-100'>
            <thead>
                <tr class='tex-g'>
                    <th><?php echo e(trans('admin.name')); ?></th>
                    <!-- <th>content</th> -->
                    <th class='pe-4'><?php echo e(trans('admin.status')); ?></th>
                    <th class=''><?php echo e(trans('admin.actions')); ?></th>
                </tr>
            </thead>
            <tbody>
                 
            </tbody>
        </table>
    </div>
</div>
<script type="text/javascript">
    CKEDITOR.replace('text_en');
    CKEDITOR.replace('text_ar');
    var table = "";
    $(function() {
        table = $('.data-table').DataTable({
            processing: true,
            serverSide: true,
            "searching": false,
            ajax: {
                url: "<?php echo e(route('pages')); ?>",
                type: 'GET',
                data: function(d) {
                  d.search_new = $('#search_new').val();
                  d.status_filter = $('#status_filter').val();
                  // console.log(d);
                }
            },
            columns: [
                {data: 'page_name', name: 'page_name'},
                {data: 'status', name: 'status'},
                {data: 'action', name: 'action', orderable: false, searchable: false},
            ],
            "lengthMenu": [[10, 25, 50, 100, -1], [100, 200, 500, 700, "All"]]
        });
    });
    $('body').on('change', '#status_filter', function(e) {
      table.draw(true);
    });
    $('body').on('keyup', '#search_new', function(e) {
      table.draw(true);
    });
    $('body').on('click', '.clear', function(e) {
        $('#search_new').val("");
        $('#status_filter').val("");
        table.draw(true);
    });
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\HomesteadStuff\code\manage_sarfapp\resources\views/admin/manage_pages/manage.blade.php ENDPATH**/ ?>