From c78dd9c2e78d463b9353ef730329cc7626eb7fcd Mon Sep 17 00:00:00 2001 From: pxpm Date: Wed, 6 Nov 2024 16:06:31 +0000 Subject: [PATCH 1/5] wip --- src/app/View/Components/FiltersNavbar.php | 27 ++++ .../views/crud/inc/datatables_logic.blade.php | 39 ++++- .../views/crud/inc/filters_navbar.blade.php | 32 ++--- src/resources/views/crud/list.blade.php | 2 +- .../ui/components/filters-navbar.blade.php | 133 ++++++++++++++++++ 5 files changed, 210 insertions(+), 23 deletions(-) create mode 100644 src/app/View/Components/FiltersNavbar.php create mode 100644 src/resources/views/ui/components/filters-navbar.blade.php diff --git a/src/app/View/Components/FiltersNavbar.php b/src/app/View/Components/FiltersNavbar.php new file mode 100644 index 0000000000..c628213651 --- /dev/null +++ b/src/app/View/Components/FiltersNavbar.php @@ -0,0 +1,27 @@ +crud = $crud; + } + + /** + * 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..e8bbdf1a9c 100644 --- a/src/resources/views/crud/inc/datatables_logic.blade.php +++ b/src/resources/views/crud/inc/datatables_logic.blade.php @@ -281,10 +281,47 @@ 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 \ No newline at end of file From 6c6dbafaefedcf10805e5f7379f07a4f5a898e7f Mon Sep 17 00:00:00 2001 From: pxpm Date: Wed, 6 Nov 2024 16:40:29 +0000 Subject: [PATCH 2/5] wip --- .../ui/components/filters-navbar.blade.php | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/resources/views/ui/components/filters-navbar.blade.php b/src/resources/views/ui/components/filters-navbar.blade.php index 6b3388a457..7395f90d71 100644 --- a/src/resources/views/ui/components/filters-navbar.blade.php +++ b/src/resources/views/ui/components/filters-navbar.blade.php @@ -25,50 +25,50 @@ {{-- /.navbar-collapse --}} -@push('crud_list_scripts') +@push('after_scripts') @basset('https://unpkg.com/urijs@1.19.11/src/URI.min.js') -@endpush diff --git a/src/resources/views/ui/components/filters-navbar.blade.php b/src/resources/views/ui/components/filters-navbar.blade.php index 7395f90d71..10a9d46a50 100644 --- a/src/resources/views/ui/components/filters-navbar.blade.php +++ b/src/resources/views/ui/components/filters-navbar.blade.php @@ -1,4 +1,4 @@ -