<div class="panel panel-default"> <div class="panel-heading"> <?php echo app('translator')->getFromJson('View Sections'); ?> </div> <div class="panel-body"> <form id="delete-form" action="delete/sections" method="post" class="form-inline"> <div class="row"> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete', App\Section::class)): ?> <?php echo e(csrf_field()); ?> <div class="col-md-4"> <div class="text-muted"> <label for="checkboxArray"><?php echo app('translator')->getFromJson('Bulk Options'); ?> <i class="fa fa-cog" aria-hidden="true"></i></label> </div> <input type="hidden" name="_method" value="DELETE"> <div class="form-group"> <select id="checkboxArray" name="checkboxArray" class="form-control"> <option value=""><?php echo app('translator')->getFromJson('Delete'); ?></option> </select> </div> <div class="form-group"> <input id="delete_all" name="" class="btn fa btn-warning" value="&#xf1d8;" onclick=" if(confirm('<?php echo app('translator')->getFromJson('Are you sure you want to delete selected sections?'); ?>')) { $('#delete_all').attr('name', 'delete_all'); event.preventDefault(); $('#delete-form').submit(); } else { event.preventDefault(); } " > </div> </div> <?php endif; ?> <div class="advanced-search col-md-<?php echo e(Auth::user()->can('delete', App\Section::class) ? '8' : '8 col-md-offset-4'); ?>"> <div class="text-muted"> <label for="checkboxArray"><?php echo app('translator')->getFromJson('Advanced Search'); ?> <i class="fa fa-search" aria-hidden="true"></i></label> </div> <div class="row"> <div class="col-md-5"> <select class="form-control" id="select-column"> <option value=<?php echo e(Auth::user()->can('delete', App\Section::class) ? 3 : 2); ?>><?php echo app('translator')->getFromJson('Status'); ?></option> <option value=<?php echo e(Auth::user()->can('delete', App\Section::class) ? 2 : 1); ?>><?php echo app('translator')->getFromJson('Position'); ?></option> <option value=<?php echo e(Auth::user()->can('delete', App\Section::class) ? 4 : 3); ?>><?php echo app('translator')->getFromJson('Created'); ?></option> </select> </div> <div class="col-md-7"> <input class="form-control" type="text" id="search-by-column" placeholder="<?php echo app('translator')->getFromJson('Search by Column'); ?>"> </div> </div> </div> </div> <div class="table-responsive"> <div class="col-md-12 text-right"> <span class="advanced-search-toggle"><?php echo app('translator')->getFromJson('Advanced Search'); ?></span> </div> <table class="display table table-striped table-bordered table-hover" id="sections-table"> <thead> <tr> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete', App\Section::class)): ?> <th><input type="checkbox" id="options"></th> <?php endif; ?> <th><?php echo app('translator')->getFromJson('ID'); ?></th> <th><?php echo app('translator')->getFromJson('Position'); ?></th> <th><?php echo app('translator')->getFromJson('Status'); ?></th> <th><?php echo app('translator')->getFromJson('Created'); ?></th> <?php if((Auth::user()->can('update', App\Section::class)) || (Auth::user()->can('delete', App\Section::class))): ?> <th><?php echo app('translator')->getFromJson('Action'); ?></th> <?php endif; ?> </tr> </thead> <tbody> <?php if($sections): ?> <?php $__currentLoopData = $sections; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $section): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete', App\Section::class)): ?> <td><input class="checkboxes" type="checkbox" name="checkboxArray[]" value="<?php echo e($section->id); ?>"></td> <?php endif; ?> <td><?php echo e($section->id); ?></td> <td><?php echo e($section->position); ?></td> <td><?php echo e($section->is_active ? __('Active') : __('Inactive')); ?></td> <td><?php echo e($section->created_at); ?></td> <?php if((Auth::user()->can('update', App\Section::class)) || (Auth::user()->can('delete', App\Section::class))): ?> <td> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('update', App\Section::class)): ?> <a href="<?php echo e(route('manage.sections.edit', $section->id)); ?>"> <span class="glyphicon glyphicon-edit"></span> </a> <?php endif; ?> &nbsp; <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete', App\Section::class)): ?> <input type="hidden" id="delete_single" name=""> <a href="" onclick=" if(confirm('<?php echo app('translator')->getFromJson('Are you sure you want to delete this?'); ?>')) { $('#delete_single').attr('name', 'delete_single').val(<?php echo e($section->id); ?>); event.preventDefault(); $('#delete-form').submit(); } else { event.preventDefault(); } " ><span class="glyphicon glyphicon-trash text-danger"></span></a> <?php endif; ?> </td> <?php endif; ?> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </tbody> </table> </div> </form> </div> </div>