touhid_xml

Laravel DataTable View

Apr 13th, 2021
401
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @php
  2. use App\Utility;
  3. $utility = new Utility();
  4. @endphp
  5. @extends('layouts.app')
  6. @section('title', $pageTitle)
  7. @section('content')
  8.  
  9. <style>
  10.     #action-cell a{
  11.         /*font-size: 12pt;*/
  12.         text-align: center;
  13.         /*display:inline-flex;*/
  14.     }
  15.     .table > thead > tr > th {
  16.  
  17.         font-size: inherit;
  18.  
  19.     }
  20. </style>
  21. <div class="row">
  22.     <div class="col-md-12">
  23.         <div class="card">
  24.             <div class="card-content">
  25.                 <h4 class="card-title">{{ $pageTitle }}</h4>
  26.                 @if ($message = Session::get('success'))
  27.                     <div class="alert alert-success">
  28.                         <p>{{ $message }}</p>
  29.                     </div>
  30.                 @endif
  31.  
  32.                 <a href="{{ URL::to($route.'/create') }}" class="btn btn-primary btn-sm">{{ $createButtonText }}<div class="ripple-container"></div></a>
  33.                 <table class="table table-bordered data-table table-responsive">
  34.                     <thead class="text-primary">
  35.                     <tr>
  36.                         <th width="50">No</th>
  37.                         <th>Date</th>
  38.                         <th>Customer</th>
  39.                         <th>Phone</th>
  40.                         <th>Airline</th>
  41.                         <th>Fair Type</th>
  42.                         <th>Fair Price</th>
  43.                         <th>Departure</th>
  44.                         <th>Arrival</th>
  45. {{--                        <th>Cabin Class</th>--}}
  46.                         <th>Status</th>
  47.                         <th>Action</th>
  48.                     </tr>
  49.                     </thead>
  50.                     <tbody>
  51.                     </tbody>
  52.                 </table>
  53.                 </div>
  54.             </div>
  55.         </div>
  56.     </div>
  57. </div>
  58.  
  59.  
  60. <!-- Modal -->
  61. <div class="modal fade" id="purchaseViewModal" tabindex="-1" role="dialog" aria-labelledby="purchaseViewModal" aria-hidden="true">
  62.     <div class="modal-dialog" role="document">
  63.         <div class="modal-content">
  64.             <div class="modal-header">
  65.                 <h5 class="modal-title" id="exampleModalLongTitle">Purchase Info</h5>
  66.                 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  67.                     <span aria-hidden="true">&times;</span>
  68.                 </button>
  69.             </div>
  70.             <div class="modal-body">
  71.                 ...
  72.             </div>
  73.             <div class="modal-footer">
  74.                 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  75.                 <!-- <button type="button" class="btn btn-primary">Save changes</button> -->
  76.             </div>
  77.         </div>
  78.     </div>
  79. </div>
  80. <script>
  81.   function showPurchaseViewModal(url){
  82.       $.get( url, function( data ) {
  83.           $( "#purchaseViewModal .modal-body" ).html( data );
  84.          // alert( "Load was performed." );
  85.       });
  86.       $('#purchaseViewModal').modal('show');
  87.   }
  88.  
  89.   $(function () {
  90.       var table = $('.data-table').DataTable({
  91.           stateSave: true,
  92.           responsive: true,
  93.           processing: true,
  94.           serverSide: true,
  95.           order : [0,'desc'],
  96.           ajax: "{{ URL::to($route.'') }}",
  97.           columns: [
  98.               {data: 'DT_RowIndex', name: 'DT_RowIndex'},
  99.               {data: 'booking_date', name: 'booking_date'},
  100.               {data: 'CustomerFullName', name: 'CustomerFullName'},
  101.               {data: 'phone1', name: 'phone1'},
  102.               {data: 'AirlineName', name: 'AirlineName'},
  103.               {data: 'fairFamilyName', name: 'fairFamilyName'},
  104.               {data: 'fare_price', name: 'fare_price'},
  105.               {data: 'fromName', name: 'fromName'},
  106.               {data: 'toName', name: 'toName'},
  107.  
  108.               // {data: 'cabin_class', name: 'cabin_class'},
  109.               // {data: 'Cancel', name: 'Cancel'},
  110.                {data: 'bookingStatus', name: 'bookingStatus'},
  111.  
  112.               {data: 'action', name: 'action', orderable: false, searchable: false},
  113.           ]
  114.       });
  115.   });
  116. </script>
  117.  
  118. @endsection
  119.  
  120.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×