From 024002ededc6786109aed432aeb28c210481bfb9 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Mon, 23 Sep 2019 17:44:42 +0200 Subject: [PATCH] - mcamara/laravel-localization update - download files with correct file extension - data type of value of abstratct is now "text" - geopackage seeder is now application/x-sqlite3 - style improvements for search --- app/Http/Controllers/Settings/FileController.php | 4 +++- composer.lock | 10 +++++----- ...019_08_29_075729_create_dataset_abstracts_table.php | 2 +- database/seeds/MimetypeTableSeeder.php | 2 +- resources/views/frontend/search/index.blade.php | 7 ++++++- resources/views/layouts/app.blade.php | 4 ++-- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/Settings/FileController.php b/app/Http/Controllers/Settings/FileController.php index c7c7ede..77ba9ad 100644 --- a/app/Http/Controllers/Settings/FileController.php +++ b/app/Http/Controllers/Settings/FileController.php @@ -13,6 +13,8 @@ class FileController extends Controller //$report = $this->report->find($id); $file = File::findOrFail($id); $file_path = public_path('storage/' . $file->path_name); - return response()->download($file_path, $file->label, ['Content-Type:' . $file->mime_type]); + $ext = \Illuminate\Support\Facades\File::extension($file_path); + return response()->download($file_path, $file->label . "." . $ext, ['Content-Type:' . $file->mime_type]); + // return response()->download($file_path, $file->label, ['Content-Type:' . $file->mime_type]); } } diff --git a/composer.lock b/composer.lock index 3189e76..1ec9850 100755 --- a/composer.lock +++ b/composer.lock @@ -1089,16 +1089,16 @@ }, { "name": "mcamara/laravel-localization", - "version": "1.4.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/mcamara/laravel-localization.git", - "reference": "82d06c66cdf1e3ed17783842886d87cbd5aadd43" + "reference": "d228a61afd8cfe9eb7f8f7450acfa0371382407d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/82d06c66cdf1e3ed17783842886d87cbd5aadd43", - "reference": "82d06c66cdf1e3ed17783842886d87cbd5aadd43", + "url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/d228a61afd8cfe9eb7f8f7450acfa0371382407d", + "reference": "d228a61afd8cfe9eb7f8f7450acfa0371382407d", "shasum": "" }, "require": { @@ -1147,7 +1147,7 @@ "localization", "php" ], - "time": "2019-09-08T13:56:19+00:00" + "time": "2019-09-20T15:24:04+00:00" }, { "name": "monolog/monolog", diff --git a/database/migrations/2019_08_29_075729_create_dataset_abstracts_table.php b/database/migrations/2019_08_29_075729_create_dataset_abstracts_table.php index f1cd008..3471aae 100644 --- a/database/migrations/2019_08_29_075729_create_dataset_abstracts_table.php +++ b/database/migrations/2019_08_29_075729_create_dataset_abstracts_table.php @@ -24,7 +24,7 @@ class CreateDatasetAbstractsTable extends Migration 'type', ['abstract' => 'Abstract', 'methods' => 'Methods', 'series_information' => 'Series_information', 'technical_info' => 'Technical_info', 'translated' => 'Translated', 'other' => 'Other'] ); - $table->string('value', 255); + $table->text('value'); $table->string('language', 3); }); } diff --git a/database/seeds/MimetypeTableSeeder.php b/database/seeds/MimetypeTableSeeder.php index 87d80cb..e39f693 100644 --- a/database/seeds/MimetypeTableSeeder.php +++ b/database/seeds/MimetypeTableSeeder.php @@ -12,7 +12,7 @@ class MimetypeTableSeeder extends Seeder DB::table('mime_types')->insert([ [ - 'name' => 'application/geopackage+sqlite3', + 'name' => 'application/x-sqlite3', 'file_extension' => 'gpkg', 'enabled' =>true, 'created_at' => Carbon::now(), diff --git a/resources/views/frontend/search/index.blade.php b/resources/views/frontend/search/index.blade.php index d22d889..7970e08 100644 --- a/resources/views/frontend/search/index.blade.php +++ b/resources/views/frontend/search/index.blade.php @@ -86,6 +86,8 @@ @endsection +@section('head') + \ No newline at end of file + + +@endsection + diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 1ef5478..61f8f70 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -68,8 +68,8 @@ href="{{ route('frontend.home.intro') }}">Intro
  • - SEARCH + Search