ok
Direktori : /home2/selectio/www/3idiotsgadgetstore.in/resources/views/admin-views/contacts/ |
Current File : /home2/selectio/www/3idiotsgadgetstore.in/resources/views/admin-views/contacts/list.blade.php |
@extends('layouts.back-end.app') @section('title', \App\CPU\translate('Contact List')) @push('css_or_js') <!-- Custom styles for this page --> <link href="{{asset('public/assets/back-end')}}/vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet"> @endpush @section('content') <div class="content container-fluid"> <!-- Page Title --> <div class="mb-3"> <h2 class="h1 mb-0 text-capitalize d-flex align-items-center gap-2"> <img width="20" src="{{asset('/public/assets/back-end/img/message.png')}}" alt=""> {{\App\CPU\translate('customer_message')}} </h2> </div> <!-- End Page Title --> <div class="row mt-20"> <div class="col-md-12"> <div class="card"> <div class="card-header"> <div class="row justify-content-between align-items-center flex-grow-1"> <div class="col-sm-4 col-md-6 col-lg-8 mb-2 mb-sm-0"> <h5 class="d-flex gap-2 align-items-center"> {{\App\CPU\translate('Customer')}} {{\App\CPU\translate('Message')}} {{\App\CPU\translate('table')}} <span class="badge badge-soft-dark radius-50 fz-12">{{ $contacts->total() }}</span> </h5> </div> <div class="col-sm-8 col-md-6 col-lg-4"> <!-- Search --> <form action="{{ url()->current() }}" method="GET"> <div class="input-group input-group-merge input-group-custom"> <div class="input-group-prepend"> <div class="input-group-text"> <i class="tio-search"></i> </div> </div> <input id="datatableSearch_" type="search" name="search" class="form-control" placeholder="{{\App\CPU\translate('Search_by_Name_or_Mobile_No_or_Email')}}" aria-label="Search orders" value="{{ $search }}"> <button type="submit" class="btn btn--primary">{{\App\CPU\translate('search')}}</button> </div> </form> <!-- End Search --> </div> </div> </div> <div class="table-responsive"> <table id="datatable" style="text-align: {{Session::get('direction') === "rtl" ? 'right' : 'left'}};" class="table table-hover table-borderless table-thead-bordered table-nowrap table-align-middle card-table w-100"> <thead class="thead-light thead-50 text-capitalize"> <tr> <th>{{\App\CPU\translate('SL')}}</th> <th>{{\App\CPU\translate('Customer_Name')}}</th> <th>{{\App\CPU\translate('Contact_Info')}}</th> <th>{{\App\CPU\translate('Subject')}}</th> <th class="text-center">{{\App\CPU\translate('action')}}</th> </tr> </thead> <tbody> @foreach($contacts as $k=>$contact) <tr style="background: {{$contact->seen==0?'rgba(215,214,214,0.56)':'white'}}"> <td>{{$contacts->firstItem()+$k}}</td> <td>{{$contact['name']}}</td> <td> <div> <div>{{$contact['mobile_number']}}</div> <div>{{$contact['email']}}</div> </div> </td> <td class="text-wrap">{{$contact['subject']}}</td> <td> <div class="d-flex gap-10 justify-content-center"> <a title="{{\App\CPU\translate('View')}}" class="btn btn-outline-info btn-sm square-btn" href="{{route('admin.contact.view',$contact->id)}}"> <i class="tio-invisible"></i> </a> <a class="btn btn-outline-danger btn-sm delete" id="{{$contact['id']}}" title="{{ \App\CPU\translate('Delete')}}"> <i class="tio-delete"></i> </a> </div> </td> </tr> @endforeach </tbody> </table> </div> <div class="table-responsive mt-4"> <div class="px-4 d-flex justify-content-lg-end"> <!-- Pagination --> {{$contacts->links()}} </div> </div> @if(count($contacts)==0) <div class="text-center p-4"> <img class="mb-3 w-160" src="{{asset('public/assets/back-end')}}/svg/illustrations/sorry.svg" alt="Image Description"> <p class="mb-0">{{\App\CPU\translate('No_data_to_show')}}</p> </div> @endif </div> </div> </div> </div> @endsection @push('script') <!-- Page level plugins --> <script src="{{asset('public/assets/back-end')}}/vendor/datatables/jquery.dataTables.min.js"></script> <script src="{{asset('public/assets/back-end')}}/vendor/datatables/dataTables.bootstrap4.min.js"></script> <!-- Page level custom scripts --> <script> $(document).ready(function () { $('#dataTable').DataTable(); }); $(document).on('click', '.delete', function () { var id = $(this).attr("id"); Swal.fire({ title: '{{\App\CPU\translate('Are_you_sure_delete_this')}}?', text: "{{\App\CPU\translate('You_will_not_be_able_to_revert_this')}}!", showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: '{{\App\CPU\translate('Yes')}}, {{\App\CPU\translate('delete_it')}}!', type: 'warning', reverseButtons: true }).then((result) => { if (result.value) { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') } }); $.ajax({ url: "{{route('admin.contact.delete')}}", method: 'POST', data: {id: id}, success: function () { toastr.success('{{\App\CPU\translate('Contact_deleted_successfully')}}'); location.reload(); } }); } }) }); </script> @endpush