@if(isset($dt) && isset($dt->builder))

{{ $dt->dtTable['title'] }}

@if(isset($dt->dtTable['buttons']) && count($dt->dtTable['buttons']) > 0)
@foreach ($dt->dtTable['buttons'] as $button) {{ $button['name'] }} @endforeach
@endif
@include('partials._list_filters')
@if(isset($dt->dtTable['labels'])) @foreach($dt->dtTable['labels'] as $th) @endforeach @endif @if(in_array('S/N', $dt->dtTable['labels'])) @php $sn = 1 @endphp @endif @foreach($dt->builder as $item) @if(in_array('S/N', $dt->dtTable['labels'])) @endif @foreach( $dt->dtTable['columns']['cols'] as $col ) @if(isset($item->{$col['key']})) @if(isset($col['is_count']) && $col['is_count'] !== false && isset($item->{$col['key']})) @elseif(isset($col['is_image']) && $col['is_image'] !== false && isset($item->{$col['key']}) && !isset($col['belongs_to'])) @elseif( isset( $col['is_image']) && $col['is_image'] !== false && isset($item{$col['key']}) && isset($col['belongs_to']) ) @elseif(isset($col['has_tags']) && $col['has_tags'] !== false && isset($item->{$col['key']})) @elseif (isset($item->{$col['key']}) && isset($col['has_dropdown']) && $col['has_dropdown'] !== false) @elseif (isset($col['has_buttons']) && $col['has_buttons'] !== false) @elseif (isset($col['has_roles']) && $col['has_roles'] !== false) @elseif (isset($col['has_badge']) && $col['has_badge'] !== false) @else @if(isset($col['user_function']) && !isset($col['user_function'])) @elseif(isset($col['belongs_to']) && isset($col['user_function'])) @elseif(isset($col['belongs_to'])) @else @endif @endif @else @endif @endforeach @endforeach
{{ $th }}
{{ $sn++ }} {{ count( $item->{$col['key']} ) }}
@foreach($item->{$col['key']} as $index => $tag) @if($index < (isset($col['limit']) ? $col['limit'] : 2)) {{ $tag->name }} @else None @endif @endforeach @if(count($item->{$col['key']}) > (isset($col['limit']) ? $col['limit'] : 2)) {{ count($item->{$col['key']}) - (isset($col['limit']) ? $col['limit'] : 2) }} + more @else @if (count($item->{$col['key']}) === 0) None @endif @endif
@foreach($col['buttons'] as $button) @if(isset($button['has_dropdown']) && $button['has_dropdown'] !== false) @else @if ($button['dynamic']) @if(isset($button['icon'])) @endif {{ trans($button['label']) }} @else @if (isset($button['can_show']) && $button['can_show']) @if (dTButtonCanShow($button['boolean_parameters'], $item, $button['type']) == $button['value']) @endif @endif @endif @endif @endforeach {!! echoDtRoles($item->{$col['key']}) !!} @if(isset($col['data']) && count($col['data']) > 0 ) {!! replacePlaceholder($col['key'], $item->{$col['key']}, $col['data'][$item->{$col['key']}]) !!} @else {!! $item->{$col['key']} !!} @endif {{ call_user_func($col['user_function'], array_merge($col['args'], ['key' => $col['key'], 'data' => $item])) }} @if(isset($col['array'])) @foreach($col['array'] as $in => $colKey) {!! call_user_func($col['user_function'], array_merge($col['args'], ['key' => $col['key'], 'data' => colDTBelongsTo($colKey, $item)])) !!}
@endforeach @else {!! call_user_func($col['user_function'], array_merge($col['args'], ['key' => $col['key'], 'data' => colDTBelongsTo($col['belongs_to'], $item)])) !!} @endif
@if(isset($col['array'])) @foreach($col['array'] as $in => $colKey) {{ colDTBelongsTo($colKey, $item) }}
@endforeach @else {{ colDTBelongsTo($col['belongs_to'], $item) }} @endif
@if(in_array($col['key'], ['reference', 'transfer_reference'])) @if(isset($col['array'])) @foreach($col['array'] as $in => $colKey) {{ $item->{$colKey} }}
@endforeach @else {{ $item->{$col['key']} }} @endif @else @if(isset($col['array'])) @foreach($col['array'] as $colKey) {{ echoDTField($item->{$colKey}) }}
@endforeach @else {{ echoDTField($item->{$col['key']}) }} @endif @endif
{{ '---' }}
Showing {{ ($dt->builder->currentpage() -1 ) * $dt->builder->perpage() + 1 }} to {{ $dt->builder->currentpage() * $dt->builder->perpage() }} of {{ $dt->builder->total() }} entries
{!! $dt->builder->render() !!}
@endif