async-fixed-table.blade.php 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. @if($grid->isAsyncRequest())
  2. {!! $grid->renderHeader() !!}
  3. <div class="table-responsive table-wrapper {{ $grid->option('table_collapse') ? 'table-collapse' : '' }}">
  4. <div class="tables-container">
  5. <div class="table-wrap table-main" data-height="{{ $tableHeight }}">
  6. <table class="custom-data-table async-table {{ $grid->formatTableClass() }}" id="{{ $tableId }}">
  7. <thead>
  8. @if ($headers = $grid->getVisibleComplexHeaders())
  9. <tr>
  10. @foreach($headers as $header)
  11. {!! $header->render() !!}
  12. @endforeach
  13. </tr>
  14. @endif
  15. <tr>
  16. @foreach($grid->getVisibleColumns() as $column)
  17. <th {!! $column->formatTitleAttributes() !!}>{!! $column->getLabel() !!}{!! $column->renderHeader() !!}</th>
  18. @endforeach
  19. </tr>
  20. </thead>
  21. @if ($grid->hasQuickCreate())
  22. {!! $grid->renderQuickCreate() !!}
  23. @endif
  24. <tbody>
  25. @foreach($grid->rows() as $row)
  26. <tr {!! $row->rowAttributes() !!}>
  27. @foreach($grid->getVisibleColumnNames() as $name)
  28. <td {!! $row->columnAttributes($name) !!}>
  29. {!! $row->column($name) !!}
  30. </td>
  31. @endforeach
  32. </tr>
  33. @endforeach
  34. @if ($grid->rows()->isEmpty())
  35. <tr>
  36. <td colspan="{!! count($grid->getVisibleColumnNames()) !!}">
  37. <div style="margin:5px 0 0 10px;"><span class="help-block" style="margin-bottom:0"><i class="feather icon-alert-circle"></i>&nbsp;{{ trans('admin.no_data') }}</span></div>
  38. </td>
  39. </tr>
  40. @endif
  41. </tbody>
  42. </table>
  43. </div>
  44. @if ($grid->leftVisibleColumns()->isNotEmpty() || $grid->leftVisibleComplexColumns()->isNotEmpty())
  45. <div class="table-wrap table-fixed table-fixed-left" data-height="{{ $tableHeight }}">
  46. <table class="custom-data-table {{ $grid->formatTableClass() }} ">
  47. <thead>
  48. @if ($grid->getVisibleComplexHeaders())
  49. <tr>
  50. @foreach($grid->leftVisibleComplexColumns() as $header)
  51. {!! $header->render() !!}
  52. @endforeach
  53. </tr>
  54. <tr>
  55. @foreach($grid->leftVisibleComplexColumns() as $header)
  56. @if ($header->getColumnNames()->count() > 1)
  57. @foreach($header->columns() as $column)
  58. <th {!! $column->formatTitleAttributes() !!}>{!! $column->getLabel() !!}{!! $column->renderHeader() !!}</th>
  59. @endforeach
  60. @endif
  61. @endforeach
  62. </tr>
  63. @else
  64. <tr>
  65. @foreach($grid->leftVisibleColumns() as $column)
  66. <th {!! $column->formatTitleAttributes() !!}>{!! $column->getLabel() !!}{!! $column->renderHeader() !!}</th>
  67. @endforeach
  68. </tr>
  69. @endif
  70. </thead>
  71. <tbody>
  72. @foreach($grid->rows() as $row)
  73. <tr {!! $row->rowAttributes() !!}>
  74. @foreach($grid->leftVisibleColumns() as $column)
  75. <td {!! $row->columnAttributes($column->getName()) !!}>
  76. {!! $row->column($column->getName()) !!}
  77. </td>
  78. @endforeach
  79. </tr>
  80. @endforeach
  81. </tbody>
  82. </table>
  83. </div>
  84. @endif
  85. @if ($grid->rightVisibleColumns()->isNotEmpty() || $grid->rightVisibleComplexColumns()->isNotEmpty())
  86. <div class="table-wrap table-fixed table-fixed-right" data-height="{{ $tableHeight }}">
  87. <table class="custom-data-table {{ $grid->formatTableClass() }} ">
  88. <thead>
  89. @if ($grid->getVisibleComplexHeaders())
  90. <tr>
  91. @foreach($grid->rightVisibleComplexColumns() as $header)
  92. {!! $header->render() !!}
  93. @endforeach
  94. </tr>
  95. <tr>
  96. @foreach($grid->rightVisibleComplexColumns() as $header)
  97. @if ($header->getColumnNames()->count() > 1)
  98. @foreach($header->columns() as $column)
  99. <th {!! $column->formatTitleAttributes() !!}>{!! $column->getLabel() !!}{!! $column->renderHeader() !!}</th>
  100. @endforeach
  101. @endif
  102. @endforeach
  103. </tr>
  104. @else
  105. <tr>
  106. @foreach($grid->rightVisibleColumns() as $column)
  107. <th {!! $column->formatTitleAttributes() !!}>{!! $column->getLabel() !!}{!! $column->renderHeader() !!}</th>
  108. @endforeach
  109. </tr>
  110. @endif
  111. </thead>
  112. <tbody>
  113. @foreach($grid->rows() as $row)
  114. <tr {!! $row->rowAttributes() !!}>
  115. @foreach($grid->rightVisibleColumns() as $column)
  116. <td {!! $row->columnAttributes($column->getName()) !!}>
  117. {!! $row->column($column->getName()) !!}
  118. </td>
  119. @endforeach
  120. </tr>
  121. @endforeach
  122. </tbody>
  123. </table>
  124. </div>
  125. @endif
  126. </div>
  127. </div>
  128. {!! $grid->renderFooter() !!}
  129. {!! $grid->renderPagination() !!}
  130. @else
  131. <div class="dcat-box custom-data-table async-{{ $tableId }}">
  132. @include('admin::grid.table-toolbar')
  133. {!! $grid->renderFilter() !!}
  134. <div class="async-body">
  135. {!! $grid->renderHeader() !!}
  136. <div class="table-responsive table-wrapper {{ $grid->option('table_collapse') ? 'table-collapse' : '' }}">
  137. <div class="tables-container">
  138. <div class="table-wrap table-main" data-height="{{ $tableHeight }}">
  139. <table class="custom-data-table async-table {{ $grid->formatTableClass() }}" id="{{ $tableId }}">
  140. <thead>
  141. @if ($headers = $grid->getVisibleComplexHeaders())
  142. <tr>
  143. @foreach($headers as $header)
  144. {!! $header->render() !!}
  145. @endforeach
  146. </tr>
  147. @endif
  148. <tr>
  149. @foreach($grid->getVisibleColumns() as $column)
  150. <th {!! $column->formatTitleAttributes() !!}>{!! $column->getLabel() !!}{!! $column->renderHeader() !!}</th>
  151. @endforeach
  152. </tr>
  153. </thead>
  154. @if ($grid->hasQuickCreate())
  155. {!! $grid->renderQuickCreate() !!}
  156. @endif
  157. <tbody>
  158. <tr>
  159. <td colspan="{!! count($grid->getVisibleColumnNames()) !!}">
  160. <div style="margin:5px 0 0 10px;"><span class="help-block" style="margin-bottom:0"><i class="feather icon-alert-circle"></i>&nbsp;{{ trans('admin.no_data') }}</span></div>
  161. </td>
  162. </tr>
  163. </tbody>
  164. </table>
  165. </div>
  166. </div>
  167. </div>
  168. {!! $grid->renderFooter() !!}
  169. </div>
  170. </div>
  171. @endif