From f37fe54477cfa260c9f583551241c4dd3a31123e Mon Sep 17 00:00:00 2001 From: Karan Datwani Date: Fri, 17 May 2024 16:24:18 +0530 Subject: [PATCH 1/2] init --- .../views/ui/widgets/table.blade.php | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/resources/views/ui/widgets/table.blade.php diff --git a/src/resources/views/ui/widgets/table.blade.php b/src/resources/views/ui/widgets/table.blade.php new file mode 100644 index 0000000000..132e989e9d --- /dev/null +++ b/src/resources/views/ui/widgets/table.blade.php @@ -0,0 +1,49 @@ +@php + $widget['wrapper']['class'] = $widget['wrapper']['class'] ?? ($widget['wrapperClass'] ?? 'col-sm-6 col-md-4'); +@endphp + +@includeWhen(!empty($widget['wrapper']), backpack_view('widgets.inc.wrapper_start')) +
+ @if (isset($widget['content']['header'])) +
+
{!! $widget['content']['header'] !!}
+
+ @endif +
+ + @if ($widget['content']['thead']) + + + @foreach ($widget['content']['thead'] as $th) + + @endforeach + + + @endif + + @foreach ($widget['content']['tbody'] as $tr) + + @foreach ($tr as $td) + @if (is_array($td)) + + @else + + @endif + @endforeach + + @endforeach + + + + @foreach ($widget['content']['tfoot'] as $td) + + @endforeach + + +
{{ $th }}
+ @include('crud::columns.text', ['column' => $td]) + {{ $td }}
{{ $td }}
+ +
+
+@includeWhen(!empty($widget['wrapper']), backpack_view('widgets.inc.wrapper_end')) From 913098ac1fc1460f680d81e738e7ace48bc702f1 Mon Sep 17 00:00:00 2001 From: Karan Datwani Date: Fri, 17 May 2024 16:36:30 +0530 Subject: [PATCH 2/2] misc --- src/resources/views/ui/widgets/table.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/views/ui/widgets/table.blade.php b/src/resources/views/ui/widgets/table.blade.php index 132e989e9d..710e5994a1 100644 --- a/src/resources/views/ui/widgets/table.blade.php +++ b/src/resources/views/ui/widgets/table.blade.php @@ -9,7 +9,7 @@
{!! $widget['content']['header'] !!}
@endif -
+
@if ($widget['content']['thead'])