table.blade.php 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {!! $grid->renderQuickSearch() !!}
  2. <div class="card material">
  3. @if ($grid->allowToolbar())
  4. <div class="box-header">
  5. @if(!empty($title))
  6. <h4 class="pull-left" style="margin:5px 10px 0;">
  7. {!! $title !!}&nbsp;
  8. @if(!empty($description))
  9. <small>{!! $description!!}</small>
  10. @endif
  11. </h4>
  12. <div class="pull-right" data-responsive-table-toolbar="{{$tableId}}">
  13. {!! $grid->renderTools() !!} {!! $grid->renderCreateButton() !!} {!! $grid->renderExportButton() !!}
  14. </div>
  15. @else
  16. <div class="pull-right" data-responsive-table-toolbar="{{$tableId}}">
  17. {!! $grid->renderCreateButton() !!} {!! $grid->renderExportButton() !!}
  18. </div>
  19. {!! $grid->renderTools() !!}
  20. @endif
  21. </div>
  22. @endif
  23. {!! $grid->renderFilter() !!}
  24. {!! $grid->renderHeader() !!}
  25. <div class="card-body panel-collapse collapse in table-responsive" {!! $grid->option('show_bordered') ? 'style="padding:3px 10px 10px"' : '' !!}>
  26. <table class=" table table-hover responsive {{ $grid->option('show_bordered') ? 'table-bordered' : $grid->option('table_header_style') }} " id="{{$tableId}}">
  27. <thead>
  28. @if ($headers = $grid->getMultipleHeaders())
  29. <tr>
  30. @foreach($headers as $header)
  31. {!! $header->render() !!}
  32. @endforeach
  33. </tr>
  34. @endif
  35. <tr>
  36. @foreach($grid->columns() as $column)
  37. <th {!! $column->formatTitleAttributes() !!}>{!! $column->getLabel() !!}{!! $column->renderHeader() !!}</th>
  38. @endforeach
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @foreach($grid->rows() as $row)
  43. <tr {!! $row->rowAttributes() !!}>
  44. @foreach($grid->columnNames() as $name)
  45. <td {!! $row->columnAttributes($name) !!}>
  46. {!! $row->column($name) !!}
  47. </td>
  48. @endforeach
  49. </tr>
  50. @endforeach
  51. @if ($grid->rows()->isEmpty())
  52. <tr>
  53. <td colspan="{!! count($grid->columnNames()) !!}">
  54. <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>
  55. </td>
  56. </tr>
  57. @endif
  58. </tbody>
  59. </table>
  60. </div>
  61. {!! $grid->renderFooter() !!}
  62. @if ($paginator = $grid->paginator())
  63. <div class="box-footer clearfix " style="padding-bottom:5px;">
  64. {!! $paginator !!}
  65. </div>
  66. @else
  67. <div class="box-footer clearfix text-80 " style="height:48px;line-height:25px;">
  68. @if ($grid->rows()->isEmpty())
  69. {!! trans('admin.pagination.range', ['first' => '<b>0</b>', 'last' => '<b>'.$grid->rows()->count().'</b>', 'total' => '<b>'.$grid->rows()->count().'</b>',]) !!}
  70. @else
  71. {!! trans('admin.pagination.range', ['first' => '<b>1</b>', 'last' => '<b>'.$grid->rows()->count().'</b>', 'total' => '<b>'.$grid->rows()->count().'</b>',]) !!}
  72. @endif
  73. </div>
  74. @endif
  75. </div>