- add references anf keywords fro edit form
- edit datetime settings from database - edit time, elevation and depth
This commit is contained in:
parent
43d98a1f82
commit
fef6dea98d
|
@ -3,26 +3,26 @@ namespace App\Http\Controllers\Publish;
|
||||||
|
|
||||||
use App\Exceptions\GeneralException;
|
use App\Exceptions\GeneralException;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Requests\DocumentRequest;
|
||||||
use App\Models\Dataset;
|
use App\Models\Dataset;
|
||||||
|
use App\Models\DatasetReference;
|
||||||
|
use App\Models\Description;
|
||||||
|
use App\Models\File;
|
||||||
|
use App\Models\License;
|
||||||
|
// use Illuminate\View\View;
|
||||||
|
use App\Models\Project;
|
||||||
|
// for edit actions:
|
||||||
|
use App\Models\Subject;
|
||||||
|
use App\Models\Title;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use Exception;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
// use Illuminate\View\View;
|
|
||||||
use Illuminate\Support\Facades\View;
|
|
||||||
// for edit actions:
|
|
||||||
use App\Models\Project;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use App\Models\License;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use App\Http\Requests\DocumentRequest;
|
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use App\Models\Title;
|
use Illuminate\Support\Facades\View;
|
||||||
use App\Models\Description;
|
|
||||||
use App\Models\File;
|
|
||||||
use App\Models\Subject;
|
|
||||||
use App\Models\DatasetReference;
|
|
||||||
use Exception;
|
|
||||||
|
|
||||||
class SubmitController extends Controller
|
class SubmitController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -38,8 +38,8 @@ class SubmitController extends Controller
|
||||||
|
|
||||||
$builder = Dataset::query();
|
$builder = Dataset::query();
|
||||||
$myDatasets = $builder
|
$myDatasets = $builder
|
||||||
//->orderBy('server_state')
|
//->orderBy('server_state')
|
||||||
->whereIn('server_state', ['inprogress',
|
->whereIn('server_state', ['inprogress',
|
||||||
'released', 'editor_accepted', 'approved', 'reviewed', 'rejected_editor', 'rejected_reviewer'])
|
'released', 'editor_accepted', 'approved', 'reviewed', 'rejected_editor', 'rejected_reviewer'])
|
||||||
->where('account_id', $user_id)
|
->where('account_id', $user_id)
|
||||||
->with('user:id,login')
|
->with('user:id,login')
|
||||||
|
@ -50,7 +50,7 @@ class SubmitController extends Controller
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the form for editing the specified resource.
|
* Show the form for editing the specified resource.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
|
@ -81,16 +81,14 @@ class SubmitController extends Controller
|
||||||
// $checkeds = $dataset->licenses->pluck('id')->toArray();
|
// $checkeds = $dataset->licenses->pluck('id')->toArray();
|
||||||
$checkeds = $dataset->licenses->first()->id;
|
$checkeds = $dataset->licenses->first()->id;
|
||||||
|
|
||||||
|
|
||||||
$keywordTypes = ['uncontrolled' => 'uncontrolled', 'swd' => 'swd'];
|
$keywordTypes = ['uncontrolled' => 'uncontrolled', 'swd' => 'swd'];
|
||||||
|
|
||||||
$referenceTypes = ["rdr-id", "arXiv", "bibcode", "DOI", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISSN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "URL", "URN"];
|
$referenceTypes = ["rdr-id", "doi", "handle", "isbn", "issn", "url", "urn"];
|
||||||
$referenceTypes = array_combine($referenceTypes, $referenceTypes);
|
$referenceTypes = array_combine($referenceTypes, $referenceTypes);
|
||||||
|
|
||||||
$relationTypes = ["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"];
|
$relationTypes = ["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"];
|
||||||
$relationTypes = array_combine($relationTypes, $relationTypes);
|
$relationTypes = array_combine($relationTypes, $relationTypes);
|
||||||
|
|
||||||
|
|
||||||
return View::make(
|
return View::make(
|
||||||
'workflow.submitter.edit',
|
'workflow.submitter.edit',
|
||||||
compact(
|
compact(
|
||||||
|
@ -107,7 +105,7 @@ class SubmitController extends Controller
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//https://stackoverflow.com/questions/17480200/using-laravel-how-do-i-create-a-view-that-will-update-a-one-to-many-relationshi?rq=1
|
//https://stackoverflow.com/questions/17480200/using-laravel-how-do-i-create-a-view-that-will-update-a-one-to-many-relationshi?rq=1
|
||||||
// https://laravel.io/forum/06-11-2014-how-to-save-eloquent-model-with-relations-in-one-go
|
// https://laravel.io/forum/06-11-2014-how-to-save-eloquent-model-with-relations-in-one-go
|
||||||
/**
|
/**
|
||||||
* Update the specified resource in storage.
|
* Update the specified resource in storage.
|
||||||
|
@ -122,26 +120,26 @@ class SubmitController extends Controller
|
||||||
'type' => 'required|min:5',
|
'type' => 'required|min:5',
|
||||||
'coverage.xmin' => [
|
'coverage.xmin' => [
|
||||||
'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.ymin' => [
|
||||||
'nullable',
|
'nullable',
|
||||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/',
|
||||||
],
|
],
|
||||||
'coverage.xmax' => [
|
'coverage.xmax' => [
|
||||||
'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.ymax' => [
|
||||||
'nullable',
|
'nullable',
|
||||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/',
|
||||||
],
|
],
|
||||||
'keywords.*.value' => 'required|string',
|
'keywords.*.value' => 'required|string',
|
||||||
'keywords.*.type' => 'required|string',
|
'keywords.*.type' => 'required|string',
|
||||||
'files.*.label' => 'required|string',
|
'files.*.label' => 'required|string',
|
||||||
];
|
];
|
||||||
$customMessages = [
|
$customMessages = [
|
||||||
'keywords.*.type.required' => 'The types of all keywords are required.'
|
'keywords.*.type.required' => 'The types of all keywords are required.',
|
||||||
];
|
];
|
||||||
$validator = Validator::make($request->all(), $rules, $customMessages);
|
$validator = Validator::make($request->all(), $rules, $customMessages);
|
||||||
if (!$validator->fails()) {
|
if (!$validator->fails()) {
|
||||||
|
@ -183,13 +181,20 @@ class SubmitController extends Controller
|
||||||
$references = $request->input('references');
|
$references = $request->input('references');
|
||||||
if (is_array($references) && count($references) > 0) {
|
if (is_array($references) && count($references) > 0) {
|
||||||
foreach ($references as $key => $formReference) {
|
foreach ($references as $key => $formReference) {
|
||||||
$reference = DatasetReference::findOrFail($key);
|
if (isset($key) && $key != 'undefined') {
|
||||||
$reference->value = $formReference['value'];
|
$reference = DatasetReference::findOrFail($key);
|
||||||
$reference->label = $formReference['label'];
|
$reference->value = $formReference['value'];
|
||||||
$reference->type = $formReference['type'];
|
$reference->label = $formReference['label'];
|
||||||
$reference->relation = $formReference['relation'];
|
$reference->type = $formReference['type'];
|
||||||
if ($reference->isDirty()) {
|
$reference->relation = $formReference['relation'];
|
||||||
$reference->save();
|
if ($reference->isDirty()) {
|
||||||
|
$reference->save();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$reference = new DatasetReference($formReference);
|
||||||
|
// $title->status = true;
|
||||||
|
// $title->name_type = "Organizational";
|
||||||
|
$dataset->references()->save($reference);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,11 +203,18 @@ class SubmitController extends Controller
|
||||||
$keywords = $request->input('subjects');
|
$keywords = $request->input('subjects');
|
||||||
if (is_array($keywords) && count($keywords) > 0) {
|
if (is_array($keywords) && count($keywords) > 0) {
|
||||||
foreach ($keywords as $key => $formKeyword) {
|
foreach ($keywords as $key => $formKeyword) {
|
||||||
$subject = Subject::findOrFail($key);
|
if (isset($key) && $key != 'undefined') {
|
||||||
$subject->value = $formKeyword['value'];
|
$subject = Subject::findOrFail($key);
|
||||||
$subject->type = $formKeyword['type'];
|
$subject->value = $formKeyword['value'];
|
||||||
if ($subject->isDirty()) {
|
$subject->type = $formKeyword['type'];
|
||||||
$subject->save();
|
if ($subject->isDirty()) {
|
||||||
|
$subject->save();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$subject = new Subject($formKeyword);
|
||||||
|
// $title->status = true;
|
||||||
|
// $title->name_type = "Organizational";
|
||||||
|
$dataset->subjects()->save($subject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -227,7 +239,7 @@ class SubmitController extends Controller
|
||||||
$formCoverage
|
$formCoverage
|
||||||
);
|
);
|
||||||
} elseif (isset($data['coverage']) && $this->containsOnlyNull($data['coverage'])
|
} elseif (isset($data['coverage']) && $this->containsOnlyNull($data['coverage'])
|
||||||
&& !is_null($dataset->coverage)) {
|
&& !is_null($dataset->coverage)) {
|
||||||
$dataset->coverage()->delete();
|
$dataset->coverage()->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,8 +263,8 @@ class SubmitController extends Controller
|
||||||
// 'success' => false,
|
// 'success' => false,
|
||||||
// 'errors' => $validator->errors()->all(),
|
// 'errors' => $validator->errors()->all(),
|
||||||
// ], 422);
|
// ], 422);
|
||||||
return back()->withInput()
|
return back()->withInput()
|
||||||
->withErrors($validator->errors()->all());
|
->withErrors($validator->errors()->all());
|
||||||
}
|
}
|
||||||
throw new GeneralException(trans('exceptions.backend.dataset.update_error'));
|
throw new GeneralException(trans('exceptions.backend.dataset.update_error'));
|
||||||
}
|
}
|
||||||
|
@ -264,7 +276,6 @@ class SubmitController extends Controller
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the specified resource.
|
* Display the specified resource.
|
||||||
*
|
*
|
||||||
|
@ -290,8 +301,8 @@ class SubmitController extends Controller
|
||||||
{
|
{
|
||||||
$dataset = Dataset::findOrFail($id);
|
$dataset = Dataset::findOrFail($id);
|
||||||
if ($dataset->files->count() == 0) {
|
if ($dataset->files->count() == 0) {
|
||||||
return back()
|
return back()
|
||||||
->withErrors(['datasets_count' => ['At least one dataset is required.']]);
|
->withErrors(['datasets_count' => ['At least one dataset is required.']]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$input = $request->all();
|
$input = $request->all();
|
||||||
|
@ -318,7 +329,7 @@ class SubmitController extends Controller
|
||||||
throw new GeneralException(trans('exceptions.publish.release.update_error'));
|
throw new GeneralException(trans('exceptions.publish.release.update_error'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the specified resource.
|
* Display the specified resource.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
|
@ -329,7 +340,7 @@ class SubmitController extends Controller
|
||||||
$dataset = Dataset::with('user:id,login')->findOrFail($id);
|
$dataset = Dataset::with('user:id,login')->findOrFail($id);
|
||||||
|
|
||||||
return View::make('workflow.submitter.delete', [
|
return View::make('workflow.submitter.delete', [
|
||||||
'dataset' => $dataset
|
'dataset' => $dataset,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1047
composer.lock
generated
1047
composer.lock
generated
File diff suppressed because it is too large
Load Diff
2
public/backend/ckeditor.js
vendored
2
public/backend/ckeditor.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,14 +1,14 @@
|
||||||
import { Component, Vue, Watch } from 'vue-property-decorator';
|
import { Component, Vue, Watch } from 'vue-property-decorator';
|
||||||
import axios from 'axios';
|
import datetime from 'vuejs-datetimepicker';
|
||||||
import VeeValidate from 'vee-validate';
|
import VeeValidate from 'vee-validate';
|
||||||
Vue.use(VeeValidate);
|
Vue.use(VeeValidate);
|
||||||
import LocationsMap from './components/locations-map.vue';
|
import LocationsMap from './components/locations-map.vue';
|
||||||
import Dataset from './components/Dataset';
|
import Dataset from './components/Dataset';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: {
|
components: {
|
||||||
LocationsMap
|
LocationsMap,
|
||||||
|
datetime
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
export default class EditDataset extends Vue {
|
export default class EditDataset extends Vue {
|
||||||
|
@ -53,6 +53,9 @@ export default class EditDataset extends Vue {
|
||||||
// };
|
// };
|
||||||
allErros = [];
|
allErros = [];
|
||||||
success = false;
|
success = false;
|
||||||
|
elevation = "no_elevation";
|
||||||
|
depth = "no_depth";
|
||||||
|
time = "no_time";
|
||||||
|
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
// this.form = window.Laravel.form;
|
// this.form = window.Laravel.form;
|
||||||
|
@ -60,6 +63,12 @@ export default class EditDataset extends Vue {
|
||||||
this.projects = window.Laravel.projects;
|
this.projects = window.Laravel.projects;
|
||||||
this.licenses = window.Laravel.licenses;
|
this.licenses = window.Laravel.licenses;
|
||||||
this.checkeds = window.Laravel.checkeds;
|
this.checkeds = window.Laravel.checkeds;
|
||||||
|
this.referenceTypes = window.Laravel.referenceTypes;
|
||||||
|
this.relationTypes = window.Laravel.relationTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.setRadioButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -116,6 +125,32 @@ export default class EditDataset extends Vue {
|
||||||
return (typeof item === "object" && !Array.isArray(item) && item !== null);
|
return (typeof item === "object" && !Array.isArray(item) && item !== null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setRadioButtons() {
|
||||||
|
if (this.form.coverage.time_absolut != null) {
|
||||||
|
this.time = "absolut";
|
||||||
|
} else if (this.form.coverage.time_min != null) {
|
||||||
|
this.time = "range";
|
||||||
|
} else {
|
||||||
|
this.time = "no_time";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form.coverage.elevation_absolut != null) {
|
||||||
|
this.elevation = "absolut";
|
||||||
|
} else if (this.form.coverage.elevation_min != null) {
|
||||||
|
this.elevation = "range";
|
||||||
|
} else {
|
||||||
|
this.elevation = "no_elevation";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form.coverage.depth_absolut != null) {
|
||||||
|
this.depth = "absolut";
|
||||||
|
} else if (this.form.coverage.depth_min != null) {
|
||||||
|
this.depth = "range";
|
||||||
|
} else {
|
||||||
|
this.depth = "no_depth";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
// var dataform = new FormData();
|
// var dataform = new FormData();
|
||||||
// dataform.append('name', this.form.name);
|
// dataform.append('name', this.form.name);
|
||||||
|
@ -141,4 +176,45 @@ export default class EditDataset extends Vue {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
adds a new Keyword
|
||||||
|
*/
|
||||||
|
addKeyword() {
|
||||||
|
let newKeyword = { value: '', type: 'uncontrolled', language: this.form.language };
|
||||||
|
//this.dataset.files.push(uploadedFiles[i]);
|
||||||
|
this.form.subjects.push(newKeyword);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Removes a selected keyword
|
||||||
|
*/
|
||||||
|
removeKeyword(key) {
|
||||||
|
this.form.subjects.splice(key, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Handles a change on the file upload
|
||||||
|
*/
|
||||||
|
addReference() {
|
||||||
|
let newReference = { value: '', label: '', relation: '', type: '' };
|
||||||
|
//this.dataset.files.push(uploadedFiles[i]);
|
||||||
|
this.form.references.push(newReference);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Removes a selected reference
|
||||||
|
*/
|
||||||
|
removeReference(key) {
|
||||||
|
this.form.references.splice(key, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Watch('form.coverage.time_absolut')
|
||||||
|
// onTimeAbsolutChanged(val) {
|
||||||
|
// this.time = "absolut";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Watch('form.coverage.time_min')
|
||||||
|
// onTimeMinChanged(val) {
|
||||||
|
// this.time = "range";
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,19 +1,21 @@
|
||||||
<fieldset id="fieldset-State">
|
<fieldset id="fieldset-State">
|
||||||
<legend>State & notes</legend>
|
<legend>State & notes</legend>
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
@if(!empty($reject_reviewer_note))
|
@if(!empty($reject_reviewer_note))
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{!! Form::label('reject_reviewer_note', 'editor reject note..') !!}
|
{!! Form::label('reject_reviewer_note', 'editor reject note..') !!}
|
||||||
{{-- {!! Form::select('server_state', Config::get('enums.server_states'), null, ['id' => 'server_state', 'placeholder' => '-- select server state --']) !!} --}}
|
{{-- {!! Form::select('server_state', Config::get('enums.server_states'), null, ['id' => 'server_state', 'placeholder' => '-- select server state --']) !!} --}}
|
||||||
{!! Form::textarea('reject_editor_note', null, ['class'=>'pure-u-23-24','readonly', 'v-model' => 'form.reject_editor_note']) !!}
|
{!! Form::textarea('reject_editor_note', null, ['class'=>'pure-u-23-24','readonly', 'v-model' =>
|
||||||
</div>
|
'form.reject_editor_note']) !!}
|
||||||
@endif
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
|
||||||
{!! Form::label('server_state', 'Status..') !!}
|
|
||||||
{{-- {!! Form::select('server_state', Config::get('enums.server_states'), null, ['id' => 'server_state', 'placeholder' => '-- select server state --']) !!} --}}
|
|
||||||
{!! Form::text('server_state', null, ['class'=>'pure-u-23-24','readonly', 'v-model' => 'form.server_state']) !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
|
{!! Form::label('server_state', 'Status..') !!}
|
||||||
|
{{-- {!! Form::select('server_state', Config::get('enums.server_states'), null, ['id' => 'server_state', 'placeholder' => '-- select server state --']) !!} --}}
|
||||||
|
{!! Form::text('server_state', null, ['class'=>'pure-u-23-24','readonly', 'v-model' => 'form.server_state'])
|
||||||
|
!!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="fieldset-General">
|
<fieldset id="fieldset-General">
|
||||||
|
@ -32,7 +34,8 @@
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{!! Form::label('type', 'Type..') !!}
|
{!! Form::label('type', 'Type..') !!}
|
||||||
<div class="select pure-u-23-24">
|
<div class="select pure-u-23-24">
|
||||||
{!! Form::select('type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --',
|
{!! Form::select('type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type
|
||||||
|
--',
|
||||||
'v-model' => 'form.type', "v-validate" => "'required'"]) !!}
|
'v-model' => 'form.type', "v-validate" => "'required'"]) !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,7 +57,8 @@
|
||||||
{!! Form::label('creating_corporation', 'Creating Corporation') !!}
|
{!! Form::label('creating_corporation', 'Creating Corporation') !!}
|
||||||
{!! Form::text('creating_corporation', null, ['class' =>
|
{!! Form::text('creating_corporation', null, ['class' =>
|
||||||
'pure-u-23-24', 'v-model' => 'form.creating_corporation', "v-validate" => "'required'"]) !!}
|
'pure-u-23-24', 'v-model' => 'form.creating_corporation', "v-validate" => "'required'"]) !!}
|
||||||
<span class="md-error" v-if="errors.has('form.creating_corporation')">creating corporation is required.</span>
|
<span class="md-error" v-if="errors.has('form.creating_corporation')">creating corporation is
|
||||||
|
required.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -172,6 +176,118 @@
|
||||||
</div>
|
</div>
|
||||||
</fieldset> --}}
|
</fieldset> --}}
|
||||||
|
|
||||||
|
<fieldset id="fieldset-coverage">
|
||||||
|
<legend>Coverage</legend>
|
||||||
|
<div class="pure-g">
|
||||||
|
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
|
<div class="pure-u-1 pure-u-md-1">
|
||||||
|
<label for="elevation-option-one" class="pure-radio">
|
||||||
|
<input id="elevation-option-one" type="radio" v-model="elevation" value="absolut">
|
||||||
|
absolut elevation (m)
|
||||||
|
</label>
|
||||||
|
<label for="elevation-option-two" class="pure-radio">
|
||||||
|
<input id="elevation-option-two" type="radio" v-model="elevation" value="range">
|
||||||
|
elevation range (m)
|
||||||
|
</label>
|
||||||
|
<label for="elevation-option-three" class="pure-radio">
|
||||||
|
<input id="elevation-option-three" type="radio" v-model="elevation" value="no_elevation">
|
||||||
|
no elevation
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div v-show="elevation === 'absolut'" class="pure-u-1 pure-u-md-1">
|
||||||
|
{!! Form::label('elevation_absolut', 'elevation absolut: ') !!}
|
||||||
|
{!! Form::text('elevation_absolut', null,
|
||||||
|
['class' => 'pure-u-23-24', 'v-model' => 'form.coverage.elevation_absolut', 'data-vv-scope' => 'step-2', "v-validate" => "this.isElevationAbsolut ? 'required|integer' : '' " ]) !!}
|
||||||
|
</div>
|
||||||
|
<div v-show="elevation === 'range'" class="pure-u-1 pure-u-md-1">
|
||||||
|
{!! Form::label('elevation_min', 'elevation min: ') !!}
|
||||||
|
{!! Form::text('elevation_min', null,
|
||||||
|
['class' => 'pure-u-23-24', 'v-model' => 'form.coverage.elevation_min', 'data-vv-scope' => 'step-2', "v-validate" => "this.isElevationRange ? 'required|integer' : '' "]) !!}
|
||||||
|
</div>
|
||||||
|
<div v-show="elevation === 'range'" class="pure-u-1 pure-u-md-1">
|
||||||
|
{!! Form::label('elevation_max', 'elevation max: ') !!}
|
||||||
|
{!! Form::text('elevation_max', null,
|
||||||
|
['class' => 'pure-u-23-24', 'v-model' => 'form.coverage.elevation_max', 'data-vv-scope' => 'step-2', "v-validate" => "this.isElevationRange ? 'required|integer' : '' "]) !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
|
<div class="pure-u-1 pure-u-md-1">
|
||||||
|
<label for="depth-option-one" class="pure-radio">
|
||||||
|
<input id="depth-option-one" type="radio" v-model="depth" value="absolut">
|
||||||
|
absolut depth (m)
|
||||||
|
</label>
|
||||||
|
<label for="depth-option-two" class="pure-radio">
|
||||||
|
<input id="depth-option-two" type="radio" v-model="depth" value="range">
|
||||||
|
depth range (m)
|
||||||
|
</label>
|
||||||
|
<label for="depth-option-three" class="pure-radio">
|
||||||
|
<input id="depth-option-three" type="radio" v-model="depth" value="no_depth">
|
||||||
|
no depth
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-show="depth === 'absolut'" class="pure-u-1 pure-u-md-1">
|
||||||
|
{!! Form::label('depth_absolut', 'depth absolut: ') !!} {!! Form::text('depth_absolut', null, ['class' => 'pure-u-23-24',
|
||||||
|
'v-model' => 'form.coverage.depth_absolut', 'data-vv-scope' => 'step-2', "v-validate" => "this.isDepthAbsolut
|
||||||
|
? 'required|integer' : '' " ]) !!}
|
||||||
|
</div>
|
||||||
|
<div v-show="depth === 'range'" class="pure-u-1 pure-u-md-1">
|
||||||
|
{!! Form::label('depth_min', 'depth min: ') !!} {!! Form::text('depth_min', null, ['class' => 'pure-u-23-24', 'v-model' =>
|
||||||
|
'form.coverage.depth_min', 'data-vv-scope' => 'step-2', "v-validate" => "this.isDepthRange ? 'required|integer'
|
||||||
|
: '' "]) !!}
|
||||||
|
</div>
|
||||||
|
<div v-show="depth === 'range'" class="pure-u-1 pure-u-md-1">
|
||||||
|
{!! Form::label('depth_max', 'depth max: ') !!} {!! Form::text('depth_max', null, ['class' => 'pure-u-23-24', 'v-model' =>
|
||||||
|
'form.coverage.depth_max', 'data-vv-scope' => 'step-2', "v-validate" => "this.isDepthRange ? 'required|integer'
|
||||||
|
: '' "]) !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
|
<div class="pure-u-1 pure-u-md-1">
|
||||||
|
<label for="time-option-one" class="pure-radio">
|
||||||
|
<input id="time-option-one" type="radio" v-model="time" value="absolut">
|
||||||
|
absolut time (dd.MM.yyyy HH:mm:ss)
|
||||||
|
</label>
|
||||||
|
<label for="time-option-two" class="pure-radio">
|
||||||
|
<input id="time-option-two" type="radio" v-model="time" value="range">
|
||||||
|
time range (dd.MM.yyyy HH:mm:ss)
|
||||||
|
</label>
|
||||||
|
<label for="time-option-three" class="pure-radio">
|
||||||
|
<input id="time-option-three" type="radio" v-model="time" value="no_time">
|
||||||
|
no time
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-show="time === 'absolut'" class="pure-u-1 pure-u-md-1">
|
||||||
|
{!! Form::label('time_absolut', 'time absolut: ') !!}
|
||||||
|
{{-- {!! Form::datetime('time_absolut', null, ['class' => 'pure-u-23-24', 'placeholder' => 'dd.MM.yyyy HH:mm',
|
||||||
|
'v-model' => 'dataset.coverage.time_absolut', 'data-vv-scope' => 'step-2', 'format' => 'yyyy-MM-dd HH:mm',
|
||||||
|
"v-validate" => "this.isTimeAbsolut ? 'required|date_format:dd.MM.yyyy HH:mm:ss' : '' " ]) !!} --}}
|
||||||
|
<datetime name="time_absolut" v-validate="this.isTimeAbsolut ? 'required|date_format:dd-MM-yyyy HH:mm:ss' : '' " data-vv-scope="step-2" format="YYYY-MM-DD h:i:s" v-model='form.coverage.time_absolut' ></datetime>
|
||||||
|
{{-- <datetime name="time_absolut" format="MM-DD-YYYY H:i:s" width="300px" v-model="dataset.coverage.time_absolut"></datetime> --}}
|
||||||
|
</div>
|
||||||
|
<div v-show="time === 'range'" class="pure-u-1 pure-u-md-1">
|
||||||
|
{!! Form::label('time_min', 'time min: ') !!}
|
||||||
|
{{-- {!! Form::datetimelocal('time_min', null, ['class' => 'pure-u-23-24', 'placeholder' => 'dd.MM.yyyy HH:mm:ss',
|
||||||
|
'v-model' => 'dataset.coverage.time_min', 'data-vv-scope' => 'step-2', 'step' => 1,
|
||||||
|
"v-validate" => "this.isTimeRange ? 'required|date_format:dd.MM.yyyy HH:mm:ss' : '' "]) !!} --}}
|
||||||
|
<datetime name="time_min" v-validate="this.isTimeRange ? 'required|date_format:dd-MM-yyyy HH:mm:ss' : '' " data-vv-scope="step-2" format="DD-MM-YYYY h:i:s" v-model='form.coverage.time_min' ></datetime>
|
||||||
|
</div>
|
||||||
|
<div v-show="time === 'range'" class="pure-u-1 pure-u-md-1">
|
||||||
|
{!! Form::label('timemax', 'time max: ') !!}
|
||||||
|
{{-- {!! Form::datetimelocal('time_max', null, ['class' => 'pure-u-23-24', 'placeholder' => 'dd.MM.yyyy HH:mm:ss',
|
||||||
|
'v-model' => 'dataset.coverage.time_max', 'data-vv-scope' => 'step-2', 'step' => 1,
|
||||||
|
"v-validate" => "this.isTimeRange ? 'required|date_format:dd.MM.yyyy HH:mm:ss' : '' "]) !!} --}}
|
||||||
|
<datetime name="time_max" v-validate="this.isTimeRange ? 'required|date_format:dd-MM-yyyy HH:mm:ss' : '' " data-vv-scope="step-2" format="DD-MM-YYYY h:i:s" v-model='form.coverage.time_max' ></datetime>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="fieldset-titles">
|
<fieldset id="fieldset-titles">
|
||||||
<legend>Title</legend>
|
<legend>Title</legend>
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
|
@ -179,24 +295,26 @@
|
||||||
{{-- @foreach($dataset->titles as $key => $title)
|
{{-- @foreach($dataset->titles as $key => $title)
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{{ Form::label('title', 'Title ' .($key+1).':') }}
|
{{ Form::label('title', 'Title ' .($key+1).':') }}
|
||||||
{{ Form::text('titles['.$title->id.'][value]', $title->value, ['class' => 'pure-u-23-24']) }}
|
{{ Form::text('titles['.$title->id.'][value]', $title->value, ['class' => 'pure-u-23-24']) }}
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
|
{{ Form::label('language', 'Language..') }}
|
||||||
|
{{ Form::text('titles['.$title->id.'][language]', $title->language, ['placeholder' => '--no language--', 'class' => 'pure-u-23-24', 'readonly']) }}
|
||||||
|
</div>
|
||||||
|
@endforeach --}}
|
||||||
|
|
||||||
|
<template v-for="(title, key) in form.titles">
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
|
<label :for="'titles['+title.id+'][value]'"> @{{ 'Title ' + (key + 1) + ':' }}</label>
|
||||||
|
<input type="text" :id="'titles['+title.id+'][value]'" :name="'titles['+title.id+'][value]'"
|
||||||
|
v-model="title.value" class="pure-u-23-24">
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{{ Form::label('language', 'Language..') }}
|
<label :for="'titles['+title.id+'][language]'"> @{{ 'Language for title ' + (key + 1) + ':' }}</label>
|
||||||
{{ Form::text('titles['.$title->id.'][language]', $title->language, ['placeholder' => '--no language--', 'class' => 'pure-u-23-24', 'readonly']) }}
|
<input type="text" :id="'titles['+title.id+'][language]'" :name="'titles['+title.id+'][language]'"
|
||||||
|
v-model="title.language" class="pure-u-23-24" readonly>
|
||||||
</div>
|
</div>
|
||||||
@endforeach --}}
|
</template>
|
||||||
|
|
||||||
<template v-for="(title, key) in form.titles">
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
|
||||||
<label :for="'titles['+title.id+'][value]'"> @{{ 'Title ' + (key + 1) + ':' }}</label>
|
|
||||||
<input type="text" :id="'titles['+title.id+'][value]'" :name="'titles['+title.id+'][value]'" v-model="title.value" class="pure-u-23-24">
|
|
||||||
</div>
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
|
||||||
<label :for="'titles['+title.id+'][language]'"> @{{ 'Language for title ' + (key + 1) + ':' }}</label>
|
|
||||||
<input type="text" :id="'titles['+title.id+'][language]'" :name="'titles['+title.id+'][language]'" v-model="title.language" class="pure-u-23-24" readonly>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
@ -208,25 +326,29 @@
|
||||||
{{-- @foreach($dataset->abstracts as $key => $abstract)
|
{{-- @foreach($dataset->abstracts as $key => $abstract)
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{{ Form::label('abstract', 'Abstract ' .($key+1).':') }}
|
{{ Form::label('abstract', 'Abstract ' .($key+1).':') }}
|
||||||
<!-- Notice this is an array now: -->
|
<!-- Notice this is an array now: -->
|
||||||
{{ Form::textarea('abstracts['.$abstract->id.'][value]', $abstract->value, ['class' => 'pure-u-23-24', 'size' => '70x6']) }}
|
{{ Form::textarea('abstracts['.$abstract->id.'][value]', $abstract->value, ['class' => 'pure-u-23-24', 'size' => '70x6']) }}
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
|
{{ Form::label('language', 'Language..') }}
|
||||||
|
{{ Form::text('abstracts['.$abstract->id.'][language]', $abstract->language, ['placeholder' => '--no language--', 'class' => 'pure-u-23-24', 'readonly']) }}
|
||||||
|
</div>
|
||||||
|
@endforeach --}}
|
||||||
|
|
||||||
|
<template v-for="(abstract, key) in form.abstracts">
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
|
<label :for="'abstracts['+abstract.id+'][value]'"> @{{ 'Title ' + (key + 1) + ':' }}</label>
|
||||||
|
<input type="text" :id="'abstracts['+abstract.id+'][value]'" :name="'abstracts['+abstract.id+'][value]'"
|
||||||
|
v-model="abstract.value" class="pure-u-23-24">
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{{ Form::label('language', 'Language..') }}
|
<label :for="'abstracts['+abstract.id+'][language]'">
|
||||||
{{ Form::text('abstracts['.$abstract->id.'][language]', $abstract->language, ['placeholder' => '--no language--', 'class' => 'pure-u-23-24', 'readonly']) }}
|
@{{ 'Language for abstract ' + (key + 1) + ':' }}</label>
|
||||||
|
<input type="text" :id="'abstracts['+abstract.id+'][language]'"
|
||||||
|
:name="'abstracts['+abstract.id+'][language]'" v-model="abstract.language" class="pure-u-23-24"
|
||||||
|
readonly>
|
||||||
</div>
|
</div>
|
||||||
@endforeach --}}
|
</template>
|
||||||
|
|
||||||
<template v-for="(abstract, key) in form.abstracts">
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
|
||||||
<label :for="'abstracts['+abstract.id+'][value]'"> @{{ 'Title ' + (key + 1) + ':' }}</label>
|
|
||||||
<input type="text" :id="'abstracts['+abstract.id+'][value]'" :name="'abstracts['+abstract.id+'][value]'" v-model="abstract.value" class="pure-u-23-24">
|
|
||||||
</div>
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
|
||||||
<label :for="'abstracts['+abstract.id+'][language]'"> @{{ 'Language for abstract ' + (key + 1) + ':' }}</label>
|
|
||||||
<input type="text" :id="'abstracts['+abstract.id+'][language]'" :name="'abstracts['+abstract.id+'][language]'" v-model="abstract.language" class="pure-u-23-24" readonly>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
@ -237,27 +359,29 @@
|
||||||
<div class="pure-control-group checkboxlist">
|
<div class="pure-control-group checkboxlist">
|
||||||
{{-- @foreach ($licenses as $license)
|
{{-- @foreach ($licenses as $license)
|
||||||
<label for={{ "license". $license->id }} class="pure-checkbox">
|
<label for={{ "license". $license->id }} class="pure-checkbox">
|
||||||
@if ($loop->first)
|
@if ($loop->first)
|
||||||
<input name="licenses" value={{ $license->id }} v-model="form.checkedLicenses" {{ (in_array($license->id, $checkeds)) ? 'checked=checked' : '' }}
|
<input name="licenses" value={{ $license->id }} v-model="form.checkedLicenses"
|
||||||
type="radio" class="form-check-input" v-validate="'required'" data-vv-as="Licence">
|
{{ (in_array($license->id, $checkeds)) ? 'checked=checked' : '' }} type="radio" class="form-check-input"
|
||||||
<a href="{{ $license->link_licence }}" target="_blank">{{ $license->name_long }}</a>
|
v-validate="'required'" data-vv-as="Licence">
|
||||||
@else
|
<a href="{{ $license->link_licence }}" target="_blank">{{ $license->name_long }}</a>
|
||||||
<input name="licenses" value={{ $license->id }} v-model="form.checkedLicenses" {{ (in_array($license->id, $checkeds)) ? 'checked=checked' : '' }}
|
@else
|
||||||
type="radio" class="form-check-input">
|
<input name="licenses" value={{ $license->id }} v-model="form.checkedLicenses"
|
||||||
<a href="{{ $license->link_licence }}" target="_blank">{{ $license->name_long }}</a>
|
{{ (in_array($license->id, $checkeds)) ? 'checked=checked' : '' }} type="radio" class="form-check-input">
|
||||||
@endif
|
<a href="{{ $license->link_licence }}" target="_blank">{{ $license->name_long }}</a>
|
||||||
|
@endif
|
||||||
</label>
|
</label>
|
||||||
@endforeach --}}
|
@endforeach --}}
|
||||||
<br>
|
<br>
|
||||||
{{-- <span>Checked license: @{{ dataset.checkedLicenses }}</span> --}}
|
{{-- <span>Checked license: @{{ dataset.checkedLicenses }}</span> --}}
|
||||||
|
|
||||||
<template v-for="(license, index) in licenses">
|
<template v-for="(license, index) in licenses">
|
||||||
<label :for="'license'+license.id" class="pure-checkbox">
|
<label :for="'license'+license.id" class="pure-checkbox">
|
||||||
<input name="licenses" :value="license.id" v-model="checkeds" type="radio" class="form-check-input" v-validate="'required'" >
|
<input name="licenses" :value="license.id" v-model="checkeds" type="radio" class="form-check-input"
|
||||||
<a :href="license.link_licence" target="_blank">@{{ license.name_long }}</a>
|
v-validate="'required'">
|
||||||
</label>
|
<a :href="license.link_licence" target="_blank">@{{ license.name_long }}</a>
|
||||||
</template>
|
</label>
|
||||||
{{-- <span>old checkeds: @{{ checkeds }}</span> --}}
|
</template>
|
||||||
|
{{-- <span>old checkeds: @{{ checkeds }}</span> --}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -266,9 +390,10 @@
|
||||||
|
|
||||||
<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>
|
||||||
{{-- <table class="table table-hover" v-if="dataset.keywords.length"> --}}
|
{{-- <table class="table table-hover" v-if="dataset.keywords.length"> --}}
|
||||||
@if ($dataset->references->count() > 0)
|
{{-- @if ($dataset->references->count() > 0) --}}
|
||||||
<table id="references" class="pure-table pure-table-horizontal">
|
<table v-show="form.references.length" id="references" class="pure-table pure-table-horizontal">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 20px;">Reference value</th>
|
<th style="width: 20px;">Reference value</th>
|
||||||
|
@ -280,39 +405,58 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
@foreach($dataset->references as $key => $reference)
|
{{-- @foreach($dataset->references as $key => $reference) --}}
|
||||||
<tr v-for="(item, index) in form.references">
|
<tr v-for="(item, index) in form.references">
|
||||||
<td>
|
<td>
|
||||||
{{ Form::text('references['.$reference->id.'][value]', $reference->value, ['class' => 'form-control', 'placeholder' => '[REFERENCE VALUE]']) }}
|
{{-- {{ Form::text('references['.$reference->id.'][value]', $reference->value, ['class' => 'form-control', 'placeholder' => '[REFERENCE VALUE]']) }}
|
||||||
|
--}}
|
||||||
|
<input v-bind:name="'references[' + item.id +'][value]'" class="form-control"
|
||||||
|
placeholder="[REFERENCE VALUE]" v-model="item.value" v-validate="'required'" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ Form::text('references['.$reference->id.'][label]', $reference->label, ['class' => 'form-control', 'placeholder' => '[REFERENCE LABEL]']) }}
|
{{-- {{ Form::text('references['.$reference->id.'][label]', $reference->label, ['class' => 'form-control', 'placeholder' => '[REFERENCE LABEL]']) }}
|
||||||
|
--}}
|
||||||
|
<input v-bind:name="'references[' + item.id +'][label]'" class="form-control"
|
||||||
|
placeholder="[REFERENCE LABEL]" v-model="item.label" v-validate="'required'" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{!! Form::select('references['.$reference->id.'][type]', $referenceTypes, $reference->type,
|
{{-- {!! Form::select('references['.$reference->id.'][type]', $referenceTypes, $reference->type,
|
||||||
['placeholder' => '[reference type]', 'v-model' =>
|
['placeholder' => '[REFERENCE TYPE]', 'v-model' => 'item.type', "v-validate" => "'required'"]) !!} --}}
|
||||||
'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
|
<select v-bind:name="'references[' + item.id +'][type]'" v-model="item.type" class="form-control" v-validate="'required'">
|
||||||
|
<option v-for="option in referenceTypes" :value='option'>
|
||||||
|
@{{ option }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
{{-- <span>Selected: @{{ item.type }}</span> --}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{!! Form::select('references['.$reference->id.'][relation]', $relationTypes, $reference->relation,
|
{{-- {!! Form::select('references['.$reference->id.'][relation]', $relationTypes, $reference->relation,
|
||||||
['placeholder' => '[relation type]', 'v-model' =>
|
['placeholder' => '[REFERENCE TYPE]', 'v-model' => 'item.relation', "v-validate" => "'required'"]) !!} --}}
|
||||||
'item.relation', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
|
<select v-bind:name="'references[' + item.id +'][relation]'" v-model="item.relation" class="form-control" v-validate="'required'">
|
||||||
|
<option v-for="option in relationTypes" :value='option'>
|
||||||
|
@{{ option }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<button v-if="item.id == undefined" class="pure-button button-small is-warning"
|
||||||
|
@click.prevent="removeReference(index)">
|
||||||
|
<i class="fa fa-trash"></i>
|
||||||
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
{{-- @endforeach --}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@else
|
{{-- @else
|
||||||
<span>...there are no references</span>
|
<span>...there are no references</span>
|
||||||
@endif
|
@endif --}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="fieldset-keywords">
|
<fieldset id="fieldset-keywords">
|
||||||
<legend>Dataset Keywords</legend>
|
<legend>Dataset Keywords</legend>
|
||||||
{{-- <table class="table table-hover" v-if="dataset.keywords.length"> --}}
|
{{-- <table class="table table-hover" v-if="dataset.keywords.length"> --}}
|
||||||
|
<button class="pure-button button-small" @click.prevent="addKeyword()">Add Keyword</button>
|
||||||
@if ($dataset->subjects->count() > 0)
|
@if ($dataset->subjects->count() > 0)
|
||||||
<table id="keywords" class="pure-table pure-table-horizontal">
|
<table id="keywords" class="pure-table pure-table-horizontal">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -324,11 +468,12 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{-- @foreach($dataset->subjects as $key => $keyword) --}}
|
{{-- @foreach($dataset->subjects as $key => $keyword) --}}
|
||||||
<tr>
|
|
||||||
<tr v-for="(item, index) in form.subjects" :key="item.id">
|
<tr v-for="(item, index) in form.subjects" :key="item.id">
|
||||||
<td>
|
<td>
|
||||||
<input v-bind:name="'subjects[' + item.id +'][value]'" class="form-control" placeholder="[KEYWORD VALUE]" v-model="item.value" v-validate="'required'" />
|
<input v-bind:name="'subjects[' + item.id +'][value]'" class="form-control"
|
||||||
{{-- {{ Form::text('keywords['.$keyword->id.'][value]', $keyword->value, ['class' => 'form-control', 'placeholder' => '[KEYWORD VALUE]']) }} --}}
|
placeholder="[KEYWORD VALUE]" v-model="item.value" v-validate="'required'" />
|
||||||
|
{{-- {{ Form::text('keywords['.$keyword->id.'][value]', $keyword->value, ['class' => 'form-control', 'placeholder' => '[KEYWORD VALUE]']) }}
|
||||||
|
--}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{-- {!! Form::select('keywords['.$keyword->id.'][type]', $keywordTypes, $keyword->type, ['placeholder'
|
{{-- {!! Form::select('keywords['.$keyword->id.'][type]', $keywordTypes, $keyword->type, ['placeholder'
|
||||||
|
@ -338,12 +483,16 @@
|
||||||
<option value="" disabled>[keyword type]</option>
|
<option value="" disabled>[keyword type]</option>
|
||||||
@foreach($keywordTypes as $option)
|
@foreach($keywordTypes as $option)
|
||||||
<option value="{{ $option }}">{{ $option }}</option>
|
<option value="{{ $option }}">{{ $option }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select> --}}
|
</select> --}}
|
||||||
<input v-bind:name="'subjects[' + item.id +'][type]'" readonly class="form-control" placeholder="[KEYWORD TYPE]" v-model="item.type" v-validate="'required'" />
|
<input v-bind:name="'subjects[' + item.id +'][type]'" readonly class="form-control"
|
||||||
|
placeholder="[KEYWORD TYPE]" v-model="item.type" v-validate="'required'" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{-- <button class="pure-button button-small is-warning" @click.prevent="removeKeyword(index)">Remove</button> --}}
|
<button v-if="item.id == undefined" class="pure-button button-small is-warning"
|
||||||
|
@click.prevent="removeKeyword(index)">
|
||||||
|
<i class="fa fa-trash"></i>
|
||||||
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{-- @endforeach --}}
|
{{-- @endforeach --}}
|
||||||
|
@ -372,11 +521,14 @@
|
||||||
@else
|
@else
|
||||||
<span class="alert">missing file: {{ $file->path_name }}</span>
|
<span class="alert">missing file: {{ $file->path_name }}</span>
|
||||||
@endif --}}
|
@endif --}}
|
||||||
<a v-if="'storage/' + file.path_name" v-bind:src= " '/settings/file/download/' + file.id ">@{{ file.path_name }}</a>
|
<a v-if="'storage/' + file.path_name"
|
||||||
|
v-bind:src=" '/settings/file/download/' + file.id ">@{{ file.path_name }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{-- {{ Form::text('files['.$file->id.'][label]', $file->label, ['class' => 'form-control', 'placeholder' => '[FILE LABEL]']) }} --}}
|
{{-- {{ Form::text('files['.$file->id.'][label]', $file->label, ['class' => 'form-control', 'placeholder' => '[FILE LABEL]']) }}
|
||||||
<input v-bind:name="'files[' + file.id +'][label]'" class="form-control" placeholder="[FILE LABEL]" v-model="file.label" v-validate="'required'" />
|
--}}
|
||||||
|
<input v-bind:name="'files[' + file.id +'][label]'" class="form-control" placeholder="[FILE LABEL]"
|
||||||
|
v-model="file.label" v-validate="'required'" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{-- @endforeach --}}
|
{{-- @endforeach --}}
|
||||||
|
|
|
@ -54,7 +54,9 @@
|
||||||
'form' => $dataset,
|
'form' => $dataset,
|
||||||
'projects' => $projects,
|
'projects' => $projects,
|
||||||
'licenses' => $licenses,
|
'licenses' => $licenses,
|
||||||
'checkeds' => $checkeds
|
'checkeds' => $checkeds,
|
||||||
|
'referenceTypes' => $referenceTypes,
|
||||||
|
'relationTypes' => $relationTypes
|
||||||
]); ?>
|
]); ?>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user