From: soufiane Date: Tue, 20 Feb 2024 16:49:30 +0000 (+0100) Subject: wait #6717 @7:00 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e73d4fa5f682c417417bfa15614d316a84d51c61;p=fluidbook-toolbox.git wait #6717 @7:00 --- diff --git a/app/Http/Controllers/Admin/Operations/FluidbookPublication/DownloadOperation.php b/app/Http/Controllers/Admin/Operations/FluidbookPublication/DownloadOperation.php index bb4fc8605..a8d708b0e 100644 --- a/app/Http/Controllers/Admin/Operations/FluidbookPublication/DownloadOperation.php +++ b/app/Http/Controllers/Admin/Operations/FluidbookPublication/DownloadOperation.php @@ -23,6 +23,7 @@ trait DownloadOperation Route::match(['get'], $segment . '/{id}/package/{action}/scorm/{scormversion}', $controller . '@packageScorm'); Route::match(['get'], $segment . '/{id}_{hash}/download/{file}', $controller . '@download')->withoutMiddleware([CheckIfAdmin::class]); Route::match(['get','post'], $segment . '/download_settings/{file}', $controller . '@downloadSettings')->withoutMiddleware([CheckIfAdmin::class])->name("download_settings"); + Route::match(['post'], $segment . '/send_link/{ids}', $controller . '@sendLinkForDownload')->name("send_link"); } protected function setupDownloadDefaults() @@ -132,7 +133,12 @@ trait DownloadOperation protected function downloadSettings($file) { $name = "settings_export"; $path = "/tmp/cubist".base64_decode($file); - if(!file_exists($path)) abort(404); + if (!file_exists($path)) abort(404); return response()->download($path, $name . '.xlsx'); } + + protected function sendLinkForDownload($ids) { + $userId = backpack_user()->id; + dispatch_sync(new FluidbookSettingsExport($ids,$userId)); + } } diff --git a/resources/views/vendor/backpack/crud/buttons/fluidbook_publication/download.blade.php b/resources/views/vendor/backpack/crud/buttons/fluidbook_publication/download.blade.php index 4caf20ca9..acb9e693d 100644 --- a/resources/views/vendor/backpack/crud/buttons/fluidbook_publication/download.blade.php +++ b/resources/views/vendor/backpack/crud/buttons/fluidbook_publication/download.blade.php @@ -78,7 +78,7 @@ status<2 && !can('fluidbook-publication:admin')) + @if($entry->status==1 && !can('fluidbook-publication:admin')) data-context-confirm="{{json_encode($confirm)}}" @endif title="{{__('Télécharger la publication')}}" diff --git a/resources/views/vendor/backpack/crud/edit-external-server.blade.php b/resources/views/vendor/backpack/crud/edit-external-server.blade.php index 6cc8a6d8c..7432ef105 100644 --- a/resources/views/vendor/backpack/crud/edit-external-server.blade.php +++ b/resources/views/vendor/backpack/crud/edit-external-server.blade.php @@ -21,6 +21,8 @@ const data = { id: {{$entry->id}}, protocol: $('[name=protocol]').val(), + base_path: $('[name=base_path]').val(), + ftp_mode: $('[name=ftp_mode]').val(), host: $('[name=host]').val(), port: $('[name=port]').val(), username: $('[name=username]').val(), diff --git a/resources/views/vendor/backpack/crud/inc/export_buttons.blade.php b/resources/views/vendor/backpack/crud/inc/export_buttons.blade.php new file mode 100644 index 000000000..8b0a67a4f --- /dev/null +++ b/resources/views/vendor/backpack/crud/inc/export_buttons.blade.php @@ -0,0 +1,163 @@ +@if ($crud->exportButtons()) + + + + + + + + + +@endif diff --git a/resources/views/vendor/backpack/crud/list.blade.php b/resources/views/vendor/backpack/crud/list.blade.php index 6122fab27..a30171849 100644 --- a/resources/views/vendor/backpack/crud/list.blade.php +++ b/resources/views/vendor/backpack/crud/list.blade.php @@ -125,6 +125,7 @@ {{-- Bulk checkbox --}} @if($loop->first && $crud->getOperationSetting('bulkActions')) + ok {!! View::make('crud::columns.inc.bulk_actions_checkbox')->render() !!} @endif {!! $column['label'] !!} @@ -141,7 +142,6 @@ @if ( $crud->buttons()->where('stack', 'bottom')->count() )
@include('crud::inc.button_stack', ['stack' => 'bottom']) -
@endif