diff --git a/src/app/View/Components/FiltersNavbar.php b/src/app/View/Components/FiltersNavbar.php new file mode 100644 index 0000000000..ebd1d9e689 --- /dev/null +++ b/src/app/View/Components/FiltersNavbar.php @@ -0,0 +1,31 @@ +crud = $crud; + $this->id = $id ?? 'filters-navbar-'.uniqid(); + } + + /** + * Get the view / contents that represent the component. + */ + public function render(): View|Closure|string + { + return backpack_view('components.filters-navbar'); + } +} diff --git a/src/resources/views/crud/inc/datatables_logic.blade.php b/src/resources/views/crud/inc/datatables_logic.blade.php index befd31c474..68efb36a23 100644 --- a/src/resources/views/crud/inc/datatables_logic.blade.php +++ b/src/resources/views/crud/inc/datatables_logic.blade.php @@ -281,14 +281,35 @@ functionsToRunOnDataTablesDrawEvent: [], "<'table-footer row mt-2 d-print-none align-items-center '<'col-sm-12 col-md-4'l><'col-sm-0 col-md-4 text-center'B><'col-sm-12 col-md-4 'p>>", } } - + @include('crud::inc.export_buttons') -@endpush diff --git a/src/resources/views/crud/list.blade.php b/src/resources/views/crud/list.blade.php index c0d3333dec..20773d54f7 100644 --- a/src/resources/views/crud/list.blade.php +++ b/src/resources/views/crud/list.blade.php @@ -51,7 +51,7 @@ {{-- Backpack List Filters --}} @if ($crud->filtersEnabled()) - @include('crud::inc.filters_navbar') + @endif
diff --git a/src/resources/views/ui/components/filters-navbar.blade.php b/src/resources/views/ui/components/filters-navbar.blade.php new file mode 100644 index 0000000000..10a9d46a50 --- /dev/null +++ b/src/resources/views/ui/components/filters-navbar.blade.php @@ -0,0 +1,198 @@ + + +@push('after_scripts') + @basset('https://unpkg.com/urijs@1.19.11/src/URI.min.js') + +@endpush \ No newline at end of file