From a68b7b34cf03be74939a742226ac3662edb39f8a Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Mon, 31 May 2021 15:15:47 +0200 Subject: [PATCH] - Licence.php (make name and language attributes fillable for LicenseController.php) - LicencseController.php: select attribute part1 from languages - adaptions for oai_datacite.xslt, doi_datacite.xslt and datasetxml2oai-pmh.xslt: for showing correct rights identifier add adding open access for CC-BY-4.0 and CC-BY-SA-4.0 licenses --- app/Http/Controllers/Settings/LicenseController.php | 2 +- app/Models/License.php | 2 ++ public/datasetxml2oai-pmh.xslt | 4 ++-- public/prefixes/doi_datacite.xslt | 7 +++++-- public/prefixes/oai_datacite.xslt | 7 +++++-- resources/views/settings/license/_form.blade.php | 6 ++++++ 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Settings/LicenseController.php b/app/Http/Controllers/Settings/LicenseController.php index bb415cd..30aed30 100644 --- a/app/Http/Controllers/Settings/LicenseController.php +++ b/app/Http/Controllers/Settings/LicenseController.php @@ -32,7 +32,7 @@ class LicenseController extends Controller //$languages = Language::where('active', true)->pluck('part2_t'); $languages = DB::table('languages') ->where('active', true) - ->pluck('part2_t', 'part2_t'); + ->pluck('part1', 'part1'); return view('settings.license.edit', compact('license', 'languages')); } diff --git a/app/Models/License.php b/app/Models/License.php index b4868c9..91c9912 100644 --- a/app/Models/License.php +++ b/app/Models/License.php @@ -11,6 +11,7 @@ class License extends Model protected $fillable = [ 'name_long', + 'name', 'language', 'link_licence', 'link_logo', @@ -19,6 +20,7 @@ class License extends Model 'comment_internal', 'mime_type', 'sort_order', + 'language', 'active', 'pod_allowed' ]; diff --git a/public/datasetxml2oai-pmh.xslt b/public/datasetxml2oai-pmh.xslt index 5373505..f62274c 100644 --- a/public/datasetxml2oai-pmh.xslt +++ b/public/datasetxml2oai-pmh.xslt @@ -576,8 +576,8 @@ - - + + info:eu-repo/semantics/openAccess diff --git a/public/prefixes/doi_datacite.xslt b/public/prefixes/doi_datacite.xslt index b9658c7..df4aa79 100644 --- a/public/prefixes/doi_datacite.xslt +++ b/public/prefixes/doi_datacite.xslt @@ -370,6 +370,9 @@ + + + @@ -382,11 +385,11 @@ SPDX - CC-BY-NC-ND-4.0 + - + info:eu-repo/semantics/openAccess diff --git a/public/prefixes/oai_datacite.xslt b/public/prefixes/oai_datacite.xslt index b3b5a56..78abaed 100644 --- a/public/prefixes/oai_datacite.xslt +++ b/public/prefixes/oai_datacite.xslt @@ -373,6 +373,9 @@ + + + @@ -385,11 +388,11 @@ SPDX - CC-BY-NC-ND-4.0 + - + info:eu-repo/semantics/openAccess diff --git a/resources/views/settings/license/_form.blade.php b/resources/views/settings/license/_form.blade.php index bf7e775..49ece31 100644 --- a/resources/views/settings/license/_form.blade.php +++ b/resources/views/settings/license/_form.blade.php @@ -8,6 +8,12 @@ => '--no language--']) !!} +
+ {!! Form::label('name', 'Identifier') !!} + {!! Form::text('name', null, ['class' => 'pure-u-23-24', 'placeholder' + => '--no identifier--']) !!} +
+
{!! Form::label('language', 'Sprache') !!}