@@ -17,57 +17,27 @@ class="{{ $this->setTableRowClass($model) }}"
17
17
@foreach ($this -> setTableRowAttributes ($model ) as $key => $value )
18
18
{{ $key } } =" {{ $value } }"
19
19
@endforeach
20
+ @if ($this -> getTableRowUrl ($model ) )
21
+ onclick =" window.location='{{ $this -> getTableRowUrl ($model ) } } ';"
22
+ style =" cursor :pointer "
23
+ @endif
20
24
>
21
25
@if ($checkbox && $checkboxLocation === ' left' )
22
26
@include (' laravel-livewire-tables::includes._checkbox-row' )
23
27
@endif
24
28
25
29
@foreach ($columns as $column )
26
- <td
27
- class =" {{ $this -> setTableDataClass ($column -> attribute , Arr:: get ($model -> toArray (), $column -> attribute )) } }"
28
- id =" {{ $this -> setTableDataId ($column -> attribute , Arr:: get ($model -> toArray (), $column -> attribute )) } }"
29
- @foreach ($this -> setTableDataAttributes ($column -> attribute , Arr:: get ($model -> toArray (), $column -> attribute )) as $key => $value )
30
- {{ $key } } =" {{ $value } }"
31
- @endforeach
32
- >
33
- @if ($column -> hasComponents () )
34
- @if ($column -> componentsAreHiddenForModel ($model ) )
35
- @if ($message = $column -> componentsHiddenMessageForModel ($model ) )
36
- {{ $message } }
37
- @else
38
-   ;
39
- @endif
40
- @else
41
- @foreach ($column -> getComponents () as $component )
42
- @if (! $component -> isHidden () )
43
- @include ($component -> view (), [' model' => $model , ' attributes' => $component -> getAttributes (), ' options' => $component -> getOptions ()] )
44
- @endif
45
- @endforeach
46
- @endif
47
- @elseif ($column -> isView () )
48
- @include ($column -> view , [$column -> getViewModelName () => $model ] )
49
- @else
50
- @if ($column -> isHtml () )
51
- @if ($column -> isCustomAttribute () )
52
- {{ new \Illuminate\Support\ HtmlString (data_get ($model , $column -> attribute )) } }
53
- @else
54
- {{ new \Illuminate\Support\ HtmlString (Arr:: get ($model -> toArray (), $column -> attribute )) } }
55
- @endif
56
- @elseif ($column -> isUnescaped () )
57
- @if ($column -> isCustomAttribute () )
58
- {!! data_get ($model , $column -> attribute ) ! !}
59
- @else
60
- {!! Arr:: get ($model -> toArray (), $column -> attribute ) ! !}
61
- @endif
62
- @else
63
- @if ($column -> isCustomAttribute () )
64
- {{ data_get ($model , $column -> attribute ) } }
65
- @else
66
- {{ Arr:: get ($model -> toArray (), $column -> attribute ) } }
67
- @endif
68
- @endif
69
- @endif
70
- </td >
30
+ @if (! $column -> isHidden () )
31
+ <td
32
+ class =" {{ $this -> setTableDataClass ($column -> attribute , Arr:: get ($model -> toArray (), $column -> attribute )) } }"
33
+ id =" {{ $this -> setTableDataId ($column -> attribute , Arr:: get ($model -> toArray (), $column -> attribute )) } }"
34
+ @foreach ($this -> setTableDataAttributes ($column -> attribute , Arr:: get ($model -> toArray (), $column -> attribute )) as $key => $value )
35
+ {{ $key } } =" {{ $value } }"
36
+ @endforeach
37
+ >
38
+ @include (' laravel-livewire-tables::includes._column-data' )
39
+ </td >
40
+ @endif
71
41
@endforeach
72
42
73
43
@if ($checkbox && $checkboxLocation === ' right' )
0 commit comments