- add additional migration files
- add seeder for collections - coverage x_min, x_max, y_min, y_max - SitelinkController db-independent
This commit is contained in:
parent
4d22498e2d
commit
c082b4bc60
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers\Frontend;
|
||||||
use App\Models\Dataset;
|
use App\Models\Dataset;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use DateTime;
|
||||||
|
|
||||||
class SitelinkController extends Controller
|
class SitelinkController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -15,13 +16,20 @@ class SitelinkController extends Controller
|
||||||
$select = DB::table('documents')
|
$select = DB::table('documents')
|
||||||
->where('server_state', 'LIKE', "%" . $serverState . "%");
|
->where('server_state', 'LIKE', "%" . $serverState . "%");
|
||||||
|
|
||||||
$select
|
// $select
|
||||||
// ->select(DB::raw('EXTRACT(YEAR FROM server_date_published) as published_date'))
|
// ->select(DB::raw('EXTRACT(YEAR FROM server_date_published) as published_date'))
|
||||||
// ->select(DB::raw("DATE_PART('year', server_date_published) as published_date"))
|
// // ->select(DB::raw("DATE_PART('year', server_date_published) as published_date"))
|
||||||
->select(DB::raw("YEAR(server_date_published) AS published_date"))
|
// // ->select(DB::raw("YEAR(server_date_published) AS published_date"))
|
||||||
->distinct(true);
|
// ->distinct(true);
|
||||||
|
|
||||||
$this->years = $select->pluck('published_date');
|
$years = $select->pluck('server_date_published')->toArray();
|
||||||
|
$this->years = array_map(function ($pdate) {
|
||||||
|
$dateValue = strtotime($pdate);
|
||||||
|
if ($dateValue != false) {
|
||||||
|
$year = date("Y", $dateValue);
|
||||||
|
return $year;
|
||||||
|
}
|
||||||
|
}, $years);
|
||||||
$this->ids = array();
|
$this->ids = array();
|
||||||
return view('frontend.sitelink.index')->with(['years' => $this->years, 'documents' => $this->ids]);
|
return view('frontend.sitelink.index')->with(['years' => $this->years, 'documents' => $this->ids]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ class IndexController extends Controller
|
||||||
|
|
||||||
$keywordTypes = ['uncontrolled' => 'uncontrolled'];
|
$keywordTypes = ['uncontrolled' => 'uncontrolled'];
|
||||||
|
|
||||||
$descriptionTypes = [ 'methods' => 'methods', 'series_information' => 'series_information', 'technical_info' => 'technical_info', 'translated' => 'translated', 'other' => 'other'];
|
$descriptionTypes = ['methods' => 'methods', 'series_information' => 'series_information', 'technical_info' => 'technical_info', 'translated' => 'translated', 'other' => 'other'];
|
||||||
|
|
||||||
$page = Page::query()->where('page_slug', 'terms-and-conditions')->firstOrFail();
|
$page = Page::query()->where('page_slug', 'terms-and-conditions')->firstOrFail();
|
||||||
|
|
||||||
|
@ -250,19 +250,19 @@ class IndexController extends Controller
|
||||||
'title_main.language' => 'required',
|
'title_main.language' => 'required',
|
||||||
'abstract_main.value' => 'required|min:4',
|
'abstract_main.value' => 'required|min:4',
|
||||||
'abstract_main.language' => 'required',
|
'abstract_main.language' => 'required',
|
||||||
'coverage.xmin' => [
|
'coverage.x_min' => [
|
||||||
'nullable',
|
'nullable',
|
||||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
||||||
],
|
],
|
||||||
'coverage.ymin' => [
|
'coverage.y_min' => [
|
||||||
'nullable',
|
'nullable',
|
||||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
||||||
],
|
],
|
||||||
'coverage.xmax' => [
|
'coverage.x_max' => [
|
||||||
'nullable',
|
'nullable',
|
||||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
||||||
],
|
],
|
||||||
'coverage.ymax' => [
|
'coverage.y_max' => [
|
||||||
'nullable',
|
'nullable',
|
||||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
||||||
],
|
],
|
||||||
|
|
|
@ -82,7 +82,7 @@ class PersonController extends Controller
|
||||||
'email' => 'required|email|unique:persons,email,' . $id,
|
'email' => 'required|email|unique:persons,email,' . $id,
|
||||||
'identifier_orcid' => 'nullable|min:19|max:50',
|
'identifier_orcid' => 'nullable|min:19|max:50',
|
||||||
'status' => 'required|boolean',
|
'status' => 'required|boolean',
|
||||||
'date_of_birth' => 'required|date'
|
'date_of_birth' => 'nullable|date'
|
||||||
]);
|
]);
|
||||||
$person = Person::findOrFail($id);
|
$person = Person::findOrFail($id);
|
||||||
$input = $request->all();
|
$input = $request->all();
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace App\Http\Requests;
|
|
||||||
|
|
||||||
use App\Http\Requests\Request;
|
|
||||||
|
|
||||||
class BookRequest extends Request
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine if the user is authorized to make this request.
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function authorize()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the validation rules that apply to the request.
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function rules()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'title' => 'required|min:5',
|
|
||||||
'author' => 'required|min:4',
|
|
||||||
'stock' => 'required|integer',
|
|
||||||
'year' => 'required|integer|min:4'
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -34,7 +34,7 @@ class CreatePersonRequest extends Request
|
||||||
// ],
|
// ],
|
||||||
'identifier_orcid' => 'nullable|min:19|max:50',
|
'identifier_orcid' => 'nullable|min:19|max:50',
|
||||||
'status' => 'required|boolean',
|
'status' => 'required|boolean',
|
||||||
'date_of_birth' => 'required|date'
|
'date_of_birth' => 'nullable|date'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ class EditPersonRequest extends Request
|
||||||
// ],
|
// ],
|
||||||
'identifier_orcid' => 'nullable|min:19|max:50',
|
'identifier_orcid' => 'nullable|min:19|max:50',
|
||||||
'status' => 'required|boolean',
|
'status' => 'required|boolean',
|
||||||
'date_of_birth' => 'required|date'
|
'date_of_birth' => 'nullable|date'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Coverage extends Model
|
||||||
'time_min',
|
'time_min',
|
||||||
'time_max',
|
'time_max',
|
||||||
'time_absolut',
|
'time_absolut',
|
||||||
'xmin', 'xmax', 'ymin', 'ymax'
|
'x_min', 'x_max', 'y_min', 'y_max'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function dataset()
|
public function dataset()
|
||||||
|
|
10
composer.lock
generated
10
composer.lock
generated
|
@ -1239,16 +1239,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.2.3",
|
"version": "v4.2.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "e612609022e935f3d0337c1295176505b41188c8"
|
"reference": "97e59c7a16464196a8b9c77c47df68e4a39a45c4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/e612609022e935f3d0337c1295176505b41188c8",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/97e59c7a16464196a8b9c77c47df68e4a39a45c4",
|
||||||
"reference": "e612609022e935f3d0337c1295176505b41188c8",
|
"reference": "97e59c7a16464196a8b9c77c47df68e4a39a45c4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1286,7 +1286,7 @@
|
||||||
"parser",
|
"parser",
|
||||||
"php"
|
"php"
|
||||||
],
|
],
|
||||||
"time": "2019-08-12T20:17:41+00:00"
|
"time": "2019-09-01T07:51:21+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "paragonie/random_compat",
|
"name": "paragonie/random_compat",
|
||||||
|
|
|
@ -17,7 +17,7 @@ class CreateDocumentsTable extends Migration
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('contributing_corporation', 50)->nullable();
|
$table->string('contributing_corporation', 50)->nullable();
|
||||||
$table->string('creating_corporation', 50);
|
$table->string('creating_corporation', 50);
|
||||||
$table->dateTime('embargo_date');
|
$table->dateTime('embargo_date')->nullable();
|
||||||
$table->integer('project_id')->unsigned()->nullable();
|
$table->integer('project_id')->unsigned()->nullable();
|
||||||
$table->foreign('project_id')->references('id')->on('projects');
|
$table->foreign('project_id')->references('id')->on('projects');
|
||||||
$table->enum(
|
$table->enum(
|
||||||
|
|
|
@ -16,11 +16,18 @@ class CreatePersonsTable extends Migration
|
||||||
Schema::create('persons', function (Blueprint $table) {
|
Schema::create('persons', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
|
|
||||||
$table->string('name');
|
$table->string('academic_title', 255)->nullable();
|
||||||
$table->integer('registered_at');
|
$table->string('date_of_birth', 100)->nullable();
|
||||||
$table->boolean('status')->default(1);
|
$table->string('email', 100);
|
||||||
|
$table->string('first_name', 255);
|
||||||
$table->timestamps();
|
$table->string('last_name', 255);
|
||||||
|
$table->string('place_of_birth', 255)->nullable();
|
||||||
|
$table->string('identifier_orcid', 50)->nullable();
|
||||||
|
$table->string('identifier_gnd', 50)->nullable();
|
||||||
|
$table->string('identifier_misc', 50)->nullable();
|
||||||
|
$table->boolean('status')->nullable()->default(1);
|
||||||
|
$table->integer('registered_at')->nullable();
|
||||||
|
$table->string('name_type', 50)->nullable();
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::create('link_documents_persons', function (Blueprint $table) {
|
Schema::create('link_documents_persons', function (Blueprint $table) {
|
||||||
|
|
|
@ -13,10 +13,26 @@ class CreateCollectionsTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
Schema::create('collections_roles', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name', 255);
|
||||||
|
$table->string('oai_name', 255);
|
||||||
|
$table->integer('position');
|
||||||
|
$table->boolean('visible')->default(1);
|
||||||
|
$table->boolean('visible_frontdoor')->default(1);
|
||||||
|
$table->boolean('visible_oai')->default(1);
|
||||||
|
});
|
||||||
|
|
||||||
Schema::create('collections', function (Blueprint $table) {
|
Schema::create('collections', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->integer('role_id')->unsigned()->nullable();
|
||||||
|
$table->foreign('role_id')
|
||||||
|
->references('id')->on('collections_roles')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
$table->string('number', 255)->nullable();
|
$table->string('number', 255)->nullable();
|
||||||
$table->string('name', 255)->nullable();
|
$table->string('name', 255);
|
||||||
$table->string('oai_subset', 255)->nullable();
|
$table->string('oai_subset', 255)->nullable();
|
||||||
$table->integer('parent_id')->unsigned()->nullable();
|
$table->integer('parent_id')->unsigned()->nullable();
|
||||||
$table->foreign('parent_id')
|
$table->foreign('parent_id')
|
||||||
|
@ -24,7 +40,6 @@ class CreateCollectionsTable extends Migration
|
||||||
->onUpdate('cascade')->onDelete('cascade');
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
$table->boolean('visible')->default(1);
|
$table->boolean('visible')->default(1);
|
||||||
$table->boolean('visible_publish')->default(1);
|
$table->boolean('visible_publish')->default(1);
|
||||||
$table->timestamps();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::create('link_documents_collections', function (Blueprint $table) {
|
Schema::create('link_documents_collections', function (Blueprint $table) {
|
||||||
|
@ -54,5 +69,6 @@ class CreateCollectionsTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('link_documents_collections');
|
Schema::dropIfExists('link_documents_collections');
|
||||||
Schema::dropIfExists('collections');
|
Schema::dropIfExists('collections');
|
||||||
|
Schema::dropIfExists('collections_roles');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class CreateDatasetTitlesTable extends Migration
|
class CreateDatasetTitlesTable extends Migration
|
||||||
{
|
{
|
||||||
|
@ -15,12 +15,13 @@ class CreateDatasetTitlesTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::create('dataset_titles', function (Blueprint $table) {
|
Schema::create('dataset_titles', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->integer('document_id')->unsigned();
|
|
||||||
|
|
||||||
|
$table->integer('document_id')->unsigned();
|
||||||
$table->foreign('document_id')->references('id')->on('documents')
|
$table->foreign('document_id')->references('id')->on('documents')
|
||||||
->onUpdate('cascade')->onDelete('cascade');
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
$table->text('value');
|
$table->enum('type', ['sub' => 'sub', 'alternative' => 'alternative', 'translated' => 'translated', 'other' => 'other']);
|
||||||
|
$table->string('value', 255);
|
||||||
$table->string('language', 3);
|
$table->string('language', 3);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class CreateDatasetAbstractsTable extends Migration
|
class CreateDatasetAbstractsTable extends Migration
|
||||||
{
|
{
|
||||||
|
@ -15,12 +15,16 @@ class CreateDatasetAbstractsTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::create('dataset_abstracts', function (Blueprint $table) {
|
Schema::create('dataset_abstracts', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->integer('document_id')->unsigned();
|
|
||||||
|
|
||||||
|
$table->integer('document_id')->unsigned();
|
||||||
$table->foreign('document_id')->references('id')->on('documents')
|
$table->foreign('document_id')->references('id')->on('documents')
|
||||||
->onUpdate('cascade')->onDelete('cascade');
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
$table->text('value');
|
$table->enum(
|
||||||
|
'type',
|
||||||
|
['methods' => 'methods', 'series_information' => 'series_information', 'technical_info' => 'technical_info', 'translated' => 'translated', 'other' => 'other']
|
||||||
|
);
|
||||||
|
$table->string('value', 255);
|
||||||
$table->string('language', 3);
|
$table->string('language', 3);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateDocumentFilesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('document_files', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->integer('document_id')->unsigned();
|
||||||
|
$table->foreign('document_id')->references('id')->on('documents')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->string('path_name', 50);
|
||||||
|
$table->string('label', 50)->nullable();
|
||||||
|
$table->string('comment', 255)->nullable();
|
||||||
|
$table->string('mime_type', 255)->nullable();
|
||||||
|
$table->string('language', 3)->nullable();
|
||||||
|
$table->bigInteger('file_size');
|
||||||
|
$table->boolean('visible_in_frontdoor')->default(1);
|
||||||
|
$table->boolean('visible_in_oai')->default(1);
|
||||||
|
$table->integer('sort_order');
|
||||||
|
$table->nullableTimestamps();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('file_hashvalues', function (Blueprint $table) {
|
||||||
|
$table->integer('file_id')->unsigned();
|
||||||
|
$table->foreign('file_id')->references('id')->on('document_files')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->string('type', 50);
|
||||||
|
$table->string('value');
|
||||||
|
|
||||||
|
$table->primary(['file_id', 'type']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('file_hashvalues');
|
||||||
|
Schema::dropIfExists('document_files');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateCoverageTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('coverage', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->integer('dataset_id')->unsigned();
|
||||||
|
$table->foreign('dataset_id')->references('id')->on('documents')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->smallInteger('elevation_min')->nullable();
|
||||||
|
$table->smallInteger('elevation_max')->nullable();
|
||||||
|
$table->smallInteger('elevation_absolut')->nullable();
|
||||||
|
$table->smallInteger('depth_min')->nullable();
|
||||||
|
$table->smallInteger('depth_max')->nullable();
|
||||||
|
$table->smallInteger('depth_absolut')->nullable();
|
||||||
|
$table->dateTime('time_min')->nullable();
|
||||||
|
$table->dateTime('time_max')->nullable();
|
||||||
|
$table->dateTime('time_absolut')->nullable();
|
||||||
|
$table->float('x_min')->nullable();
|
||||||
|
$table->float('x_max')->nullable();
|
||||||
|
$table->float('y_min')->nullable();
|
||||||
|
$table->float('y_max')->nullable();
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('coverage');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateDocumentSubjectsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('document_subjects', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->integer('document_id')->unsigned();
|
||||||
|
$table->foreign('document_id')->references('id')->on('documents')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->string('language', 3)->nullable();
|
||||||
|
$table->enum(
|
||||||
|
'type',
|
||||||
|
['uncontrolled']
|
||||||
|
);
|
||||||
|
$table->string('value', 255);
|
||||||
|
$table->string('external_key', 255)->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('document_subjects');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateDocumentReferencesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
//Table for identifiers referencing to related datasets.
|
||||||
|
Schema::create('document_references', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->integer('document_id')->unsigned();
|
||||||
|
$table->foreign('document_id')->references('id')->on('documents')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->enum(
|
||||||
|
'type',
|
||||||
|
["DOI", "Handle", "ISBN", "ISSN", "URL", "URN"]
|
||||||
|
);
|
||||||
|
$table->enum(
|
||||||
|
'relation',
|
||||||
|
["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "HasMetadata", "IsMetadataFor","IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf"]
|
||||||
|
);
|
||||||
|
$table->string('value', 255);
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('document_references');
|
||||||
|
}
|
||||||
|
}
|
170
database/seeds/CollectionsTableSeeder.php
Normal file
170
database/seeds/CollectionsTableSeeder.php
Normal file
|
@ -0,0 +1,170 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
|
||||||
|
class CollectionsTableSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
|
||||||
|
DB::table('collections_roles')->insert([
|
||||||
|
[
|
||||||
|
'name' => 'bk',
|
||||||
|
'oai_name' => 'bk',
|
||||||
|
'position' => 1,
|
||||||
|
'visible' => true,
|
||||||
|
'visible_frontdoor' => true,
|
||||||
|
'visible_oai' => true,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'ccs',
|
||||||
|
'oai_name' => 'ccs',
|
||||||
|
'position' => 2,
|
||||||
|
'visible' => true,
|
||||||
|
'visible_frontdoor' => true,
|
||||||
|
'visible_oai' => true,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'ddc',
|
||||||
|
'oai_name' => 'ddc',
|
||||||
|
'position' => 3,
|
||||||
|
'visible' => true,
|
||||||
|
'visible_frontdoor' => true,
|
||||||
|
'visible_oai' => true,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'institutes',
|
||||||
|
'oai_name' => 'institutes',
|
||||||
|
'position' => 4,
|
||||||
|
'visible' => true,
|
||||||
|
'visible_frontdoor' => true,
|
||||||
|
'visible_oai' => true,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'jel',
|
||||||
|
'oai_name' => 'jel',
|
||||||
|
'position' => 5,
|
||||||
|
'visible' => true,
|
||||||
|
'visible_frontdoor' => true,
|
||||||
|
'visible_oai' => true,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'msc',
|
||||||
|
'oai_name' => 'msc',
|
||||||
|
'position' => 6,
|
||||||
|
'visible' => true,
|
||||||
|
'visible_frontdoor' => true,
|
||||||
|
'visible_oai' => true,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'pacs',
|
||||||
|
'oai_name' => 'pacs',
|
||||||
|
'position' => 7,
|
||||||
|
'visible' => true,
|
||||||
|
'visible_frontdoor' => true,
|
||||||
|
'visible_oai' => true,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::table('collections')->insert([
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Informatik, Informationswissenschaft, allgemeine Werke',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Philosophie und Psychologie',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Religion',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Sozialwissenschaften',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Sprache',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Naturwissenschaften und Mathematik',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Technik, Medizin, angewandte Wissenschaften',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Künste und Unterhaltung',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Literatur',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => null,
|
||||||
|
'name' => 'Geschichte und Geografie',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => 3,
|
||||||
|
'name' => 'Informatik, Wissen, Systeme',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => 3,
|
||||||
|
'name' => 'Bibliografien',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => 3,
|
||||||
|
'name' => 'Bibliotheks- und Informationswissenschaften',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => 3,
|
||||||
|
'name' => 'Enzyklopädien, Faktenbücher',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => 3,
|
||||||
|
'name' => 'Zeitschriften, fortlaufende Sammelwerke',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => 3,
|
||||||
|
'name' => 'Verbände, Organisationen, Museen',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => 3,
|
||||||
|
'name' => 'Publizistische Medien, Journalismus, Verlagswesen',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => 3,
|
||||||
|
'name' => 'Allgemeine Sammelwerke, Zitatensammlungen',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'role_id' => 2,
|
||||||
|
'parent_id' => 3,
|
||||||
|
'name' => 'Handschriften, seltene Bücher',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,6 +29,7 @@ class DatabaseSeeder extends Seeder
|
||||||
$this->call('LicencesTableSeeder');
|
$this->call('LicencesTableSeeder');
|
||||||
$this->call('LanguagesTableSeeder');
|
$this->call('LanguagesTableSeeder');
|
||||||
$this->call('PagesTableSeeder');
|
$this->call('PagesTableSeeder');
|
||||||
|
$this->call('CollectionsTableSeeder');
|
||||||
$this->command->info('User table seeded!');
|
$this->command->info('User table seeded!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,6 +181,14 @@ class RolesTableSeeder extends Seeder
|
||||||
'permission_id' => '2', //permission 'page'
|
'permission_id' => '2', //permission 'page'
|
||||||
'role_id' => '1', //administrator role
|
'role_id' => '1', //administrator role
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'permission_id' => '3', //permission 'dataset-list'
|
||||||
|
'role_id' => '1', //administrator role
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'permission_id' => '4', //permission 'dataset-submit'
|
||||||
|
'role_id' => '1', //administrator role
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'permission_id' => '3', //permission 'dataset-list'
|
'permission_id' => '3', //permission 'dataset-list'
|
||||||
'role_id' => '2', //submitter role
|
'role_id' => '2', //submitter role
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -359,10 +359,10 @@
|
||||||
<xsl:template match="Coverage" mode="oai_dc">
|
<xsl:template match="Coverage" mode="oai_dc">
|
||||||
<dc:coverage>
|
<dc:coverage>
|
||||||
<xsl:variable name="geolocation" select="concat(
|
<xsl:variable name="geolocation" select="concat(
|
||||||
'SOUTH-BOUND LATITUDE: ', @Xmin,
|
'SOUTH-BOUND LATITUDE: ', @XMin,
|
||||||
' * WEST-BOUND LONGITUDE: ', @Ymin,
|
' * WEST-BOUND LONGITUDE: ', @YMin,
|
||||||
' * NORTH-BOUND LATITUDE: ', @Xmax,
|
' * NORTH-BOUND LATITUDE: ', @XMax,
|
||||||
' * EAST-BOUND LONGITUDE: ', @Ymax
|
' * EAST-BOUND LONGITUDE: ', @YMax
|
||||||
)" />
|
)" />
|
||||||
<xsl:value-of select="$geolocation" />
|
<xsl:value-of select="$geolocation" />
|
||||||
|
|
||||||
|
|
|
@ -105,16 +105,16 @@
|
||||||
<geoLocation>
|
<geoLocation>
|
||||||
<geoLocationBox>
|
<geoLocationBox>
|
||||||
<westBoundLongitude>
|
<westBoundLongitude>
|
||||||
<xsl:value-of select="@Xmin" />
|
<xsl:value-of select="@XMin" />
|
||||||
</westBoundLongitude>
|
</westBoundLongitude>
|
||||||
<eastBoundLongitude>
|
<eastBoundLongitude>
|
||||||
<xsl:value-of select="@Xmax" />
|
<xsl:value-of select="@XMax" />
|
||||||
</eastBoundLongitude>
|
</eastBoundLongitude>
|
||||||
<southBoundLatitude>
|
<southBoundLatitude>
|
||||||
<xsl:value-of select="@Ymin" />
|
<xsl:value-of select="@YMin" />
|
||||||
</southBoundLatitude>
|
</southBoundLatitude>
|
||||||
<northBoundLatitude>
|
<northBoundLatitude>
|
||||||
<xsl:value-of select="@Ymax" />
|
<xsl:value-of select="@YMax" />
|
||||||
</northBoundLatitude>
|
</northBoundLatitude>
|
||||||
</geoLocationBox>
|
</geoLocationBox>
|
||||||
</geoLocation>
|
</geoLocation>
|
||||||
|
|
|
@ -261,10 +261,10 @@ const app = new Vue({
|
||||||
|
|
||||||
if (this.dataset.coverage.xmin !== "" && this.dataset.coverage.ymin != '' &&
|
if (this.dataset.coverage.xmin !== "" && this.dataset.coverage.ymin != '' &&
|
||||||
this.dataset.coverage.xmax !== '' && this.dataset.coverage.ymax !== '') {
|
this.dataset.coverage.xmax !== '' && this.dataset.coverage.ymax !== '') {
|
||||||
formData.append('coverage[xmin]', this.dataset.coverage.xmin);
|
formData.append('coverage[x_min]', this.dataset.coverage.xmin);
|
||||||
formData.append('coverage[ymin]', this.dataset.coverage.ymin);
|
formData.append('coverage[y_min]', this.dataset.coverage.ymin);
|
||||||
formData.append('coverage[xmax]', this.dataset.coverage.xmax);
|
formData.append('coverage[x_max]', this.dataset.coverage.xmax);
|
||||||
formData.append('coverage[ymax]', this.dataset.coverage.ymax);
|
formData.append('coverage[y_max]', this.dataset.coverage.ymax);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isElevationAbsolut) {
|
if (this.isElevationAbsolut) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user