<div class="panel panel-default"> <div class="panel-heading"> <?php echo app('translator')->getFromJson('View Delivery Locations'); ?> </div> <div class="panel-body"> <form id="delete-form" action="delete/delivery-locations" method="post" class="form-inline"> <div class="row"> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete', App\DeliveryLocation::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 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 delivery locations?'); ?>')) { $('#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\DeliveryLocation::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\DeliveryLocation::class) ? 2 : 1); ?>><?php echo app('translator')->getFromJson('Country'); ?></option> <option value=<?php echo e(Auth::user()->can('delete', App\DeliveryLocation::class) ? 3 : 2); ?>><?php echo app('translator')->getFromJson('State'); ?></option> <option value=<?php echo e(Auth::user()->can('delete', App\DeliveryLocation::class) ? 4 : 3); ?>><?php echo app('translator')->getFromJson('City'); ?></option> <option value=<?php echo e(Auth::user()->can('delete', App\DeliveryLocation::class) ? 5 : 4); ?>><?php echo app('translator')->getFromJson('Zip Code'); ?></option> <option value=<?php echo e(Auth::user()->can('delete', App\DeliveryLocation::class) ? 6 : 5); ?>><?php echo app('translator')->getFromJson('Status'); ?></option> <option value=<?php echo e(Auth::user()->can('delete', App\DeliveryLocation::class) ? 7 : 6); ?>><?php echo app('translator')->getFromJson('Date 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="delivery-location-table"> <thead> <tr> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete', App\DeliveryLocation::class)): ?> <th><input type="checkbox" id="options"></th> <?php endif; ?> <th><?php echo app('translator')->getFromJson('ID'); ?></th> <th><?php echo app('translator')->getFromJson('Country'); ?></th> <th><?php echo app('translator')->getFromJson('State'); ?></th> <th><?php echo app('translator')->getFromJson('City'); ?></th> <th><?php echo app('translator')->getFromJson('Zip Code'); ?></th> <th><?php echo app('translator')->getFromJson('Status'); ?></th> <th><?php echo app('translator')->getFromJson('Created Date'); ?></th> <?php if((Auth::user()->can('update', App\DeliveryLocation::class)) || (Auth::user()->can('delete', App\DeliveryLocation::class))): ?> <th><?php echo app('translator')->getFromJson('Action'); ?></th> <?php endif; ?> </tr> </thead> <tbody> <?php if(count($deliveryLocations) > 0): ?> <?php $__currentLoopData = $deliveryLocations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $location): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete', App\DeliveryLocation::class)): ?> <td><input class="checkboxes" type="checkbox" name="checkboxArray[]" value="<?php echo e($location->id); ?>"></td> <?php endif; ?> <?php
                                    $status = 'Inactive';
                                    if ($location->status == 1){
                                        $status = 'active';
                                    }
                                    ?> <td><?php echo e($location->id); ?></td> <td><?php echo e($location->country); ?></td> <td><?php echo e($location->state); ?></td> <td><?php echo e($location->city); ?></td> <td><?php echo e($location->pincode); ?></td> <td><?php echo e($status); ?></td> <td><?php echo e($location->created_at); ?></td> <?php if((Auth::user()->can('update', App\DeliveryLocation::class)) || (Auth::user()->can('delete', App\DeliveryLocation::class))): ?> <td> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('update', App\DeliveryLocation::class)): ?> <a href="<?php echo e(route('manage.delivery-location.edit', $location->id)); ?>"> <span class="glyphicon glyphicon-edit"></span> </a> <?php endif; ?> &nbsp; <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete', App\DeliveryLocation::class)): ?> <input type="hidden" id="delete_single" name="delete_single"> <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($location->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>