Skip to content

Commit

Permalink
FEATURE ✨ Add extra possibilities for the index view
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeblauw committed Dec 4, 2024
1 parent 62ce15c commit 6994455
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions resources/views/generic/flux/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
<style>
#indexTable_filter input[type="search"] {
background-color: rgb(241 245 249) !important;
border-radius: 5px;
}
</style>

<flux:heading size="xl" level="1" class="flex justify-between items-center mb-2">
<div>{{$config->name_to_use}}</div>

@if( View::exists('admin.'.$config->modelsname().'._form'))
<flux:button href="{{$config->getCreateUrl()}}" icon="plus" variant="filled" size="sm">{{__('Create New')}}</flux:button>
@endif

</flux:heading>

<flux:separator />

@includeWhen(view()->exists(($view = 'admin.'.$config->modelsname().'._index_top')), $view)

<div class="flex flex-col mt-2">
<div class="">
<div class="">
Expand All @@ -43,7 +44,11 @@
@php $titlefield = $config->titleField() @endphp
{{$model->$titlefield}}
@else
@if(is_bool($model->$column))
{{ $model->$column ? 'Yes' : 'No' }}
@else
{{$model->$column}}
@endif
@endif
</td>
@endforeach
Expand All @@ -70,10 +75,12 @@
</div>
</div>

@push('blueadmin_header')
@include('BlueAdminLayout::dataTables')
@endpush
@includeWhen(view()->exists(($view = 'admin.'.$config->modelsname().'._index_bottom')), $view)


@push('blueadmin_header')
@include('BlueAdminLayout::dataTables')
@endpush

</x-ba-admin-layout>

0 comments on commit 6994455

Please sign in to comment.