Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pxpm committed Sep 6, 2023
1 parent 65de947 commit d391ec7
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/resources/views/crud/list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ class="{{ backpack_theme_config('classes.table') ?? 'table table-striped table-h
<tr>
{{-- Table columns --}}
@foreach ($crud->columns() as $column)
@php
$exportOnlyColumn = $column['exportOnlyColumn'] ?? false;
$visibleInTable = $column['visibleInTable'] ?? true;
$visibleInModal = $column['visibleInModal'] ?? true;
$visibleInExport = $column['visibleInExport'] ?? true;
$forceExport = $column['forceExport'] ?? (isset($column['exportOnlyColumn']) ? true : false);
@endphp
<th
data-orderable="{{ var_export($column['orderable'], true) }}"
data-priority="{{ $column['priority'] }}"
Expand All @@ -79,19 +86,11 @@ class="{{ backpack_theme_config('classes.table') ?? 'table table-striped table-h
--}}

{{-- If it is an export field only, we are done. --}}
@php
$exportOnlyField = $column['exportOnlyField'] ?? false;
$visibleInTable = $column['visibleInTable'] ?? true;
$visibleInModal = $column['visibleInModal'] ?? true;
$visibleInExport = $column['visibleInExport'] ?? true;
$forceExport = $column['forceExport'] ?? ($column['exportOnlyField'] ? true : false);
@endphp

data-visible="{{ $exportOnlyField ? 'false' : var_export($visibleInTable, true) }}"
data-visible="{{ $exportOnlyColumn ? 'false' : var_export($visibleInTable, true) }}"
data-visible-in-table="{{ var_export($visibleInTable, true) }}"
data-can-be-visible-in-table="{{ $exportOnlyField ? 'false' : 'true' }}"
data-can-be-visible-in-table="{{ $exportOnlyColumn ? 'false' : 'true' }}"
data-visible-in-modal="{{ var_export($visibleInModal, true) }}"
data-visible-in-export="{{ $exportOnlyField ? 'true' : ($visibleInExport ? 'true' : 'false') }}"
data-visible-in-export="{{ $exportOnlyColumn ? 'true' : ($visibleInExport ? 'true' : 'false') }}"
data-force-export="{{ var_export($forceExport, true) }}"
>
{{-- Bulk checkbox --}}
Expand Down

0 comments on commit d391ec7

Please sign in to comment.