add keywords during publishing

This commit is contained in:
Arno Kaimbacher 2019-03-18 14:32:29 +01:00
parent f3f17d9371
commit d9b26afb3f
13 changed files with 332 additions and 96 deletions

View File

@ -18,6 +18,7 @@ use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Validator;
use App\Models\DatasetReference; use App\Models\DatasetReference;
use App\Models\Subject;
use App\Models\GeolocationBox; use App\Models\GeolocationBox;
use App\Models\Page; use App\Models\Page;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
@ -66,12 +67,17 @@ class IndexController extends Controller
$titleTypes = ['sub' => 'sub', 'alternative' => 'alternative', 'translated' => 'translated', 'other' => 'other']; $titleTypes = ['sub' => 'sub', 'alternative' => 'alternative', 'translated' => 'translated', 'other' => 'other'];
$keywordTypes = ['uncontrolled' => 'uncontrolled'];
$descriptionTypes = [ 'methods' => 'methods', 'series_information' => 'series_information', 'technical_info' => 'technical_info', 'other' => 'other']; $descriptionTypes = [ 'methods' => 'methods', 'series_information' => 'series_information', 'technical_info' => 'technical_info', 'other' => 'other'];
$page = Page::query()->where('page_slug', 'terms-and-conditions')->firstOrFail(); $page = Page::query()->where('page_slug', 'terms-and-conditions')->firstOrFail();
//$relationTypes = array('updates' => 'updates', 'updated-by' => 'updated-by', 'other' => 'other'); //$relationTypes = array('updates' => 'updates', 'updated-by' => 'updated-by', 'other' => 'other');
return view('publish.create-step1', compact('licenses', 'languages', 'projects', 'relatedIdentifierTypes', 'relationTypes', 'titleTypes', 'descriptionTypes', 'page')); return view(
'publish.create-step1',
compact('licenses', 'languages', 'projects', 'relatedIdentifierTypes', 'relationTypes', 'titleTypes', 'keywordTypes', 'descriptionTypes', 'page')
);
} }
/** /**
@ -394,6 +400,14 @@ class IndexController extends Controller
} }
} }
//save keywords
if (isset($data['keywords'])) {
foreach ($request->get('keywords') as $key => $keyword) {
$dataKeyword = new Subject($keyword);
$dataset->subjects()->save($dataKeyword);
}
}
if (isset($data['geolocation'])) { if (isset($data['geolocation'])) {
$formGeolocation = $request->input('geolocation'); $formGeolocation = $request->input('geolocation');
if ($formGeolocation['xmin'] !== null && $formGeolocation['ymin'] !== null && if ($formGeolocation['xmin'] !== null && $formGeolocation['ymin'] !== null &&

View File

@ -5,7 +5,6 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\ProjectRequest; use App\Http\Requests\ProjectRequest;
use App\Models\Project; use App\Models\Project;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View; use Illuminate\View\View;
class CategoryController extends Controller class CategoryController extends Controller

View File

@ -7,6 +7,7 @@ use App\Models\License;
use App\Models\Person; use App\Models\Person;
use App\Models\File; use App\Models\File;
use App\Models\GeolocationBox; use App\Models\GeolocationBox;
use App\Models\Subject;
/** /**
* DatasetExtension short summary. * DatasetExtension short summary.
@ -53,6 +54,11 @@ trait DatasetExtension
'relation' => 'contributors', 'relation' => 'contributors',
'fetch' => 'eager' 'fetch' => 'eager'
), ),
'Subject' => array(
'model' => Subject::class,
'relation' => 'subjects',
'fetch' => 'eager'
),
'File' => array( 'File' => array(
'model' => File::class, 'model' => File::class,
'relation' => 'files', 'relation' => 'files',

View File

@ -186,7 +186,8 @@ class XmlModel
$cache = XmlCache::where('document_id', $dataset->id)->first(); $cache = XmlCache::where('document_id', $dataset->id)->first();
return $cache->getDomDocument(); return $cache->getDomDocument();
} catch (Exception $e) { } catch (Exception $e) {
Log::warning(__METHOD__ . " Access to XML cache failed on " . get_class($dataset) . '#' . $dataset->id . ". Trying to recover."); Log::warning(__METHOD__ . " Access to XML cache failed on " . get_class($dataset) .
'#' . $dataset->id . ". Trying to recover.");
} }
return null; return null;

View File

@ -194,6 +194,11 @@ class Dataset extends Model
return $this->hasMany(\App\Models\DatasetReference::class, 'document_id', 'id'); return $this->hasMany(\App\Models\DatasetReference::class, 'document_id', 'id');
} }
public function subjects()
{
return $this->hasMany(\App\Models\Subject::class, 'document_id', 'id');
}
/** /**
* Get the xml-cache record associated with the dataset. * Get the xml-cache record associated with the dataset.

19
app/Models/Subject.php Normal file
View File

@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\Dataset;
class Subject extends Model
{
protected $table = 'document_subjects';
public $timestamps = false;
protected $fillable = ['value', 'type'];
public function dataset()
{
return $this->belongsTo(Dataset::class, 'document_id', 'id');
}
}

View File

@ -56,14 +56,13 @@ class XmlCache extends Model
} }
/** /**
* Check if a document in a specific xml version is already cached or not. * Check if a dataset in a specific xml version is already cached or not.
* *
* @param mixed $datasetId * @param mixed $datasetId
* @param mixed $xmlVersion
* @param mixed $serverDateModified * @param mixed $serverDateModified
* @return bool Returns true on cached hit else false. * @return bool Returns true on cached hit else false.
*/ */
public function hasValidEntry($datasetId, $serverDateModified) public function hasValidEntry($datasetId, $serverDateModified) : bool
{ {
$select = DB::table('document_xml_cache'); $select = DB::table('document_xml_cache');
$select->where('document_id', '=', $datasetId) $select->where('document_id', '=', $datasetId)

304
composer.lock generated
View File

@ -8,26 +8,26 @@
"packages": [ "packages": [
{ {
"name": "davejamesmiller/laravel-breadcrumbs", "name": "davejamesmiller/laravel-breadcrumbs",
"version": "5.2.0", "version": "5.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/davejamesmiller/laravel-breadcrumbs.git", "url": "https://github.com/davejamesmiller/laravel-breadcrumbs.git",
"reference": "e2ed8b0992231ebc61480c63f095a2cf3b8829a1" "reference": "6465e8710341578092fdd8aea24319d4f53ab27c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/davejamesmiller/laravel-breadcrumbs/zipball/e2ed8b0992231ebc61480c63f095a2cf3b8829a1", "url": "https://api.github.com/repos/davejamesmiller/laravel-breadcrumbs/zipball/6465e8710341578092fdd8aea24319d4f53ab27c",
"reference": "e2ed8b0992231ebc61480c63f095a2cf3b8829a1", "reference": "6465e8710341578092fdd8aea24319d4f53ab27c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"illuminate/support": "5.6.*|5.7.*", "illuminate/support": "5.6.*|5.7.*|5.8.*",
"illuminate/view": "5.6.*|5.7.*", "illuminate/view": "5.6.*|5.7.*|5.8.*",
"php": ">=7.1.3" "php": ">=7.1.3"
}, },
"require-dev": { "require-dev": {
"laravel/framework": "5.6.*|5.7.*", "laravel/framework": "5.6.*|5.7.*|5.8.*",
"orchestra/testbench": "3.6.*|3.7.*", "orchestra/testbench": "3.6.*|3.7.*|3.8.*",
"php-coveralls/php-coveralls": "^1.0", "php-coveralls/php-coveralls": "^1.0",
"phpunit/phpunit": "7.*" "phpunit/phpunit": "7.*"
}, },
@ -62,29 +62,28 @@
"keywords": [ "keywords": [
"laravel" "laravel"
], ],
"time": "2018-10-30T22:06:33+00:00" "time": "2019-02-27T13:09:37+00:00"
}, },
{ {
"name": "dimsav/laravel-translatable", "name": "dimsav/laravel-translatable",
"version": "v9.3.0", "version": "v9.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/dimsav/laravel-translatable.git", "url": "https://github.com/dimsav/laravel-translatable.git",
"reference": "36c729fd40d070c2fda89b47bcfca731c703505f" "reference": "5101036717e8201389382c77ebfdeafbe073ef06"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/dimsav/laravel-translatable/zipball/36c729fd40d070c2fda89b47bcfca731c703505f", "url": "https://api.github.com/repos/dimsav/laravel-translatable/zipball/5101036717e8201389382c77ebfdeafbe073ef06",
"reference": "36c729fd40d070c2fda89b47bcfca731c703505f", "reference": "5101036717e8201389382c77ebfdeafbe073ef06",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"illuminate/support": "5.6.*|5.7.*", "illuminate/support": "5.6.*|5.7.*|5.8.*",
"php": ">=7.1.3" "php": ">=7.1.3"
}, },
"require-dev": { "require-dev": {
"orchestra/testbench": "3.6.*|3.7.*", "orchestra/testbench": "3.6.*|3.7.*|3.8.*"
"phpunit/phpunit": "~7.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -107,7 +106,14 @@
{ {
"name": "Dimitrios Savvopoulos", "name": "Dimitrios Savvopoulos",
"email": "ds@dimsav.com", "email": "ds@dimsav.com",
"homepage": "http://dimsav.com" "homepage": "http://dimsav.com",
"role": "Developer"
},
{
"name": "Tom Witkowski",
"email": "dev.gummibeer@gmail.com",
"homepage": "https://gummibeer.de",
"role": "Developer"
} }
], ],
"description": "A Laravel package for multilingual models", "description": "A Laravel package for multilingual models",
@ -117,7 +123,7 @@
"laravel", "laravel",
"translation" "translation"
], ],
"time": "2019-02-03T13:22:06+00:00" "time": "2019-02-28T08:12:22+00:00"
}, },
{ {
"name": "dnoegel/php-xdg-base-dir", "name": "dnoegel/php-xdg-base-dir",
@ -381,16 +387,16 @@
}, },
{ {
"name": "erusev/parsedown", "name": "erusev/parsedown",
"version": "1.7.1", "version": "v1.7.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/erusev/parsedown.git", "url": "https://github.com/erusev/parsedown.git",
"reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1" "reference": "d60bcdc46978357759ecb13cb4b078da783f8faf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", "url": "https://api.github.com/repos/erusev/parsedown/zipball/d60bcdc46978357759ecb13cb4b078da783f8faf",
"reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", "reference": "d60bcdc46978357759ecb13cb4b078da783f8faf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -423,7 +429,7 @@
"markdown", "markdown",
"parser" "parser"
], ],
"time": "2018-03-08T01:11:30+00:00" "time": "2019-03-17T17:19:46+00:00"
}, },
{ {
"name": "felixkiss/uniquewith-validator", "name": "felixkiss/uniquewith-validator",
@ -1039,25 +1045,25 @@
}, },
{ {
"name": "mcamara/laravel-localization", "name": "mcamara/laravel-localization",
"version": "1.3.16", "version": "1.3.19",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/mcamara/laravel-localization.git", "url": "https://github.com/mcamara/laravel-localization.git",
"reference": "e82a6c9d809b82afb7ae226f18ac3cb077a18754" "reference": "cf89d2515d576292e65bfa5893a0efd1cc5a4064"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/e82a6c9d809b82afb7ae226f18ac3cb077a18754", "url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/cf89d2515d576292e65bfa5893a0efd1cc5a4064",
"reference": "e82a6c9d809b82afb7ae226f18ac3cb077a18754", "reference": "cf89d2515d576292e65bfa5893a0efd1cc5a4064",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"laravel/framework": "~5.2.0||~5.3.0||~5.4.0||~5.5.0||~5.6.0||~5.7.0", "laravel/framework": "~5.2.0||~5.3.0||~5.4.0||~5.5.0||~5.6.0||~5.7.0||~5.8.0",
"php": ">=7.0.0" "php": ">=7.0.0"
}, },
"require-dev": { "require-dev": {
"orchestra/testbench-browser-kit": "~3.4", "orchestra/testbench-browser-kit": "~3.4|~3.8",
"phpunit/phpunit": "6.0.*" "phpunit/phpunit": "6.0.*|8.0.*"
}, },
"suggest": { "suggest": {
"ext-intl": "*" "ext-intl": "*"
@ -1097,7 +1103,7 @@
"localization", "localization",
"php" "php"
], ],
"time": "2018-10-30T06:33:55+00:00" "time": "2019-03-05T15:37:01+00:00"
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
@ -1686,25 +1692,28 @@
}, },
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
"version": "v6.1.3", "version": "v6.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git", "url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4" "reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8ddcb66ac10c392d3beb54829eef8ac1438595f4", "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707",
"reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4", "reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"egulias/email-validator": "~2.0", "egulias/email-validator": "~2.0",
"php": ">=7.0.0" "php": ">=7.0.0",
"symfony/polyfill-iconv": "^1.0",
"symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "~0.9.1", "mockery/mockery": "~0.9.1",
"symfony/phpunit-bridge": "~3.3@dev" "symfony/phpunit-bridge": "^3.4.19|^4.1.8"
}, },
"suggest": { "suggest": {
"ext-intl": "Needed to support internationalized email addresses", "ext-intl": "Needed to support internationalized email addresses",
@ -1713,7 +1722,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "6.1-dev" "dev-master": "6.2-dev"
} }
}, },
"autoload": { "autoload": {
@ -1741,20 +1750,20 @@
"mail", "mail",
"mailer" "mailer"
], ],
"time": "2018-09-11T07:12:52+00:00" "time": "2019-03-10T07:52:41+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v4.2.3", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4" "reference": "9dc2299a016497f9ee620be94524e6c0af0280a9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4", "url": "https://api.github.com/repos/symfony/console/zipball/9dc2299a016497f9ee620be94524e6c0af0280a9",
"reference": "1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4", "reference": "9dc2299a016497f9ee620be94524e6c0af0280a9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1813,7 +1822,7 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2019-01-25T14:35:16+00:00" "time": "2019-02-23T15:17:42+00:00"
}, },
{ {
"name": "symfony/contracts", "name": "symfony/contracts",
@ -1885,7 +1894,7 @@
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v4.2.3", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
@ -1938,16 +1947,16 @@
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
"version": "v4.2.3", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/debug.git", "url": "https://github.com/symfony/debug.git",
"reference": "cf9b2e33f757deb884ce474e06d2647c1c769b65" "reference": "de73f48977b8eaf7ce22814d66e43a1662cc864f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/cf9b2e33f757deb884ce474e06d2647c1c769b65", "url": "https://api.github.com/repos/symfony/debug/zipball/de73f48977b8eaf7ce22814d66e43a1662cc864f",
"reference": "cf9b2e33f757deb884ce474e06d2647c1c769b65", "reference": "de73f48977b8eaf7ce22814d66e43a1662cc864f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1990,20 +1999,20 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2019-01-25T14:35:16+00:00" "time": "2019-03-03T18:11:24+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v3.4.22", "version": "v3.4.23",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "ed5be1663fa66623b3a7004d5d51a14c4045399b" "reference": "ec625e2fff7f584eeb91754821807317b2e79236"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ed5be1663fa66623b3a7004d5d51a14c4045399b", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ec625e2fff7f584eeb91754821807317b2e79236",
"reference": "ed5be1663fa66623b3a7004d5d51a14c4045399b", "reference": "ec625e2fff7f584eeb91754821807317b2e79236",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2053,20 +2062,20 @@
], ],
"description": "Symfony EventDispatcher Component", "description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2019-01-16T13:27:11+00:00" "time": "2019-02-23T15:06:07+00:00"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v4.2.3", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c" "reference": "267b7002c1b70ea80db0833c3afe05f0fbde580a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/ef71816cbb264988bb57fe6a73f610888b9aa70c", "url": "https://api.github.com/repos/symfony/finder/zipball/267b7002c1b70ea80db0833c3afe05f0fbde580a",
"reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c", "reference": "267b7002c1b70ea80db0833c3afe05f0fbde580a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2102,20 +2111,20 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2019-01-16T20:35:37+00:00" "time": "2019-02-23T15:42:05+00:00"
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v4.2.3", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "8d2318b73e0a1bc75baa699d00ebe2ae8b595a39" "reference": "850a667d6254ccf6c61d853407b16f21c4579c77"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/8d2318b73e0a1bc75baa699d00ebe2ae8b595a39", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/850a667d6254ccf6c61d853407b16f21c4579c77",
"reference": "8d2318b73e0a1bc75baa699d00ebe2ae8b595a39", "reference": "850a667d6254ccf6c61d853407b16f21c4579c77",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2156,7 +2165,7 @@
], ],
"description": "Symfony HttpFoundation Component", "description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2019-01-29T09:49:29+00:00" "time": "2019-02-26T08:03:39+00:00"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
@ -2303,6 +2312,127 @@
], ],
"time": "2018-08-06T14:22:27+00:00" "time": "2018-08-06T14:22:27+00:00"
}, },
{
"name": "symfony/polyfill-iconv",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git",
"reference": "97001cfc283484c9691769f51cdf25259037eba2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/97001cfc283484c9691769f51cdf25259037eba2",
"reference": "97001cfc283484c9691769f51cdf25259037eba2",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-iconv": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Iconv\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Iconv extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"iconv",
"polyfill",
"portable",
"shim"
],
"time": "2018-09-21T06:26:08+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "89de1d44f2c059b266f22c9cc9124ddc4cd0987a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/89de1d44f2c059b266f22c9cc9124ddc4cd0987a",
"reference": "89de1d44f2c059b266f22c9cc9124ddc4cd0987a",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php72": "^1.9"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Idn\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
},
{
"name": "Laurent Bassin",
"email": "laurent@bassin.info"
}
],
"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"idn",
"intl",
"polyfill",
"portable",
"shim"
],
"time": "2018-09-30T16:36:12+00:00"
},
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.10.0", "version": "v1.10.0",
@ -2419,7 +2549,7 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v4.2.3", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
@ -2468,16 +2598,16 @@
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v4.2.3", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/routing.git", "url": "https://github.com/symfony/routing.git",
"reference": "7f8e44fc498972466f0841c3e48dc555f23bdf53" "reference": "ff03eae644e6b1e26d4a04b2385fe3a1a7f04e42"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/7f8e44fc498972466f0841c3e48dc555f23bdf53", "url": "https://api.github.com/repos/symfony/routing/zipball/ff03eae644e6b1e26d4a04b2385fe3a1a7f04e42",
"reference": "7f8e44fc498972466f0841c3e48dc555f23bdf53", "reference": "ff03eae644e6b1e26d4a04b2385fe3a1a7f04e42",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2541,20 +2671,20 @@
"uri", "uri",
"url" "url"
], ],
"time": "2019-01-29T09:49:29+00:00" "time": "2019-02-23T15:17:42+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v4.2.3", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "23fd7aac70d99a17a8e6473a41fec8fab3331050" "reference": "748464177a77011f8f4cdd076773862ce4915f8f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/23fd7aac70d99a17a8e6473a41fec8fab3331050", "url": "https://api.github.com/repos/symfony/translation/zipball/748464177a77011f8f4cdd076773862ce4915f8f",
"reference": "23fd7aac70d99a17a8e6473a41fec8fab3331050", "reference": "748464177a77011f8f4cdd076773862ce4915f8f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2614,20 +2744,20 @@
], ],
"description": "Symfony Translation Component", "description": "Symfony Translation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2019-01-27T23:11:39+00:00" "time": "2019-02-27T03:31:50+00:00"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v4.2.3", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "223bda89f9be41cf7033eeaf11bc61a280489c17" "reference": "9f87189ac10b42edf7fb8edc846f1937c6d157cf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/223bda89f9be41cf7033eeaf11bc61a280489c17", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9f87189ac10b42edf7fb8edc846f1937c6d157cf",
"reference": "223bda89f9be41cf7033eeaf11bc61a280489c17", "reference": "9f87189ac10b42edf7fb8edc846f1937c6d157cf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2690,7 +2820,7 @@
"debug", "debug",
"dump" "dump"
], ],
"time": "2019-01-30T11:44:30+00:00" "time": "2019-02-23T15:17:42+00:00"
}, },
{ {
"name": "tijsverkoyen/css-to-inline-styles", "name": "tijsverkoyen/css-to-inline-styles",
@ -3664,16 +3794,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "7.5.6", "version": "7.5.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9" "reference": "eb343b86753d26de07ecba7868fa983104361948"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/eb343b86753d26de07ecba7868fa983104361948",
"reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9", "reference": "eb343b86753d26de07ecba7868fa983104361948",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3691,7 +3821,7 @@
"phpunit/php-code-coverage": "^6.0.7", "phpunit/php-code-coverage": "^6.0.7",
"phpunit/php-file-iterator": "^2.0.1", "phpunit/php-file-iterator": "^2.0.1",
"phpunit/php-text-template": "^1.2.1", "phpunit/php-text-template": "^1.2.1",
"phpunit/php-timer": "^2.0", "phpunit/php-timer": "^2.1",
"sebastian/comparator": "^3.0", "sebastian/comparator": "^3.0",
"sebastian/diff": "^3.0", "sebastian/diff": "^3.0",
"sebastian/environment": "^4.0", "sebastian/environment": "^4.0",
@ -3744,7 +3874,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2019-02-18T09:24:50+00:00" "time": "2019-03-16T07:31:17+00:00"
}, },
{ {
"name": "sebastian/code-unit-reverse-lookup", "name": "sebastian/code-unit-reverse-lookup",

File diff suppressed because one or more lines are too long

View File

@ -306,6 +306,8 @@
<xsl:apply-templates select="TitleMain" mode="oai_dc" /> <xsl:apply-templates select="TitleMain" mode="oai_dc" />
<!-- dc:description --> <!-- dc:description -->
<xsl:apply-templates select="TitleAbstract" mode="oai_dc" /> <xsl:apply-templates select="TitleAbstract" mode="oai_dc" />
<!-- dc:subject -->
<xsl:apply-templates select="Subject" mode="oai_dc" />
<!--<dc:creator>--> <!--<dc:creator>-->
<!-- Creator: Autor (falls vorhanden), sonst Herausgeber (falls vorhanden), sonst Urhebende Koerperschaft --> <!-- Creator: Autor (falls vorhanden), sonst Herausgeber (falls vorhanden), sonst Urhebende Koerperschaft -->
<xsl:choose> <xsl:choose>
@ -368,6 +370,17 @@
</dc:description> </dc:description>
</xsl:template> </xsl:template>
<xsl:template match="Subject" mode="oai_dc">
<dc:subject>
<xsl:if test="@language != ''">
<xsl:attribute name="xml:lang">
<xsl:value-of select="php:functionString('Oai_Model_Language::getLanguageCode', @Language, 'part1')" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="@Value" />
</dc:subject>
</xsl:template>
<!-- <xsl:template match="PersonAuthor|PersonEditor" mode="oai_dc"> <!-- <xsl:template match="PersonAuthor|PersonEditor" mode="oai_dc">
<dc:creator> <dc:creator>
<xsl:value-of select="@LastName" /> <xsl:value-of select="@LastName" />

View File

@ -31,6 +31,7 @@ function initialState() {
checkedAuthors: [], checkedAuthors: [],
checkedLicenses: [], // [], checkedLicenses: [], // [],
files: [], files: [],
keywords: [],
references: [], references: [],
titles: [], titles: [],
descriptions: [], descriptions: [],

View File

@ -217,6 +217,12 @@ const app = new Vue({
formData.append('references[' + i + '][relation]', reference.relation); formData.append('references[' + i + '][relation]', reference.relation);
} }
for (var i = 0; i < this.dataset.keywords.length; i++) {
let keyword = this.dataset.keywords[i];
formData.append('keywords[' + i + '][value]', keyword.value);
formData.append('keywords[' + i + '][type]', keyword.type);
}
for (var i = 0; i < this.dataset.titles.length; i++) { for (var i = 0; i < this.dataset.titles.length; i++) {
let title = this.dataset.titles[i]; let title = this.dataset.titles[i];
formData.append('titles[' + i + '][value]', title.value); formData.append('titles[' + i + '][value]', title.value);
@ -300,6 +306,20 @@ const app = new Vue({
*/ */
removeReference(key) { removeReference(key) {
this.dataset.references.splice(key, 1); this.dataset.references.splice(key, 1);
},
/*
adds a new Keyword
*/
addKeyword() {
let newKeyword = { value: '', type: '' };
//this.dataset.files.push(uploadedFiles[i]);
this.dataset.keywords.push(newKeyword);
},
/*
Removes a selected keyword
*/
removeKeyword(key) {
this.dataset.keywords.splice(key, 1);
}, },
addTitle() { addTitle() {
let newTitle = { value: '', language: '', type: '' }; let newTitle = { value: '', language: '', type: '' };

View File

@ -306,7 +306,7 @@
</fieldset> </fieldset>
<fieldset id="fieldset-references"> <fieldset id="fieldset-references">
<legend>Dataset references</legend> <legend>Dataset References</legend>
<button class="pure-button button-small" @click.prevent="addReference()">Add Reference</button> <button class="pure-button button-small" @click.prevent="addReference()">Add Reference</button>
<table class="table table-hover" v-if="dataset.references.length"> <table class="table table-hover" v-if="dataset.references.length">
<thead> <thead>
@ -342,6 +342,35 @@
</table> </table>
</fieldset> </fieldset>
<fieldset id="fieldset-keywords">
<legend>Dataset Keywords</legend>
<button class="pure-button button-small" @click.prevent="addKeyword()">Add Keyword</button>
<table class="table table-hover" v-if="dataset.keywords.length">
<thead>
<tr>
<th style="width: 20px;">Keyword</th>
<th>Type</th>
<th style="width: 130px;"></th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in dataset.keywords">
<td>
<input name="Keyword Value" class="form-control" placeholder="[KEYWORD VALUE]" v-model="item.value" v-validate="'required'"
data-vv-scope="step-2" />
</td>
<td>
{!! Form::select('Keyword[Type]', $keywordTypes, null, ['placeholder' => '[keyword type]', 'v-model' =>
'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
</td>
<td>
<button class="pure-button button-small is-warning" @click.prevent="removeKeyword(index)">Remove</button>
</td>
</tr>
</tbody>
</table>
</fieldset>
<br /> <br />
<div class="pure-controls"> <div class="pure-controls">
<button @click.prevent="prev()" class="pure-button button-small"> <button @click.prevent="prev()" class="pure-button button-small">