table2.blade.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {!! $grid->renderQuickSearch() !!}
  2. <style>
  3. #{{ $tableId }} {
  4. border: 0;
  5. }
  6. #{{ $tableId }} thead tr {
  7. background: transparent;
  8. text-transform: uppercase;
  9. font-family: Montserrat,sans-serif;
  10. }
  11. #{{ $tableId }} thead th {
  12. font-size: .95rem;
  13. }
  14. </style>
  15. <div class="dcat-box dt-bootstrap4">
  16. @if ($grid->allowToolbar())
  17. <div class="box-header">
  18. @if(!empty($title))
  19. <h4 class="pull-left" style="margin:5px 10px 0;">
  20. {!! $title !!}&nbsp;
  21. @if(!empty($description))
  22. <small>{!! $description!!}</small>
  23. @endif
  24. </h4>
  25. <div class="pull-right" data-responsive-table-toolbar="{{$tableId}}">
  26. {!! $grid->renderTools() !!} {!! $grid->renderCreateButton() !!} {!! $grid->renderExportButton() !!}
  27. </div>
  28. @else
  29. <div class="pull-right" data-responsive-table-toolbar="{{$tableId}}">
  30. {!! $grid->renderCreateButton() !!} {!! $grid->renderExportButton() !!}
  31. </div>
  32. {!! $grid->renderTools() !!}
  33. @endif
  34. </div>
  35. @endif
  36. {!! $grid->renderFilter() !!}
  37. {!! $grid->renderHeader() !!}
  38. <div class="in table-responsive" {!! $grid->option('show_bordered') ? 'style="padding:3px 10px 10px"' : '' !!}>
  39. <table class="table data-list-view dataTable dt-checkboxes-select {{ $grid->option('show_bordered') ? 'table-bordered' : $grid->option('table_header_style') }} " id="{{ $tableId }}">
  40. <thead>
  41. @if ($headers = $grid->getComplexHeaders())
  42. <tr>
  43. @foreach($headers as $header)
  44. {!! $header->render() !!}
  45. @endforeach
  46. </tr>
  47. @endif
  48. <tr>
  49. @foreach($grid->columns() as $column)
  50. <th {!! $column->formatTitleAttributes() !!}>{!! $column->getLabel() !!}{!! $column->renderHeader() !!}</th>
  51. @endforeach
  52. </tr>
  53. </thead>
  54. @if ($grid->hasQuickCreate())
  55. {!! $grid->renderQuickCreate() !!}
  56. @endif
  57. <tbody>
  58. @foreach($grid->rows() as $row)
  59. <tr {!! $row->rowAttributes() !!}>
  60. @foreach($grid->getColumnNames() as $name)
  61. <td {!! $row->columnAttributes($name) !!}>
  62. {!! $row->column($name) !!}
  63. </td>
  64. @endforeach
  65. </tr>
  66. @endforeach
  67. @if ($grid->rows()->isEmpty())
  68. <tr>
  69. <td colspan="{!! count($grid->getColumnNames()) !!}">
  70. <div style="margin:5px 0 0 10px;"><span class="help-block" style="margin-bottom:0"><i class="fa fa-info-circle"></i>&nbsp;{{ trans('admin.no_data') }}</span></div>
  71. </td>
  72. </tr>
  73. @endif
  74. </tbody>
  75. </table>
  76. </div>
  77. {!! $grid->renderFooter() !!}
  78. @if ($paginator = $grid->paginator())
  79. <div class="box-footer clearfix " style="padding-bottom:5px;">
  80. {!! $paginator->render() !!}
  81. </div>
  82. @else
  83. <div class="box-footer clearfix text-80 " style="height:48px;line-height:25px;">
  84. @if ($grid->rows()->isEmpty())
  85. {!! trans('admin.pagination.range', ['first' => '<b>0</b>', 'last' => '<b>'.$grid->rows()->count().'</b>', 'total' => '<b>'.$grid->rows()->count().'</b>',]) !!}
  86. @else
  87. {!! trans('admin.pagination.range', ['first' => '<b>1</b>', 'last' => '<b>'.$grid->rows()->count().'</b>', 'total' => '<b>'.$grid->rows()->count().'</b>',]) !!}
  88. @endif
  89. </div>
  90. @endif
  91. </div>