<?php $__env->startSection('content'); ?>
<!-- =====================================
 ==== Start Home-content  -->

 <section class="users-list">
     <div class="container-fluid">

         <div class="row">
             <div class="col-md-11">
                 <div class="wel-text">
                     <h6><?php echo app('translator')->getFromJson('home.contries_list'); ?></h6>
                     <div class="path">
                         <a href="<?php echo e(url('admin/home')); ?>"><?php echo app('translator')->getFromJson('home.home'); ?></a>
                         <span>/</span> 
                         <a href="<?php echo e(url('admin/pages')); ?>"><?php echo app('translator')->getFromJson('home.pages'); ?></a>
                         <span>/</span> 
                        <?php echo app('translator')->getFromJson('home.pages_list'); ?>
                     </div>
                 </div>
             </div>

             <div class="col-md-1">
                 <div class="dropdown">
                   <button class="btn btn-defualt dropdown-toggle" type="button" data-toggle="dropdown"><?php echo app('translator')->getFromJson('home.links'); ?>
                       <span class="caret"></span></button>
                       <ul class="dropdown-menu" style="padding: 10px">
                         <li  style="padding: 10px"><a href="<?php echo e(URL::to('ar/admin/setting')); ?>"><i class="icon-gear"></i><?php echo app('translator')->getFromJson('home.general_settings'); ?></a></li>
                         <li  style="padding: 5px"><a href="<?php echo e(URL::to('ar/admin/reports_browsing')); ?>"><i class="icon-copy"></i> <?php echo app('translator')->getFromJson('home.full_report'); ?></a></li>
                     </ul>
                 </div>
             </div>
         </div>
         <?php if(Session('success')): ?>
         <div class="alert alert-success alert-dismissible">
             <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
             <strong><?php echo app('translator')->getFromJson('home.success'); ?>!</strong> <?php echo e(session('success')); ?>.
         </div>
         <?php endif; ?>
        <form action="<?php echo e(URL::to('/ar/admin/pages_delete_all')); ?>" method="post">
        <?php echo csrf_field(); ?>
        <input name="_method" type="hidden" value="DELETE">
         <div class="row" style="margin:5px;">
              <div class="col-md-2">
                  <button type="button" class="btn btn-info"  >
                  <input type="checkbox" id="select-all">
                  <?php echo app('translator')->getFromJson('home.sellect_all'); ?></button>
              </div>
              <div class="col-md-2">
                  <button type="button" class="btn btn-danger " data-toggle="modal" data-target="#DeleteSelected">
                     <?php echo app('translator')->getFromJson('home.delete_all'); ?>
                  </button>

                  <!-- Modal -->
                  <div id="DeleteSelected" class="modal fade" role="dialog">
                          <div class="modal-dialog">
                            <!-- Modal content-->
                            <div class="modal-content">
                                  <div class="modal-header">
                                      <button type="button" class="close" data-dismiss="modal">&times;</button>
                                      <h4 class="modal-title"><?php echo app('translator')->getFromJson('home.header_delete_model'); ?></h4>
                                  </div>
                                <div class="modal-body">
                                    <p><?php echo app('translator')->getFromJson('home.body_delete_all_model'); ?></p>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson('home.close'); ?></button>
                                    <button type="submit"  class="btn btn-danger" ><?php echo app('translator')->getFromJson('home.delete_all'); ?></button>
                                </div>
                            </div>
                          </div>
                  </div>
              </div>
          </div>
         <table class="block-table" id="example" class="display" style="width:100%;margin10px">
           <thead>
             <tr>
                    <th>#</th>
                    <th><?php echo app('translator')->getFromJson('home.name'); ?></th>
                    <th><?php echo app('translator')->getFromJson('home.icon'); ?></th>
                    <th><?php echo app('translator')->getFromJson('home.status'); ?></th>
                    <th><?php echo app('translator')->getFromJson('home.edit'); ?></th>
                    <th><?php echo app('translator')->getFromJson('home.delete'); ?></th>
             </tr>
           </thead>
             <tbody>
                <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><span class="text-semibold">
                        <?php echo e(@$page->id); ?>

                    <input type="checkbox" name="ids[]" value="<?php echo e(@$page->id); ?>"> 

                </span></td>
                    <td><span class="text-semibold"><?php echo e(@$page->translation->title); ?></span></td>
                    <td>
                        <img src="<?php echo e(url('/'). @$page->icon); ?>" style="max-width: 150px;max-height: 50px" class="img-responsive" alt="<?php echo e(@$page->translation->title); ?>">
                    </td>
                    <td>
                        <?php if($page->status == 'show'): ?>
                            <?php echo app('translator')->getFromJson('home.show'); ?>
                        <?php else: ?>
                            <?php echo app('translator')->getFromJson('home.hide'); ?>
                        <?php endif; ?>
                    </td> 
                    <td>
                        <a href="<?php echo e(URL::to('admin/pages/').'/'.$page->id.'/edit'); ?>" class="btn btn-warning "><li class="fas fa-pencil-alt"></li></a>
                    </td>
                   
                    <td><?php echo $__env->make('panel.pages.delete_from_list', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?></td> 
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
             </tbody>
         </table>
     </div>
 </section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('jsCode'); ?>
    <script>
        // Listen for click on toggle checkbox
        $('#select-all').click(function(event) {   
            if(this.checked) {
                // Iterate each checkbox
                $(':checkbox').each(function() {
                    this.checked = true;                        
                });
            } else {
                $(':checkbox').each(function() {
                    this.checked = false;                       
                });
            }
        });
        $(document).ready(function() {
          $('#example').DataTable();
        });
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('panel.layouts.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\orgnize_it\resources\views/panel/pages/index.blade.php ENDPATH**/ ?>