- bug fixes Testphase Januar 2020
This commit is contained in:
parent
d323e1d4bb
commit
a773fe2a1d
|
@ -145,7 +145,7 @@ class RequestController extends Controller
|
|||
private function handleIdentify()
|
||||
{
|
||||
$email = "repository@geologie.ac.at";
|
||||
$repositoryName = "TETHYS - Data Research Repository";
|
||||
$repositoryName = "TETHYS RDR";
|
||||
$repIdentifier = "tethys.geologie.ac.at";
|
||||
$sampleIdentifier = "oai:" . $repIdentifier . ":27";//$this->_configuration->getSampleIdentifier();
|
||||
$earliestDateFromDb = optional(Dataset::earliestPublicationDate())->server_date_published;
|
||||
|
|
|
@ -52,7 +52,10 @@ class EditorController extends Controller
|
|||
})
|
||||
->orderBy('server_date_modified', 'desc')
|
||||
->get();
|
||||
return View::make('workflow.editor.index', compact($datasets));
|
||||
// return View::make('workflow.editor.index', compact('datasets'));
|
||||
return View::make('workflow.editor.index', [
|
||||
'datasets' => $datasets,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -95,8 +98,13 @@ class EditorController extends Controller
|
|||
public function edit($id): \Illuminate\Contracts\View\View
|
||||
{
|
||||
$dataset = Dataset::findOrFail($id);
|
||||
$dataset->load('licenses', 'titles', 'abstracts', 'files', 'coverage', 'subjects', 'references');
|
||||
$dataset->load('licenses', 'authors', 'contributors', 'titles', 'abstracts', 'files', 'coverage', 'subjects', 'references');
|
||||
|
||||
$titleTypes = ['Main' => 'Main', 'Sub' => 'Sub', 'Alternative' => 'Alternative', 'Translated' => 'Translated', 'Other' => 'Other'];
|
||||
$descriptionTypes = ['Abstract' => 'Abstract', 'Methods' => 'Methods', 'Series_information' => 'Series_information', 'Technical_info' => 'Technical_info', 'Translated' => 'Translated', 'Other' => 'Other'];
|
||||
$languages = DB::table('languages')
|
||||
->where('active', true)
|
||||
->pluck('part1', 'part1');
|
||||
$projects = Project::pluck('label', 'id');
|
||||
|
||||
$datum = date('Y-m-d');
|
||||
|
@ -110,7 +118,6 @@ class EditorController extends Controller
|
|||
->where('active', true)
|
||||
->pluck('part1', 'part1');
|
||||
|
||||
//$options = License::all();
|
||||
// $options = License::all('id', 'name_long');
|
||||
$licenses = License::select('id', 'name_long', 'link_licence')
|
||||
->orderBy('sort_order')
|
||||
|
@ -120,11 +127,10 @@ class EditorController extends Controller
|
|||
|
||||
$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);
|
||||
|
||||
$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);
|
||||
|
||||
|
||||
|
@ -132,6 +138,9 @@ class EditorController extends Controller
|
|||
'workflow.editor.edit',
|
||||
compact(
|
||||
'dataset',
|
||||
'titleTypes',
|
||||
'descriptionTypes',
|
||||
'languages',
|
||||
'projects',
|
||||
'licenses',
|
||||
'checkeds',
|
||||
|
@ -156,100 +165,249 @@ class EditorController extends Controller
|
|||
public function update(DocumentRequest $request, $id): RedirectResponse
|
||||
{
|
||||
$rules = [
|
||||
'type' => 'required|min:5',
|
||||
'coverage.xmin' => [
|
||||
'nullable',
|
||||
'type' => 'required|min:3',
|
||||
'titles.*.value' => 'required|min:4|max:255',
|
||||
'titles.*.language' => 'required',
|
||||
'descriptions.*.value' => 'required|min:4|max:2500',
|
||||
'descriptions.*.language' => 'required',
|
||||
'coverage.x_min' => [
|
||||
'required',
|
||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
||||
],
|
||||
'coverage.ymin' => [
|
||||
'nullable',
|
||||
'coverage.y_min' => [
|
||||
'required',
|
||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
||||
],
|
||||
'coverage.xmax' => [
|
||||
'nullable',
|
||||
'coverage.x_max' => [
|
||||
'required',
|
||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
||||
],
|
||||
'coverage.ymax' => [
|
||||
'nullable',
|
||||
'coverage.y_max' => [
|
||||
'required',
|
||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
||||
],
|
||||
'subjects' => 'required|array|min:3',
|
||||
'subjects.*.value' => 'required|string',
|
||||
'subjects.*.type' => 'required|string',
|
||||
'files' => 'required|array|min:1',
|
||||
'files.*.label' => 'required|string',
|
||||
];
|
||||
$validator = Validator::make($request->all(), $rules);
|
||||
$customMessages = [
|
||||
'subjects.min' => 'Minimal three keywords are required.',
|
||||
'subjects.*.type.required' => 'The types of all keywords are required.',
|
||||
'files.min' => 'Minimal one file is required.',
|
||||
];
|
||||
if (null != $request->file('files')) {
|
||||
$data = $request->all();
|
||||
$files = count($request->input('files')) - 1;
|
||||
foreach (range(0, $files) as $index) {
|
||||
// $rules['files.' . $index] = 'image|max:2048';
|
||||
$rules['files.' . $index . '.file'] = [new RdrFilesize($index + 1), 'file', new RdrFiletypes()];
|
||||
}
|
||||
}
|
||||
$validator = Validator::make($request->all(), $rules, $customMessages);
|
||||
if (!$validator->fails()) {
|
||||
$dataset = Dataset::findOrFail($id);
|
||||
$data = $request->all();
|
||||
$input = $request->except('abstracts', 'licenses', 'titles', 'coverage', '_method', '_token');
|
||||
$input = $request->except(
|
||||
'abstracts',
|
||||
'licenses',
|
||||
'authors',
|
||||
'contributors',
|
||||
'titles',
|
||||
'coverage',
|
||||
'subjects',
|
||||
'references',
|
||||
'files'
|
||||
);
|
||||
|
||||
$licenses = $request->input('licenses');
|
||||
//$licenses = $input['licenses'];
|
||||
$dataset->licenses()->sync($licenses);
|
||||
|
||||
$dataset->authors()->sync([]);
|
||||
//store authors
|
||||
if (isset($data['authors'])) {
|
||||
// $data_to_sync = [];
|
||||
$index = 0;
|
||||
foreach ($request->get('authors') as $key => $person) {
|
||||
$pivot_data = ['role' => 'author', 'sort_order' => $index + 1, 'allow_email_contact' => false];
|
||||
// if ($galery_id == $request->get('mainPicture')) $pivot_data = ['main' => 1];
|
||||
if (isset($person['id'])) {
|
||||
// $data_to_sync[$person['id']] = $pivot_data;
|
||||
$dataset->persons()->attach($person['id'], $pivot_data);
|
||||
} else {
|
||||
$dataPerson = new Person($person);
|
||||
$dataPerson->status = true;
|
||||
$dataPerson->name_type = "Organizational";
|
||||
$dataset->persons()->save($dataPerson, $pivot_data);
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
// $dataset->persons()->sync($data_to_sync);
|
||||
}
|
||||
|
||||
$dataset->contributors()->sync([]);
|
||||
//store contributors
|
||||
if (isset($data['contributors'])) {
|
||||
// $data_to_sync = [];
|
||||
$index = 0;
|
||||
foreach ($request->get('contributors') as $key => $person) {
|
||||
$pivot_data = ['role' => 'contributor', 'sort_order' => $index + 1, 'allow_email_contact' => false];
|
||||
// if ($galery_id == $request->get('mainPicture')) $pivot_data = ['main' => 1];
|
||||
if (isset($person['id'])) {
|
||||
// $data_to_sync[$person['id']] = $pivot_data;
|
||||
$dataset->persons()->attach($person['id'], $pivot_data);
|
||||
} else {
|
||||
$dataPerson = new Person($person);
|
||||
$dataPerson->status = true;
|
||||
$dataPerson->name_type = "Organizational";
|
||||
$dataset->persons()->save($dataPerson, $pivot_data);
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
// $dataset->persons()->sync($data_to_sync);
|
||||
}
|
||||
|
||||
//save the titles:
|
||||
$titles = $request->input('titles');
|
||||
if (is_array($titles) && count($titles) > 0) {
|
||||
foreach ($titles as $key => $formTitle) {
|
||||
$title = Title::findOrFail($key);
|
||||
// if (isset($key) && $key != 'undefined') {
|
||||
if (isset($formTitle['id'])) {
|
||||
$title = Title::findOrFail($formTitle['id']);
|
||||
$title->value = $formTitle['value'];
|
||||
$title->language = $formTitle['language'];
|
||||
$title->type = $formTitle['type'];
|
||||
if ($title->isDirty()) {
|
||||
$title->save();
|
||||
}
|
||||
} else {
|
||||
$title = new Title($formTitle);
|
||||
$dataset->titles()->save($title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//save the abstracts:
|
||||
$abstracts = $request->input('abstracts');
|
||||
if (is_array($abstracts) && count($abstracts) > 0) {
|
||||
foreach ($abstracts as $key => $formAbstract) {
|
||||
$abstract = Description::findOrFail($key);
|
||||
// if (isset($key) && $key != 'undefined') {
|
||||
if (isset($formAbstract['id'])) {
|
||||
$abstract = Description::findOrFail($formAbstract['id']);
|
||||
$abstract->value = $formAbstract['value'];
|
||||
$abstract->language = $formAbstract['language'];
|
||||
if ($abstract->isDirty()) {
|
||||
$abstract->save();
|
||||
}
|
||||
} else {
|
||||
$abstract = new Description($formAbstract);
|
||||
$dataset->abstracts()->save($abstract);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//save the references:
|
||||
$references = $request->input('references');
|
||||
if (is_array($references) && count($references) > 0) {
|
||||
foreach ($references as $key => $formReference) {
|
||||
$reference = DatasetReference::findOrFail($key);
|
||||
// if (isset($key) && $key != 'undefined') {
|
||||
if (isset($formReference['id'])) {
|
||||
$reference = DatasetReference::findOrFail($formReference['id']);
|
||||
$reference->value = $formReference['value'];
|
||||
$reference->label = $formReference['label'];
|
||||
$reference->type = $formReference['type'];
|
||||
$reference->relation = $formReference['relation'];
|
||||
if ($reference->isDirty()) {
|
||||
$reference->save();
|
||||
}
|
||||
} else {
|
||||
$reference = new DatasetReference($formReference);
|
||||
$dataset->references()->save($reference);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//save the keywords:
|
||||
$keywords = $request->input('keywords');
|
||||
$keywords = $request->input('subjects');
|
||||
if (is_array($keywords) && count($keywords) > 0) {
|
||||
foreach ($keywords as $key => $formKeyword) {
|
||||
$subject = Subject::findOrFail($key);
|
||||
if (isset($formKeyword['id'])) {
|
||||
$subject = Subject::findOrFail($formKeyword['id']);
|
||||
$subject->value = $formKeyword['value'];
|
||||
$subject->type = $formKeyword['type'];
|
||||
if ($subject->isDirty()) {
|
||||
$subject->save();
|
||||
}
|
||||
} else {
|
||||
$subject = new Subject($formKeyword);
|
||||
$dataset->subjects()->save($subject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//save the files:
|
||||
$files = $request->input('files');
|
||||
$files = $request->get('files');
|
||||
// $files = $request->file('files');
|
||||
if (is_array($files) && count($files) > 0) {
|
||||
$index = 1;
|
||||
foreach ($files as $key => $formFile) {
|
||||
$file = File::findOrFail($key);
|
||||
// if (isset($key) && $key != 'undefined') {
|
||||
if (isset($formFile['id'])) {
|
||||
$file = File::findOrFail($formFile['id']);
|
||||
$file->label = $formFile['label'];
|
||||
if ($file->isDirty()) {
|
||||
$file->save();
|
||||
}
|
||||
} else {
|
||||
$uploads = $request->file('uploads');
|
||||
$fileIndex = $formFile['file'];
|
||||
$file = $uploads[$fileIndex];
|
||||
|
||||
|
||||
// $file = new \Illuminate\Http\UploadedFile($file);
|
||||
$label = urldecode($formFile['label']);
|
||||
$sort_order = $index;//$formFile['sort_order'];
|
||||
$fileName = "file-" . time() . '.' . $file->getClientOriginalExtension();
|
||||
$mimeType = $file->getMimeType();
|
||||
$datasetFolder = 'files/' . $dataset->id;
|
||||
$path = $file->storeAs($datasetFolder, $fileName);
|
||||
$size = Storage::size($path);
|
||||
//$path = Storage::putFile('files', $image, $fileName);
|
||||
$fileDb = new File([
|
||||
'path_name' => $path,
|
||||
'file_size' => $size,
|
||||
'mime_type' => $mimeType,
|
||||
'label' => $label,
|
||||
'sort_order' => $sort_order,
|
||||
'visible_in_frontdoor' => 1,
|
||||
'visible_in_oai' => 1
|
||||
]);
|
||||
//$test = $file->path_name;
|
||||
$dataset->files()->save($fileDb);
|
||||
$fileDb->createHashValues();
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
}
|
||||
|
||||
// save coverage
|
||||
if (isset($data['coverage'])) {
|
||||
if (isset($data['coverage']) && !$this->containsOnlyNull($data['coverage'])) {
|
||||
$formCoverage = $request->input('coverage');
|
||||
$coverage = $dataset->coverage()->updateOrCreate(
|
||||
['dataset_id' => $dataset->id],
|
||||
$formCoverage
|
||||
);
|
||||
} elseif (isset($data['coverage']) && $this->containsOnlyNull($data['coverage'])
|
||||
&& !is_null($dataset->coverage)) {
|
||||
$dataset->coverage()->delete();
|
||||
}
|
||||
|
||||
if (!$dataset->isDirty(dataset::UPDATED_AT)) {
|
||||
$dataset->fill($input);
|
||||
// $dataset->creating_corporation = "Peter";
|
||||
|
||||
if (!$dataset->isDirty()) {
|
||||
$time = new \Illuminate\Support\Carbon();
|
||||
$dataset->setUpdatedAt($time);
|
||||
}
|
||||
|
@ -266,12 +424,31 @@ class EditorController extends Controller
|
|||
// 'success' => false,
|
||||
// 'errors' => $validator->errors()->all(),
|
||||
// ], 422);
|
||||
return back()
|
||||
->withErrors($validator->errors()->all());
|
||||
// $errors = $validator->errors();
|
||||
return back()->withErrors($validator);
|
||||
// return redirect()->route('publish.workflow.submit.edit', ['id' => $id])->withInput()
|
||||
// ->withErrors($validator);
|
||||
}
|
||||
throw new GeneralException(trans('exceptions.backend.dataset.update_error'));
|
||||
}
|
||||
|
||||
private function containsOnlyNull($input)
|
||||
{
|
||||
return empty(array_filter($input, function ($a) {
|
||||
return $a !== null;
|
||||
}));
|
||||
}
|
||||
|
||||
public function download($id)
|
||||
{
|
||||
//$report = $this->report->find($id);
|
||||
$file = File::findOrFail($id);
|
||||
$file_path = public_path('storage/' . $file->path_name);
|
||||
$ext = \Illuminate\Support\Facades\File::extension($file_path);
|
||||
return response()->download($file_path, $file->label . "." . $ext, ['Content-Type:' . $file->mime_type]);
|
||||
// return response()->download($file_path, $file->label, ['Content-Type:' . $file->mime_type]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
|
|
|
@ -55,7 +55,7 @@ class IndexController extends Controller
|
|||
->pluck('part1', 'part1');
|
||||
// ->toArray();
|
||||
|
||||
// $projects = Project::pluck('label', 'id');
|
||||
$projects = Project::pluck('label', 'id');
|
||||
$relatedIdentifierTypes = ["doi", "handle", "isbn", "issn", "url", "urn"];
|
||||
$relatedIdentifierTypes = array_combine($relatedIdentifierTypes, $relatedIdentifierTypes);
|
||||
|
||||
|
@ -73,7 +73,7 @@ class IndexController extends Controller
|
|||
//$relationTypes = array('updates' => 'updates', 'updated-by' => 'updated-by', 'other' => 'other');
|
||||
return view(
|
||||
'publish.create-step1',
|
||||
compact('licenses', 'languages', 'relatedIdentifierTypes', 'relationTypes', 'titleTypes', 'keywordTypes', 'descriptionTypes', 'page')
|
||||
compact('licenses', 'languages', 'projects', 'relatedIdentifierTypes', 'relationTypes', 'titleTypes', 'keywordTypes', 'descriptionTypes', 'page')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -246,26 +246,38 @@ class IndexController extends Controller
|
|||
'type' => 'required|min:5',
|
||||
'rights' => 'required|boolean|in:1',
|
||||
'belongs_to_bibliography' => 'required|boolean',
|
||||
'title_main.value' => 'required|min:4',
|
||||
'title_main.value' => 'required|min:4|max:255',
|
||||
'title_main.language' => 'required',
|
||||
'abstract_main.value' => 'required|min:4',
|
||||
'titles.*.value' => 'required|min:4|max:255',
|
||||
'abstract_main.value' => 'required|min:4|max:2500',
|
||||
'abstract_main.language' => 'required',
|
||||
'descriptions.*.value' => 'required|min:4|max:2500',
|
||||
'coverage.x_min' => [
|
||||
'nullable',
|
||||
'required',
|
||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
||||
],
|
||||
'coverage.y_min' => [
|
||||
'nullable',
|
||||
'required',
|
||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
||||
],
|
||||
'coverage.x_max' => [
|
||||
'nullable',
|
||||
'required',
|
||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
||||
],
|
||||
'coverage.y_max' => [
|
||||
'nullable',
|
||||
'required',
|
||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
||||
],
|
||||
'keywords' => 'required|array|min:3',
|
||||
'keywords.*.value' => 'required|string',
|
||||
'keywords.*.type' => 'required|string',
|
||||
'files' => 'required|array|min:1',
|
||||
'files.*.label' => 'required|string',
|
||||
];
|
||||
$customMessages = [
|
||||
'keywords.required' => 'Minimal three keywords are required.',
|
||||
'keywords.*.type.required' => 'The types of all keywords are required.',
|
||||
'files.min' => 'Minimal one file is required.',
|
||||
];
|
||||
if (null != $request->file('files')) {
|
||||
$files = count($request->file('files')) - 1;
|
||||
|
@ -274,7 +286,7 @@ class IndexController extends Controller
|
|||
$rules['files.' . $index . '.file'] = [new RdrFilesize($index + 1), 'file', 'required', new RdrFiletypes()];
|
||||
}
|
||||
}
|
||||
$validator = Validator::make($request->all(), $rules);
|
||||
$validator = Validator::make($request->all(), $rules, $customMessages);
|
||||
if (!$validator->fails()) {
|
||||
//store dataset todo
|
||||
//$data = $request->all();
|
||||
|
@ -501,7 +513,7 @@ class IndexController extends Controller
|
|||
$errors = $validator->errors();
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'errors' => $errors->all(),
|
||||
'errors' => $errors,
|
||||
], 422);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,29 +129,37 @@ class SubmitController extends Controller
|
|||
public function update(DocumentRequest $request, $id): RedirectResponse
|
||||
{
|
||||
$rules = [
|
||||
'type' => 'required|min:5',
|
||||
'coverage.xmin' => [
|
||||
'nullable',
|
||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/',
|
||||
'type' => 'required|min:3',
|
||||
'titles.*.value' => 'required|min:4|max:255',
|
||||
'titles.*.language' => 'required',
|
||||
'descriptions.*.value' => 'required|min:4|max:2500',
|
||||
'descriptions.*.language' => 'required',
|
||||
'coverage.x_min' => [
|
||||
'required',
|
||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
||||
],
|
||||
'coverage.ymin' => [
|
||||
'nullable',
|
||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/',
|
||||
'coverage.y_min' => [
|
||||
'required',
|
||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
||||
],
|
||||
'coverage.xmax' => [
|
||||
'nullable',
|
||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/',
|
||||
'coverage.x_max' => [
|
||||
'required',
|
||||
'regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/'
|
||||
],
|
||||
'coverage.ymax' => [
|
||||
'nullable',
|
||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/',
|
||||
'coverage.y_max' => [
|
||||
'required',
|
||||
'regex:/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/'
|
||||
],
|
||||
'keywords.*.value' => 'required|string',
|
||||
'keywords.*.type' => 'required|string',
|
||||
'subjects' => 'required|array|min:3',
|
||||
'subjects.*.value' => 'required|string',
|
||||
'subjects.*.type' => 'required|string',
|
||||
'files' => 'required|array|min:1',
|
||||
'files.*.label' => 'required|string',
|
||||
];
|
||||
$customMessages = [
|
||||
'keywords.*.type.required' => 'The types of all keywords are required.',
|
||||
'subjects.min' => 'Minimal three keywords are required.',
|
||||
'subjects.*.type.required' => 'The types of all keywords are required.',
|
||||
'files.min' => 'Minimal one file is required.',
|
||||
];
|
||||
if (null != $request->file('files')) {
|
||||
$data = $request->all();
|
||||
|
@ -168,6 +176,8 @@ class SubmitController extends Controller
|
|||
$input = $request->except(
|
||||
'abstracts',
|
||||
'licenses',
|
||||
'authors',
|
||||
'contributors',
|
||||
'titles',
|
||||
'coverage',
|
||||
'subjects',
|
||||
|
@ -303,6 +313,7 @@ class SubmitController extends Controller
|
|||
|
||||
//save the files:
|
||||
$files = $request->get('files');
|
||||
// $files = $request->file('files');
|
||||
if (is_array($files) && count($files) > 0) {
|
||||
$index = 1;
|
||||
foreach ($files as $key => $formFile) {
|
||||
|
@ -314,7 +325,12 @@ class SubmitController extends Controller
|
|||
$file->save();
|
||||
}
|
||||
} else {
|
||||
$file = $formFile['file'];
|
||||
$uploads = $request->file('uploads');
|
||||
$fileIndex = $formFile['file'];
|
||||
$file = $uploads[$fileIndex];
|
||||
|
||||
|
||||
// $file = new \Illuminate\Http\UploadedFile($file);
|
||||
$label = urldecode($formFile['label']);
|
||||
$sort_order = $index;//$formFile['sort_order'];
|
||||
$fileName = "file-" . time() . '.' . $file->getClientOriginalExtension();
|
||||
|
@ -372,8 +388,10 @@ class SubmitController extends Controller
|
|||
// 'success' => false,
|
||||
// 'errors' => $validator->errors()->all(),
|
||||
// ], 422);
|
||||
return back()->withInput()
|
||||
->withErrors($validator->errors()->all());
|
||||
// $errors = $validator->errors();
|
||||
return back()->withErrors($validator);
|
||||
// return redirect()->route('publish.workflow.submit.edit', ['id' => $id])->withInput()
|
||||
// ->withErrors($validator);
|
||||
}
|
||||
throw new GeneralException(trans('exceptions.backend.dataset.update_error'));
|
||||
}
|
||||
|
@ -425,6 +443,9 @@ class SubmitController extends Controller
|
|||
if ($dataset->reject_editor_note != null) {
|
||||
$input['reject_editor_note'] = null;
|
||||
}
|
||||
if ($dataset->reviewer_id !== null) {
|
||||
$input['reviewer_id'] = null;
|
||||
}
|
||||
if ($dataset->reject_reviewer_note != null) {
|
||||
$input['reject_reviewer_note'] = null;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class DocumentRequest extends Request
|
|||
public function rules()
|
||||
{
|
||||
return [
|
||||
'type' => 'required|min:5',
|
||||
'type' => 'required|min:3',
|
||||
'server_state' => 'required',
|
||||
// 'author' => 'required|min:4',
|
||||
// 'stock' => 'required|integer',
|
||||
|
|
|
@ -21,7 +21,7 @@ class Coverage extends Model
|
|||
'time_min',
|
||||
'time_max',
|
||||
'time_absolut',
|
||||
'x_min', 'x_max', 'y_min', 'y_max'
|
||||
'x_min', 'x_max', 'y_min', 'y_max',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -35,17 +35,17 @@ class Coverage extends Model
|
|||
'time_absolut',
|
||||
];
|
||||
|
||||
public function setTimeAbsolutAttribute($value)
|
||||
public function setTimeAbsolutAttribute($date)
|
||||
{
|
||||
$this->attributes['time_absolut'] = \Illuminate\Support\Carbon::createFromFormat('d-m-Y H:i:s', $value);
|
||||
$this->attributes['time_absolut'] = empty($date) ? null : \Illuminate\Support\Carbon::createFromFormat('Y-m-d H:i:s', $date);
|
||||
}
|
||||
public function setTimeMinAttribute($value)
|
||||
public function setTimeMinAttribute($date)
|
||||
{
|
||||
$this->attributes['time_min'] = \Illuminate\Support\Carbon::createFromFormat('d-m-Y H:i:s', $value);
|
||||
$this->attributes['time_min'] = empty($date) ? null : \Illuminate\Support\Carbon::createFromFormat('Y-m-d H:i:s', $date);
|
||||
}
|
||||
public function setTimeMaxAttribute($value)
|
||||
public function setTimeMaxAttribute($date)
|
||||
{
|
||||
$this->attributes['time_max'] = \Illuminate\Support\Carbon::createFromFormat('d-m-Y H:i:s', $value);
|
||||
$this->attributes['time_max'] = empty($date) ? null : \Illuminate\Support\Carbon::createFromFormat('Y-m-d H:i:s', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
189
composer.lock
generated
189
composer.lock
generated
|
@ -347,21 +347,22 @@
|
|||
},
|
||||
{
|
||||
"name": "egulias/email-validator",
|
||||
"version": "2.1.13",
|
||||
"version": "2.1.15",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/egulias/EmailValidator.git",
|
||||
"reference": "834593d5900615639208417760ba6a17299e2497"
|
||||
"reference": "e834eea5306d85d67de5a05db5882911d5b29357"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/834593d5900615639208417760ba6a17299e2497",
|
||||
"reference": "834593d5900615639208417760ba6a17299e2497",
|
||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e834eea5306d85d67de5a05db5882911d5b29357",
|
||||
"reference": "e834eea5306d85d67de5a05db5882911d5b29357",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/lexer": "^1.0.1",
|
||||
"php": ">=5.5"
|
||||
"php": ">=5.5",
|
||||
"symfony/polyfill-intl-idn": "^1.10"
|
||||
},
|
||||
"require-dev": {
|
||||
"dominicsayers/isemail": "^3.0.7",
|
||||
|
@ -400,7 +401,7 @@
|
|||
"validation",
|
||||
"validator"
|
||||
],
|
||||
"time": "2019-12-30T08:14:25+00:00"
|
||||
"time": "2020-01-20T21:40:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
|
@ -1192,16 +1193,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "2.28.0",
|
||||
"version": "2.29.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "e2bcbcd43e67ee6101d321d5de916251d2870ca8"
|
||||
"reference": "e509be5bf2d703390e69e14496d9a1168452b0a2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e2bcbcd43e67ee6101d321d5de916251d2870ca8",
|
||||
"reference": "e2bcbcd43e67ee6101d321d5de916251d2870ca8",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e509be5bf2d703390e69e14496d9a1168452b0a2",
|
||||
"reference": "e509be5bf2d703390e69e14496d9a1168452b0a2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1212,7 +1213,7 @@
|
|||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.14 || ^3.0",
|
||||
"kylekatarnls/multi-tester": "^1.1",
|
||||
"phpmd/phpmd": "dev-php-7.1-compatibility",
|
||||
"phpmd/phpmd": "^2.8",
|
||||
"phpstan/phpstan": "^0.11",
|
||||
"phpunit/phpunit": "^7.5 || ^8.0",
|
||||
"squizlabs/php_codesniffer": "^3.4"
|
||||
|
@ -1258,7 +1259,7 @@
|
|||
"datetime",
|
||||
"time"
|
||||
],
|
||||
"time": "2019-12-16T16:30:25+00:00"
|
||||
"time": "2020-01-21T09:36:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
|
@ -1900,16 +1901,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "82437719dab1e6bdd28726af14cb345c2ec816d0"
|
||||
"reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/82437719dab1e6bdd28726af14cb345c2ec816d0",
|
||||
"reference": "82437719dab1e6bdd28726af14cb345c2ec816d0",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f",
|
||||
"reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1972,20 +1973,20 @@
|
|||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-12-17T10:32:23+00:00"
|
||||
"time": "2020-01-10T21:54:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
"version": "v5.0.2",
|
||||
"version": "v5.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/css-selector.git",
|
||||
"reference": "19d29e7098b7b2c3313cb03902ca30f100dcb837"
|
||||
"reference": "ff60c90cb7950b592ebc84ad1289d0345bf24f9f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/19d29e7098b7b2c3313cb03902ca30f100dcb837",
|
||||
"reference": "19d29e7098b7b2c3313cb03902ca30f100dcb837",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/ff60c90cb7950b592ebc84ad1289d0345bf24f9f",
|
||||
"reference": "ff60c90cb7950b592ebc84ad1289d0345bf24f9f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2025,20 +2026,20 @@
|
|||
],
|
||||
"description": "Symfony CssSelector Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-11-18T17:27:11+00:00"
|
||||
"time": "2020-01-04T14:08:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/debug.git",
|
||||
"reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5"
|
||||
"reference": "89c3fd5c299b940333bc6fe9f1b8db1b0912c759"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/5c4c1db977dc70bb3250e1308d3e8c6341aa38f5",
|
||||
"reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/89c3fd5c299b940333bc6fe9f1b8db1b0912c759",
|
||||
"reference": "89c3fd5c299b940333bc6fe9f1b8db1b0912c759",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2081,20 +2082,20 @@
|
|||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-12-16T14:46:54+00:00"
|
||||
"time": "2020-01-08T17:29:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/error-handler",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/error-handler.git",
|
||||
"reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1"
|
||||
"reference": "a59789092e40ad08465dc2cdc55651be503d0d5a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/6d7d7712a6ff5215ec26215672293b154f1db8c1",
|
||||
"reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1",
|
||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/a59789092e40ad08465dc2cdc55651be503d0d5a",
|
||||
"reference": "a59789092e40ad08465dc2cdc55651be503d0d5a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2137,20 +2138,20 @@
|
|||
],
|
||||
"description": "Symfony ErrorHandler Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-12-16T14:46:54+00:00"
|
||||
"time": "2020-01-08T17:29:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "b3c3068a72623287550fe20b84a2b01dcba2686f"
|
||||
"reference": "9e3de195e5bc301704dd6915df55892f6dfc208b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b3c3068a72623287550fe20b84a2b01dcba2686f",
|
||||
"reference": "b3c3068a72623287550fe20b84a2b01dcba2686f",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9e3de195e5bc301704dd6915df55892f6dfc208b",
|
||||
"reference": "9e3de195e5bc301704dd6915df55892f6dfc208b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2207,7 +2208,7 @@
|
|||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-11-28T13:33:56+00:00"
|
||||
"time": "2020-01-10T21:54:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher-contracts",
|
||||
|
@ -2269,16 +2270,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "ce8743441da64c41e2a667b8eb66070444ed911e"
|
||||
"reference": "3a50be43515590faf812fbd7708200aabc327ec3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/ce8743441da64c41e2a667b8eb66070444ed911e",
|
||||
"reference": "ce8743441da64c41e2a667b8eb66070444ed911e",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/3a50be43515590faf812fbd7708200aabc327ec3",
|
||||
"reference": "3a50be43515590faf812fbd7708200aabc327ec3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2314,20 +2315,20 @@
|
|||
],
|
||||
"description": "Symfony Finder Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-11-17T21:56:56+00:00"
|
||||
"time": "2020-01-04T13:00:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62"
|
||||
"reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/fcae1cff5b57b2a9c3aabefeb1527678705ddb62",
|
||||
"reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/c33998709f3fe9b8e27e0277535b07fbf6fde37a",
|
||||
"reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2369,20 +2370,20 @@
|
|||
],
|
||||
"description": "Symfony HttpFoundation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-12-19T15:57:49+00:00"
|
||||
"time": "2020-01-04T13:00:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-kernel.git",
|
||||
"reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2"
|
||||
"reference": "16f2aa3c54b08483fba5375938f60b1ff83b6bd2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/fe310d2e95cd4c356836c8ecb0895a46d97fede2",
|
||||
"reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/16f2aa3c54b08483fba5375938f60b1ff83b6bd2",
|
||||
"reference": "16f2aa3c54b08483fba5375938f60b1ff83b6bd2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2459,20 +2460,20 @@
|
|||
],
|
||||
"description": "Symfony HttpKernel Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-12-19T16:23:40+00:00"
|
||||
"time": "2020-01-21T13:23:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mime",
|
||||
"version": "v5.0.2",
|
||||
"version": "v5.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/mime.git",
|
||||
"reference": "0e6a4ced216e49d457eddcefb61132173a876d79"
|
||||
"reference": "2a3c7fee1f1a0961fa9cf360d5da553d05095e59"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/mime/zipball/0e6a4ced216e49d457eddcefb61132173a876d79",
|
||||
"reference": "0e6a4ced216e49d457eddcefb61132173a876d79",
|
||||
"url": "https://api.github.com/repos/symfony/mime/zipball/2a3c7fee1f1a0961fa9cf360d5da553d05095e59",
|
||||
"reference": "2a3c7fee1f1a0961fa9cf360d5da553d05095e59",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2521,7 +2522,7 @@
|
|||
"mime",
|
||||
"mime-type"
|
||||
],
|
||||
"time": "2019-11-30T14:12:50+00:00"
|
||||
"time": "2020-01-04T14:08:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
|
@ -2876,16 +2877,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b"
|
||||
"reference": "f5697ab4cb14a5deed7473819e63141bf5352c36"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/b84501ad50adb72a94fb460a5b5c91f693e99c9b",
|
||||
"reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/f5697ab4cb14a5deed7473819e63141bf5352c36",
|
||||
"reference": "f5697ab4cb14a5deed7473819e63141bf5352c36",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2921,20 +2922,20 @@
|
|||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-12-06T10:06:46+00:00"
|
||||
"time": "2020-01-09T09:50:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/routing.git",
|
||||
"reference": "628bcafae1b2043969378dcfbf9c196539a38722"
|
||||
"reference": "7bf4e38573728e317b926ca4482ad30470d0e86a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/routing/zipball/628bcafae1b2043969378dcfbf9c196539a38722",
|
||||
"reference": "628bcafae1b2043969378dcfbf9c196539a38722",
|
||||
"url": "https://api.github.com/repos/symfony/routing/zipball/7bf4e38573728e317b926ca4482ad30470d0e86a",
|
||||
"reference": "7bf4e38573728e317b926ca4482ad30470d0e86a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2997,7 +2998,7 @@
|
|||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2019-12-12T12:53:52+00:00"
|
||||
"time": "2020-01-08T17:29:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
|
@ -3059,16 +3060,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "f7669f48a9633bf8139bc026c755e894b7206677"
|
||||
"reference": "f5d2ac46930238b30a9c2f1b17c905f3697d808c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/f7669f48a9633bf8139bc026c755e894b7206677",
|
||||
"reference": "f7669f48a9633bf8139bc026c755e894b7206677",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/f5d2ac46930238b30a9c2f1b17c905f3697d808c",
|
||||
"reference": "f5d2ac46930238b30a9c2f1b17c905f3697d808c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3131,7 +3132,7 @@
|
|||
],
|
||||
"description": "Symfony Translation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-12-12T12:53:52+00:00"
|
||||
"time": "2020-01-15T13:29:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation-contracts",
|
||||
|
@ -3192,16 +3193,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.4.2",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99"
|
||||
"reference": "7cfa470bc3b1887a7b2a47c0a702a84ad614fa92"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/be330f919bdb395d1e0c3f2bfb8948512d6bdd99",
|
||||
"reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/7cfa470bc3b1887a7b2a47c0a702a84ad614fa92",
|
||||
"reference": "7cfa470bc3b1887a7b2a47c0a702a84ad614fa92",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3264,7 +3265,7 @@
|
|||
"debug",
|
||||
"dump"
|
||||
],
|
||||
"time": "2019-12-18T13:41:29+00:00"
|
||||
"time": "2020-01-04T13:00:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tijsverkoyen/css-to-inline-styles",
|
||||
|
@ -3631,16 +3632,16 @@
|
|||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
"version": "1.9.4",
|
||||
"version": "1.9.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||
"reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7"
|
||||
"reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7",
|
||||
"reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
|
||||
"reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3675,7 +3676,7 @@
|
|||
"object",
|
||||
"object graph"
|
||||
],
|
||||
"time": "2019-12-15T19:12:40+00:00"
|
||||
"time": "2020-01-17T21:11:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
|
@ -3932,24 +3933,24 @@
|
|||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.10.1",
|
||||
"version": "v1.10.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc"
|
||||
"reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc",
|
||||
"reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9",
|
||||
"reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"php": "^5.3|^7.0",
|
||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
|
||||
"sebastian/comparator": "^1.2.3|^2.0|^3.0",
|
||||
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
|
||||
"sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
|
||||
"sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^2.5 || ^3.2",
|
||||
|
@ -3991,7 +3992,7 @@
|
|||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2019-12-22T21:05:45+00:00"
|
||||
"time": "2020-01-20T15:57:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
|
@ -4247,16 +4248,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "7.5.19",
|
||||
"version": "7.5.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "4263f76a3fc65385e242ef7357b99f3bed36707e"
|
||||
"reference": "9467db479d1b0487c99733bb1e7944d32deded2c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4263f76a3fc65385e242ef7357b99f3bed36707e",
|
||||
"reference": "4263f76a3fc65385e242ef7357b99f3bed36707e",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c",
|
||||
"reference": "9467db479d1b0487c99733bb1e7944d32deded2c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4327,7 +4328,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2020-01-06T16:53:05+00:00"
|
||||
"time": "2020-01-08T08:45:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit-reverse-lookup",
|
||||
|
|
|
@ -24,7 +24,8 @@ class CreateDocumentsTable extends Migration
|
|||
$table->foreign('project_id')->references('id')->on('projects');
|
||||
$table->enum(
|
||||
'type',
|
||||
['analysisdata', 'interpreteddata', 'measurementdata', 'models', 'rawdata', 'supplementarydata', 'mixedtype']
|
||||
// ['analysisdata', 'interpreteddata', 'measurementdata', 'models', 'rawdata', 'supplementarydata', 'mixedtype']
|
||||
['analysisdata', 'measurementdata', 'monitoring', 'remotesensing', 'gis', 'models', 'mixedtype']
|
||||
);
|
||||
$table->string('language', 10);
|
||||
$table->enum(
|
||||
|
|
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,7 +1,16 @@
|
|||
import { Component, Vue, Watch } from 'vue-property-decorator';
|
||||
import datetime from 'vuejs-datetimepicker';
|
||||
import messagesEN from './strings/messages/en.js';
|
||||
import VeeValidate from 'vee-validate';
|
||||
Vue.use(VeeValidate);
|
||||
// Vue.use(VeeValidate);
|
||||
Vue.use(VeeValidate, {
|
||||
// validity: true
|
||||
locale: 'en',
|
||||
useConstraintAttrs: true,
|
||||
dictionary: {
|
||||
en: { messages: messagesEN }
|
||||
}
|
||||
});
|
||||
import LocationsMap from './components/locations-map.vue';
|
||||
import Dataset from './components/Dataset';
|
||||
import PersonTable from './components/PersonTable.vue';
|
||||
|
@ -30,7 +39,7 @@ export default class EditDataset extends Vue {
|
|||
// language: '',
|
||||
// type: '',
|
||||
// project_id: '',
|
||||
// creating_corporation: 'TETHYS Repository',
|
||||
// creating_corporation: 'TETHYS RDR',
|
||||
// embargo_date: '',
|
||||
// coverage: {
|
||||
// xmin: "",
|
||||
|
@ -71,6 +80,33 @@ export default class EditDataset extends Vue {
|
|||
return filtered;
|
||||
}
|
||||
|
||||
get keywords_length() {
|
||||
return this.form.subjects.length;
|
||||
}
|
||||
|
||||
get files_length() {
|
||||
return this.form.files.length;
|
||||
}
|
||||
|
||||
get isElevationAbsolut() {
|
||||
return this.elevation == "absolut";
|
||||
}
|
||||
get isElevationRange() {
|
||||
return this.elevation == "range";
|
||||
}
|
||||
get isDepthAbsolut() {
|
||||
return this.depth == "absolut";
|
||||
}
|
||||
get isDepthRange() {
|
||||
return this.depth == "range";
|
||||
}
|
||||
get isTimeAbsolut() {
|
||||
return this.time == "absolut";
|
||||
}
|
||||
get isTimeRange() {
|
||||
return this.time == "range";
|
||||
}
|
||||
|
||||
beforeMount() {
|
||||
// this.form = window.Laravel.form;
|
||||
this.realMerge(this.form, window.Laravel.form);
|
||||
|
@ -204,6 +240,58 @@ export default class EditDataset extends Vue {
|
|||
}
|
||||
}
|
||||
|
||||
@Watch('elevation')
|
||||
onElevationChanged(val, oldVal) {
|
||||
if (val == "absolut") {
|
||||
//formData.append('coverage[elevation_absolut]', this.dataset.coverage.elevation_absolut);
|
||||
this.form.coverage.elevation_min = null;
|
||||
this.form.coverage.elevation_max = null;
|
||||
}
|
||||
else if (val == "range") {
|
||||
this.form.coverage.elevation_absolut = null;
|
||||
} else {
|
||||
this.form.coverage.elevation_min = null;
|
||||
this.form.coverage.elevation_max = null;
|
||||
this.form.coverage.elevation_absolut = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Watch('depth')
|
||||
onDepthChanged(val, oldVal) {
|
||||
if (val == "absolut") {
|
||||
this.form.coverage.depth_min = null;
|
||||
this.form.coverage.depth_max = null;
|
||||
}
|
||||
else if (val == "range") {
|
||||
this.form.coverage.depth_absolut = null;
|
||||
} else {
|
||||
this.form.coverage.depth_min = null;
|
||||
this.form.coverage.depth_max = null;
|
||||
this.form.coverage.depth_absolut = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Watch('time')
|
||||
onTimeChanged(val, oldVal) {
|
||||
if (val == "absolut") {
|
||||
this.form.coverage.time_min = null;
|
||||
this.form.coverage.time_max = null;
|
||||
this.$refs.minTimeDatepicker.clearDate();
|
||||
this.$refs.maxTimeDatepicker.clearDate();
|
||||
}
|
||||
else if (val == "range") {
|
||||
this.form.coverage.time_absolut = null;
|
||||
this.$refs.absoluteTimeDatepicker.clearDate();
|
||||
} else {
|
||||
this.form.coverage.time_min = null;
|
||||
this.form.coverage.time_max = null;
|
||||
this.form.coverage.time_absolut = null;
|
||||
this.$refs.minTimeDatepicker.clearDate();
|
||||
this.$refs.maxTimeDatepicker.clearDate();
|
||||
this.$refs.absoluteTimeDatepicker.clearDate();
|
||||
}
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
// var dataform = new FormData();
|
||||
// var dataform = document.getElementById('submitEditForm');
|
||||
|
@ -324,7 +412,17 @@ export default class EditDataset extends Vue {
|
|||
*/
|
||||
for (var i = 0; i < uploadedFiles.length; i++) {
|
||||
let fileName = uploadedFiles[i].name.replace(/\.[^/.]+$/, '');
|
||||
let uploadeFile = { file: uploadedFiles[i], label: fileName, sort_order: 0 };
|
||||
console.log(uploadedFiles[i]);
|
||||
var file = {
|
||||
'lastModified': uploadedFiles[i].lastModified,
|
||||
// 'lastModifiedDate': uploadedFiles[i].lastModifiedDate,
|
||||
'name': uploadedFiles[i].name,
|
||||
'size': uploadedFiles[i].size,
|
||||
'type': uploadedFiles[i].type,
|
||||
'webkitRelativePath': uploadedFiles[i].value,
|
||||
}
|
||||
console.log(file);
|
||||
let uploadeFile = { file: JSON.stringify(file), label: fileName, sort_order: 0 };
|
||||
//this.dataset.files.push(uploadedFiles[i]);
|
||||
this.form.files.push(uploadeFile);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ function initialState() {
|
|||
rights: null,
|
||||
project_id: "",
|
||||
|
||||
creating_corporation: "GBA Repository",
|
||||
creating_corporation: "TETHYS RDR",
|
||||
language: "",
|
||||
embargo_date: "",
|
||||
belongs_to_bibliography: 0,
|
||||
|
@ -70,7 +70,7 @@ export default class Dataset extends Vue {
|
|||
rights = null;
|
||||
project_id = "";
|
||||
|
||||
creating_corporation = "TETHYS Repository";
|
||||
creating_corporation = "TETHYS RDR";
|
||||
language = "";
|
||||
embargo_date = "";
|
||||
belongs_to_bibliography = 0;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
v-model="geolocation.x_min"
|
||||
data-vv-scope="step-2"
|
||||
id="xmin"
|
||||
v-validate="'decimal'"
|
||||
v-validate="'decimal|required'"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
v-model="geolocation.y_min"
|
||||
data-vv-scope="step-2"
|
||||
id="ymin"
|
||||
v-validate="'decimal'"
|
||||
v-validate="'decimal|required'"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
v-model="geolocation.x_max"
|
||||
data-vv-scope="step-2"
|
||||
id="xmax"
|
||||
v-validate="'decimal'"
|
||||
v-validate="'decimal|required'"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
|||
v-model="geolocation.y_max"
|
||||
data-vv-scope="step-2"
|
||||
id="ymax"
|
||||
v-validate="'decimal'"
|
||||
v-validate="'decimal|required'"
|
||||
/>
|
||||
</div>
|
||||
<input type="button" v-if="validBoundingBox" v-on:click="zoomTo" value="validate coordinates" />
|
||||
|
|
|
@ -152,6 +152,9 @@ const app = new Vue({
|
|||
keywords_length() {
|
||||
return this.dataset.subjects.length;
|
||||
},
|
||||
files_length() {
|
||||
return this.dataset.files.length;
|
||||
},
|
||||
isInitial() {
|
||||
return this.currentStatus === STATUS_INITIAL;
|
||||
},
|
||||
|
@ -578,10 +581,15 @@ const app = new Vue({
|
|||
}
|
||||
return true;
|
||||
},
|
||||
submit(status) {
|
||||
submit(scope) {
|
||||
// alert('Submit to blah and show blah and etc.');
|
||||
// save it
|
||||
this.save(status);
|
||||
// this.save(status);
|
||||
this.$validator.validateAll(scope).then((result) => {
|
||||
if (result) {
|
||||
this.save("inprogress");
|
||||
}
|
||||
});
|
||||
},
|
||||
handleTimeExpire() {
|
||||
window.location = '/login';
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
const messages={
|
||||
min_value: (field, num) => field +' cannot be empty! ' + num + ' items are required.',
|
||||
min_value: (field, num) => field
|
||||
+' cannot be empty! '
|
||||
+ num
|
||||
+ (num==1 ? ' item' : ' items')
|
||||
+ (num==1 ? ' is' : ' are')
|
||||
+ ' required.',
|
||||
};
|
||||
export default messages;
|
|
@ -13,12 +13,12 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'analysisdata' => 'Analysis Data',
|
||||
'interpreteddata' => 'Interpreted Data',
|
||||
'measurementdata' => 'Measurement Data',
|
||||
'analysisdata' => 'Analysis',
|
||||
'measurementdata' => 'Measurements',
|
||||
'monitoring' => 'Monitoring',
|
||||
'remotesensing' => 'Remote Sensing',
|
||||
'gis' => 'GIS',
|
||||
'models' => 'Models',
|
||||
'rawdata' => 'Raw Data',
|
||||
'supplementarydata' => 'Supplementary Data',
|
||||
'mixedtype' => 'Mixed Type'
|
||||
//'diplom' => 'Diploma Thesis',
|
||||
//'doctoralthesis' => 'Doctoral Thesis',
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
</div>
|
||||
</div> --}}
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<label for="documentType">Datensatztyp<span class="required" title="Dieses Feld muss ausgefüllt werden."> *</span></label>
|
||||
<label for="documentType">Dataset Type<span class="required" title="Dieses Feld muss ausgefüllt werden."> *</span></label>
|
||||
<div class="select pure-u-23-24" title="Bitte wählen Sie einen Datensatztyp aus der Liste aus.">
|
||||
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --', 'v-model' =>
|
||||
'dataset.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-1']) !!}
|
||||
|
@ -83,7 +83,7 @@
|
|||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('TitleMain', 'Main Title ') !!}
|
||||
{!! Form::text('TitleMain[Value]', null, ['class' => 'pure-u-23-24', 'v-model'
|
||||
=> 'dataset.title_main.value', "v-validate" => "'required|min:4'", "data-vv-as" => "Main Title", 'data-vv-scope' => 'step-1']) !!}
|
||||
=> 'dataset.title_main.value', "v-validate" => "'required|min:4|max:255'", "data-vv-as" => "Main Title", 'data-vv-scope' => 'step-1']) !!}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('TitleLanguage', 'Title Language..') !!}
|
||||
|
@ -110,7 +110,7 @@
|
|||
<tbody>
|
||||
<tr v-for="(item, index) in dataset.titles">
|
||||
<td>
|
||||
<input name="Title" class="form-control" placeholder="[TITLE]" v-model="item.value" data-vv-as="Additional Title" v-validate="'required|min:4'" data-vv-scope="step-1" />
|
||||
<input name="Title" class="form-control" placeholder="[TITLE]" v-model="item.value" data-vv-as="Additional Title" v-validate="'required|min:4|max:255'" data-vv-scope="step-1" />
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('Title[Type]', $titleTypes, null,
|
||||
|
@ -136,7 +136,7 @@
|
|||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('TitleAbstract', 'Main Abstract ') !!}
|
||||
{{ Form::textarea('TitleAbstract[Value]', null, ['class' => 'pure-u-23-24',
|
||||
'size' => '70x6', 'v-model' => 'dataset.abstract_main.value', "v-validate" => "'required|min:4'",
|
||||
'size' => '70x6', 'v-model' => 'dataset.abstract_main.value', "v-validate" => "'required|min:4|max:2500'",
|
||||
"data-vv-as" => "Main Abstract", 'data-vv-scope' => 'step-1']) }}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
|
@ -164,7 +164,7 @@
|
|||
<tbody>
|
||||
<tr v-for="(item, index) in dataset.abstracts">
|
||||
<td>
|
||||
<textarea rows="3" cols="40" name="Description[Value]" class="form-control" placeholder="[DESCRIPTION]" v-model="item.value" data-vv-as="Additional Description" v-validate="'required|min:4'" data-vv-scope="step-1"></textarea>
|
||||
<textarea rows="3" cols="40" name="Description[Value]" class="form-control" placeholder="[DESCRIPTION]" v-model="item.value" data-vv-as="Additional Description" v-validate="'required|min:4|max:2500'" data-vv-scope="step-1"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('Description[Type]', $descriptionTypes, null,
|
||||
|
@ -294,7 +294,7 @@
|
|||
<div v-if="step === 2 && isInitial" data-vv-scope="step-2">
|
||||
<h1>Step Two: Recommended Elements</h1>
|
||||
|
||||
{{-- <fieldset id="fieldset-project">
|
||||
<fieldset id="fieldset-project">
|
||||
<legend>Project</legend>
|
||||
<div class="pure-g">
|
||||
|
||||
|
@ -308,7 +308,7 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset> --}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-dates">
|
||||
<legend>Date(s)</legend>
|
||||
|
@ -424,11 +424,11 @@
|
|||
<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)
|
||||
absolut time (yyyy-MM-dd 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)
|
||||
time range (yyyy-MM-dd 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">
|
||||
|
@ -441,7 +441,7 @@
|
|||
{{-- {!! 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="DD-MM-YYYY h:i:s" v-model='dataset.coverage.time_absolut' ></datetime>
|
||||
<datetime name="time_absolut" v-validate="this.isTimeAbsolut ? 'required|date_format:yyyy-MM-dd HH:mm:ss' : '' " data-vv-scope="step-2" format="YYYY-MM-DD h:i:s" v-model='dataset.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">
|
||||
|
@ -449,14 +449,14 @@
|
|||
{{-- {!! 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='dataset.coverage.time_min' ></datetime>
|
||||
<datetime name="time_min" v-validate="this.isTimeRange ? 'required|date_format:dd-MM-yyyy HH:mm:ss' : '' " data-vv-scope="step-2" format="YYYY-MM-DD h:i:s" v-model='dataset.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='dataset.coverage.time_max' ></datetime>
|
||||
<datetime name="time_max" v-validate="this.isTimeRange ? 'required|date_format:dd-MM-yyyy HH:mm:ss' : '' " data-vv-scope="step-2" format="YYYY-MM-DD h:i:s" v-model='dataset.coverage.time_max' ></datetime>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -607,6 +607,7 @@
|
|||
<h1>File Upload</h1>
|
||||
|
||||
<div class="dropbox">
|
||||
<input type="hidden" v-validate:files_length="'min_value:1'" data-vv-scope="step-4" data-vv-as="files list" name="files_list">
|
||||
<input type="file" multiple name="files" v-bind:disabled="isSaving" @change="filesChange($event.target.name, $event.target.files)"
|
||||
class="input-file" data-vv-scope="step-4">
|
||||
<p v-if="isInitial">
|
||||
|
@ -648,10 +649,16 @@
|
|||
<i class="fa fa-arrow-left"></i>
|
||||
<span>Zurück</span>
|
||||
</button>
|
||||
<button @click.prevent="submit('inprogress')" class="pure-button button-small">
|
||||
<button @click.prevent="submit('step-4')" class="pure-button button-small" v-bind:disabled="errors.any()">
|
||||
<i class="fa fa-save"></i>
|
||||
<span>Save Dataset</span>
|
||||
</button>
|
||||
<div v-if="errors.items.length > 0">
|
||||
<b>Please correct the following error(s):</b>
|
||||
<ul class="alert validation-summary-errors">
|
||||
<li style="margin-left:5px;" v-for="error in errors.items">@{{ error.msg }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{-- <button @click.prevent="submit('unpublished')" class="pure-button button-small">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Release Dataset</span>
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
<fieldset id="fieldset-State">
|
||||
<legend>State & notes</legend>
|
||||
<div class="pure-g">
|
||||
@if($dataset->reject_reviewer_note)
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('reject_reviewer_note', 'reviewer reject note..') !!}
|
||||
{{-- {!! Form::select('server_state', Config::get('enums.server_states'), null, ['id' => 'server_state', 'placeholder' => '-- select server state --']) !!} --}}
|
||||
{!! Form::textarea('reject_reviewer_note', null, ['class'=>'pure-u-23-24','readonly', 'v-model' =>
|
||||
'form.reject_reviewer_note']) !!}
|
||||
</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 id="fieldset-General">
|
||||
<legend>General</legend>
|
||||
<div class="pure-g">
|
||||
|
@ -5,8 +25,8 @@
|
|||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('Language', 'Language..') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select('Language', $languages, null, ['placeholder' => '[language]', 'v-model' =>
|
||||
'dataset.language', "v-validate" => "'required'"]) !!}
|
||||
{!! Form::select('language', $languages, null, ['placeholder' => '[language]', 'v-model' =>
|
||||
'form.language', "data-vv-as" => "Language", "v-validate" => "'required'"]) !!}
|
||||
</div>
|
||||
<small id="languageHelp" class="pure-form-message-inline">select dataset main language</small>
|
||||
</div>
|
||||
|
@ -15,162 +35,136 @@
|
|||
{!! Form::label('type', 'Type..') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select('type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type
|
||||
--']) !!}
|
||||
--',
|
||||
'v-model' => 'form.type', "v-validate" => "'required'"]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('project_id', 'Project..') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select('project_id', $projects, null, ['id' => 'project_id', 'placeholder' => '--no
|
||||
project--']) !!}
|
||||
{{-- {!! Form::select('project_id', $projects, null, ['id' => 'project_id', 'placeholder' => '--no
|
||||
project--', 'v-model' => 'form.project_id']) !!} --}}
|
||||
<select name="project_id" v-model="form.project_id">
|
||||
<option :value="null" selected hidden disabled>--no project--</option>
|
||||
<option v-for="(item, key) in projects" :value="key">@{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<small id="projectHelp" class="pure-form-message-inline">project is optional</small>
|
||||
</div>
|
||||
|
||||
<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']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('reject_reviewer_note', 'reviewer reject note..') !!}
|
||||
{{-- {!! Form::select('server_state', Config::get('enums.server_states'), null, ['id' => 'server_state', 'placeholder' => '-- select server state --']) !!} --}}
|
||||
{!! Form::textarea('reject_reviewer_note', null, ['class'=>'pure-u-23-24','readonly']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('embargo_date', 'Embargo Date') !!}
|
||||
{!! Form::date('embargo_date', null, ['placeholder' => date('y-m-d'), 'class' => 'pure-u-23-24']) !!}
|
||||
<small id="projectHelp" class="pure-form-message-inline">embargo_date is optional</small>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('creating_corporation', 'Creating Corporation') !!}
|
||||
{!! Form::text('creating_corporation', null, ['class' =>
|
||||
'pure-u-23-24', 'v-model' => 'dataset.creating_corporation', "v-validate" => "'required'", 'data-vv-scope'
|
||||
=> 'step-1']) !!}
|
||||
{!! Form::text('creating_corporation', null, ['readonly', 'class' =>
|
||||
'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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-geolocation">
|
||||
<legend>Coverage: Geolocation, Elevation, Depth, Time</legend>
|
||||
<fieldset id="fieldset-creator">
|
||||
<legend>Creator(s)</legend>
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('xmin', 'xmin: ') !!}
|
||||
{!! Form::text('coverage[xmin]', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.xmin']) !!}
|
||||
<my-autocomplete title="searching active person table" v-on:person="onAddAuthor"></my-autocomplete>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('ymin', 'ymin: ') !!}
|
||||
{!! Form::text('coverage[ymin]', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.ymin']) !!}
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('xmax', 'xmax: ') !!}
|
||||
{!! Form::text('coverage[xmax]', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.xmax']) !!}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('ymax', 'ymax: ') !!}
|
||||
{!! Form::text('coverage[ymax]', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.ymax']) !!}
|
||||
</div>
|
||||
|
||||
@if (isset($dataset->elevation_absolut))
|
||||
<div v-show="elevation === 'absolut'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('elevation_absolut', 'elevation absolut: ') !!}
|
||||
{!! Form::text('coverage[elevation_absolut]', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.elevation_absolut', 'data-vv-scope' => 'step-2',
|
||||
"v-validate" => "this.isElevationAbsolut ? 'required|integer' : '' " ]) !!}
|
||||
</div>
|
||||
@elseif (isset($dataset->elevation_min) && isset($dataset->elevation_max))
|
||||
<div v-show="elevation === 'range'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('elevation_min', 'elevation min: ') !!}
|
||||
{!! Form::text('coverage[elevation_min]', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'dataset.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('coverage[elevation_max]', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.elevation_max', 'data-vv-scope' => 'step-2',
|
||||
"v-validate" => "this.isElevationRange ? 'required|integer' : '' "]) !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (isset($dataset->depth_absolut))
|
||||
<div v-show="elevation === 'absolut'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('depth_absolut', 'depth absolut: ') !!}
|
||||
{!! Form::text('coverage[depth_absolut]', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.depth_absolut', 'data-vv-scope' => 'step-2',
|
||||
"v-validate" => "this.isElevationAbsolut ? 'required|integer' : '' " ]) !!}
|
||||
</div>
|
||||
@elseif (isset($dataset->elevation_min) && isset($dataset->elevation_max))
|
||||
<div v-show="elevation === 'range'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('depth_min', 'depth min: ') !!}
|
||||
{!! Form::text('coverage[depth_min]', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.depth_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('depth_max', 'depth max: ') !!}
|
||||
{!! Form::text('coverage[depth_max]', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.depth_max', 'data-vv-scope' => 'step-2',
|
||||
"v-validate" => "this.isElevationRange ? 'required|integer' : '' "]) !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (isset($dataset->depth_absolut))
|
||||
<div v-show="elevation === 'absolut'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('time_absolut', 'time absolut: ') !!}
|
||||
{!! Form::text('coverage[time_absolut]', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.time_absolut', 'data-vv-scope' => 'step-2',
|
||||
"v-validate" => "this.isElevationAbsolut ? 'required|integer' : '' " ]) !!}
|
||||
</div>
|
||||
@elseif (isset($dataset->elevation_min) && isset($dataset->elevation_max))
|
||||
<div v-show="elevation === 'range'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('time_min', 'time min: ') !!}
|
||||
{!! Form::text('coverage[time_min]', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.time_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('time_max', 'time max: ') !!}
|
||||
{!! Form::text('coverage[time_max]', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.time_max', 'data-vv-scope' => 'step-2',
|
||||
"v-validate" => "this.isElevationRange ? 'required|integer' : '' "]) !!}
|
||||
</div>
|
||||
@endif,
|
||||
{{-- {!! Form::label('additionalCreators', 'Add additional creator(s) if creator is not in database') !!}
|
||||
<button class="pure-button button-small" @click.prevent="addNewAuthor()">+</button> --}}
|
||||
</div>
|
||||
<input name="authors" v-model="form.authors" type="hidden" class="form-check-input" v-validate="'required'"
|
||||
data-vv-as="Author">
|
||||
<person-table name="authors" v-bind:heading="'authors'" v-bind:personlist="form.authors"></person-table>
|
||||
<person-table name="contributors" v-bind:heading="'contributors'" v-bind:personlist="form.contributors">
|
||||
</person-table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-titles">
|
||||
<legend>Title</legend>
|
||||
<div class="pure-g">
|
||||
<div>
|
||||
|
||||
@foreach($dataset->titles as $key => $title)
|
||||
{{-- @foreach($dataset->titles as $key => $title)
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{{ Form::label('title', 'Title ' .($key+1).':') }}
|
||||
<!-- Notice this is an array now: -->
|
||||
{{ 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
|
||||
|
||||
@endforeach --}}
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<label name="TitleMain">Add additional title(s) </label>
|
||||
<button class="pure-button button-small" @click.prevent="addTitle()"><i class="fas fa-plus-circle"></i></button>
|
||||
</div>
|
||||
<table v-if="form.titles.length" class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20px;">Title</th>
|
||||
<th>Type</th>
|
||||
<th>Language</th>
|
||||
<th style="width: 130px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(title, index) in form.titles">
|
||||
<td>
|
||||
<input v-bind:name="'titles['+index+'][id]'" readonly class="form-control" v-model="title.id" hidden />
|
||||
<input type="text" :id="'titles['+index+'][value]'" :name="'titles['+index+'][value]'"
|
||||
v-validate="'required|min:4|max:255'" class="form-control" v-model="title.value">
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="title.type == 'Main'">
|
||||
<input v-bind:name="'titles['+index+'][type]'" v-model="title.type" class="form-control"
|
||||
v-validate="'required'" v-bind:readonly="title.type == 'Main'">
|
||||
</template>
|
||||
<template v-else>
|
||||
<select type="text" :id="'titles['+index+'][type]'" :name="'titles['+index+'][type]'"
|
||||
class="form-control"
|
||||
v-validate="{required: true}"
|
||||
v-model="title.type" v-bind:readonly="title.type == 'Main'">
|
||||
<option v-for="option in remainingTitleTypes" :value='option'
|
||||
:disabled="title.type == 'Main'">
|
||||
@{{ option }}
|
||||
</option>
|
||||
</select>
|
||||
</template>
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="title.type == 'Main'">
|
||||
<input v-bind:name="'titles['+index+'][language]'" v-model="title.language"
|
||||
class="form-control" v-validate="'required'" v-bind:readonly="title.type == 'Main'">
|
||||
</template>
|
||||
<template v-else>
|
||||
<select type="text" :id="'titles['+index+'][language]'"
|
||||
:name="'titles['+index+'][language]'" class="form-control"
|
||||
v-validate="{required: true, translatedLanguage: [form.language, title.type]}"
|
||||
v-model="title.language" v-bind:readonly="title.type == 'Main'">
|
||||
<option v-for="option in languages" :value='option'>
|
||||
@{{ option }}
|
||||
</option>
|
||||
</select>
|
||||
</template>
|
||||
</td>
|
||||
<td>
|
||||
<button v-if="title.id == undefined" class="pure-button button-small is-warning"
|
||||
@click.prevent="removeTitle(index)">
|
||||
<i class="fa fa-trash"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-abstracts">
|
||||
<legend>Abstract</legend>
|
||||
<div class="pure-g">
|
||||
<div>
|
||||
|
||||
@foreach($dataset->abstracts as $key => $abstract)
|
||||
{{-- @foreach($dataset->abstracts as $key => $abstract)
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{{ Form::label('abstract', 'Abstract ' .($key+1).':') }}
|
||||
<!-- Notice this is an array now: -->
|
||||
|
@ -180,7 +174,253 @@
|
|||
{{ Form::label('language', 'Language..') }}
|
||||
{{ Form::text('abstracts['.$abstract->id.'][language]', $abstract->language, ['placeholder' => '--no language--', 'class' => 'pure-u-23-24', 'readonly']) }}
|
||||
</div>
|
||||
@endforeach
|
||||
@endforeach --}}
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<label name="DescriptionMain">Add additional abstract(s) </label>
|
||||
<button class="pure-button button-small" @click.prevent="addDescription()"><i
|
||||
class="fas fa-plus-circle"></i></button>
|
||||
</div>
|
||||
<table v-if="form.abstracts.length" class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20px;">Value</th>
|
||||
<th>Type</th>
|
||||
<th>Language</th>
|
||||
<th style="width: 130px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(abstract, index) in form.abstracts">
|
||||
<td>
|
||||
<input v-bind:name="'abstracts[' + index +'][id]'" readonly class="form-control" v-model="abstract.id" hidden />
|
||||
|
||||
<input type="text" :id="'abstracts['+ index +'][value]'"
|
||||
:name="'abstracts['+index+'][value]'" v-validate="'required|min:4|max:2500'" v-model="abstract.value"
|
||||
class="form-control">
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="abstract.type == 'Abstract'">
|
||||
<input v-bind:name="'abstracts['+ index +'][type]'" v-model="abstract.type"
|
||||
class="form-control" v-validate="'required'" v-bind:readonly="abstract.type == 'Abstract'">
|
||||
</template>
|
||||
<template v-else>
|
||||
<select type="text" :id="'abstracts['+ index +'][type]'"
|
||||
:name="'abstracts['+ index +'][type]'" class="form-control"
|
||||
v-validate="{required: true}"
|
||||
v-model="abstract.type" v-bind:readonly="abstract.type == 'Abstract'">
|
||||
<option v-for="option in descriptionTypes" :value='option'>
|
||||
@{{ option }}
|
||||
</option>
|
||||
</select>
|
||||
</template>
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="abstract.type == 'Abstract'">
|
||||
<input v-bind:name="'abstracts['+index+'][language]'" v-model="abstract.language"
|
||||
class="form-control" v-validate="'required'" v-bind:readonly="abstract.type == 'Abstract'">
|
||||
</template>
|
||||
<template v-else>
|
||||
<select type="text" :id="'abstracts['+index+'][language]'"
|
||||
:name="'abstracts['+index+'][language]'" class="form-control"
|
||||
v-validate="{required: true, translatedLanguage: [form.language, abstract.type]}"
|
||||
v-model="abstract.language" v-bind:readonly="abstract.type == 'Abstract'">
|
||||
<option v-for="option in languages" :value='option'>
|
||||
@{{ option }}
|
||||
</option>
|
||||
</select>
|
||||
</template>
|
||||
</td>
|
||||
<td>
|
||||
<button v-if="abstract.id == undefined" class="pure-button button-small is-warning"
|
||||
@click.prevent="removeDescription(index)">
|
||||
<i class="fa fa-trash"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-dates">
|
||||
<legend>Date(s)</legend>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('embargo_date', 'Embargo Date') !!}
|
||||
{!! Form::date('embargo_date', null, ['placeholder' => date('y-m-d'), 'class'
|
||||
=> 'pure-u-23-24', 'v-model' => 'form.embargo_date']) !!}
|
||||
<small id="projectHelp" class="pure-form-message-inline">EmbargoDate is optional</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-geolocation">
|
||||
<legend>Geo Location</legend>
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-1 pure-u-lg-1 pure-div">
|
||||
<locations-map v-bind:geolocation="form.coverage"></locations-map>
|
||||
</div>
|
||||
</div>
|
||||
</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',
|
||||
"v-validate" => "this.isElevationAbsolut ? 'required|integer' : '' " ]) !!} --}}
|
||||
<input
|
||||
name="coverage[elevation_absolut]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.elevation_absolut"
|
||||
id="elevation_absolut"
|
||||
v-validate.immediate="{ required: isElevationAbsolut, integer: true}"
|
||||
/>
|
||||
</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',
|
||||
"v-validate" => "this.isElevationRange ? 'required|integer' : '' "]) !!} --}}
|
||||
<input
|
||||
name="coverage[elevation_min]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.elevation_min"
|
||||
id="elevation_min"
|
||||
v-validate.immediate="{ required: this.isElevationRange, integer: true}"
|
||||
/>
|
||||
</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',
|
||||
"v-validate" => "this.isElevationRange ? 'required|integer' : '' "]) !!} --}}
|
||||
<input
|
||||
name="coverage[elevation_max]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.elevation_max"
|
||||
id="elevation_max"
|
||||
v-validate.immediate="{ required: this.isElevationRange, integer: true}"
|
||||
/>
|
||||
</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: ') !!}
|
||||
<input
|
||||
name="coverage[depth_absolut]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.depth_absolut"
|
||||
id="depth_absolut"
|
||||
v-validate.immediate="{ required: this.isDepthAbsolut, integer: true}"
|
||||
/>
|
||||
</div>
|
||||
<div v-show="depth === 'range'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('depth_min', 'depth min: ') !!}
|
||||
<input
|
||||
name="coverage[depth_min]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.depth_min"
|
||||
id="depth_min"
|
||||
v-validate.immediate="{ required: this.isDepthRange, integer: true}"
|
||||
/>
|
||||
</div>
|
||||
<div v-show="depth === 'range'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('depth_max', 'depth max: ') !!}
|
||||
<input
|
||||
name="coverage[depth_max]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.depth_max"
|
||||
id="depth_max"
|
||||
v-validate.immediate="{ required: this.isDepthRange, integer: true}"
|
||||
/>
|
||||
</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 (yyyy-MM-dd 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 (yyyy-MM-dd 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 ref="absoluteTimeDatepicker" name="coverage[time_absolut]"
|
||||
v-validate.immediate="this.isTimeAbsolut ? 'required' : '' "
|
||||
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 ref="minTimeDatepicker" name="coverage[time_min]"
|
||||
v-validate.immediate="this.isTimeRange ? 'required' : '' "
|
||||
format="YYYY-MM-DD 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 ref="maxTimeDatepicker" name="coverage[time_max]"
|
||||
v-validate.immediate="this.isTimeRange ? 'required' : '' "
|
||||
format="YYYY-MM-DD h:i:s" v-model='form.coverage.time_max'></datetime>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -188,32 +428,45 @@
|
|||
<fieldset id="fieldset-licenses">
|
||||
<legend>Licenses</legend>
|
||||
|
||||
{{-- <div class="form-group">
|
||||
{!! Form::label('licenses[]', 'Licenses..') !!}
|
||||
{!! Form::select('licenses[]', $options, array_pluck($dataset->licenses, 'id'), ['multiple' ]) !!}
|
||||
</div> --}}
|
||||
|
||||
<div class="pure-control-group checkboxlist">
|
||||
@foreach ($options as $license)
|
||||
|
||||
{{-- @foreach ($licenses as $license)
|
||||
<label for={{ "license". $license->id }} class="pure-checkbox">
|
||||
<input name="licenses[]" value={{ $license->id }}
|
||||
{{ (in_array($license->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox"
|
||||
class="form-check-input">
|
||||
{{ $license->name_long }}
|
||||
@if ($loop->first)
|
||||
<input name="licenses" value={{ $license->id }} v-model="form.checkedLicenses"
|
||||
{{ (in_array($license->id, $checkeds)) ? 'checked=checked' : '' }} type="radio" class="form-check-input"
|
||||
v-validate="'required'" data-vv-as="Licence">
|
||||
<a href="{{ $license->link_licence }}" target="_blank">{{ $license->name_long }}</a>
|
||||
@else
|
||||
<input name="licenses" value={{ $license->id }} v-model="form.checkedLicenses"
|
||||
{{ (in_array($license->id, $checkeds)) ? 'checked=checked' : '' }} type="radio" class="form-check-input">
|
||||
<a href="{{ $license->link_licence }}" target="_blank">{{ $license->name_long }}</a>
|
||||
@endif
|
||||
</label>
|
||||
@endforeach --}}
|
||||
<br>
|
||||
{{-- <span>Checked license: @{{ dataset.checkedLicenses }}</span> --}}
|
||||
|
||||
<template v-for="(license, index) in licenses">
|
||||
<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'">
|
||||
<a :href="license.link_licence" target="_blank">@{{ license.name_long }}</a>
|
||||
</label>
|
||||
</template>
|
||||
{{-- <span>old checkeds: @{{ checkeds }}</span> --}}
|
||||
|
||||
<!--{!! Form::checkbox('licenses[]', $license->id, in_array($license->id, $checkeds) ? true : false) !!}
|
||||
{!! Form::label('license' . $license->id, $license->name_long) !!}-->
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-references">
|
||||
<legend>Dataset References</legend>
|
||||
<label name="ReferenceLabel">Add Reference </label>
|
||||
<button class="pure-button button-small" @click.prevent="addReference()"><i class="fas fa-plus-circle"></i></button>
|
||||
{{-- <table class="table table-hover" v-if="dataset.keywords.length"> --}}
|
||||
@if ($dataset->references->count() > 0)
|
||||
<table id="references" class="pure-table pure-table-horizontal">
|
||||
{{-- @if ($dataset->references->count() > 0) --}}
|
||||
<table v-show="form.references.length" id="references" class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20px;">Reference value</th>
|
||||
|
@ -224,40 +477,62 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- <tr v-for="(item, index) in dataset.keywords"> --}}
|
||||
@foreach($dataset->references as $key => $reference)
|
||||
<tr>
|
||||
<td>
|
||||
{{ Form::text('references['.$reference->id.'][value]', $reference->value, ['class' => 'form-control', 'placeholder' => '[REFERENCE VALUE]']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::text('references['.$reference->id.'][label]', $reference->label, ['class' => 'form-control', 'placeholder' => '[REFERENCE LABEL]']) }}
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('references['.$reference->id.'][type]', $referenceTypes, $reference->type,
|
||||
['placeholder' => '[reference type]', 'v-model' =>
|
||||
'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('references['.$reference->id.'][relation]', $relationTypes, $reference->relation,
|
||||
['placeholder' => '[relation type]', 'v-model' =>
|
||||
'item.relation', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
|
||||
</td>
|
||||
<td>
|
||||
|
||||
{{-- @foreach($dataset->references as $key => $reference) --}}
|
||||
<tr v-for="(item, index) in form.references">
|
||||
<td>
|
||||
<input v-bind:name="'references[' + index +'][id]'" readonly class="form-control" v-model="item.id" hidden />
|
||||
|
||||
<input v-bind:name="'references[' + index +'][value]'" class="form-control"
|
||||
placeholder="[REFERENCE VALUE]" v-model="item.value" v-validate="'required'" />
|
||||
</td>
|
||||
<td>
|
||||
{{-- {{ Form::text('references['.$reference->id.'][label]', $reference->label, ['class' => 'form-control', 'placeholder' => '[REFERENCE LABEL]']) }}
|
||||
--}}
|
||||
<input v-bind:name="'references[' + index +'][label]'" class="form-control"
|
||||
placeholder="[REFERENCE LABEL]" v-model="item.label" v-validate="'required'" />
|
||||
</td>
|
||||
<td>
|
||||
{{-- {!! Form::select('references['.$reference->id.'][type]', $referenceTypes, $reference->type,
|
||||
['placeholder' => '[REFERENCE TYPE]', 'v-model' => 'item.type', "v-validate" => "'required'"]) !!} --}}
|
||||
<select v-bind:name="'references[' + index +'][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>
|
||||
{{-- {!! Form::select('references['.$reference->id.'][relation]', $relationTypes, $reference->relation,
|
||||
['placeholder' => '[REFERENCE TYPE]', 'v-model' => 'item.relation', "v-validate" => "'required'"]) !!} --}}
|
||||
<select v-bind:name="'references[' + index +'][relation]'" v-model="item.relation"
|
||||
class="form-control" v-validate="'required'">
|
||||
<option v-for="option in relationTypes" :value='option'>
|
||||
@{{ option }}
|
||||
</option>
|
||||
</select>
|
||||
</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>
|
||||
</tr>
|
||||
@endforeach
|
||||
{{-- @endforeach --}}
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
{{-- @else
|
||||
<span>...there are no references</span>
|
||||
@endif
|
||||
@endif --}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-keywords">
|
||||
<legend>Dataset Keywords</legend>
|
||||
{{-- <table class="table table-hover" v-if="dataset.keywords.length"> --}}
|
||||
<label name="SubjectLabel">Add Keyword </label>
|
||||
<input type="hidden" v-validate:keywords_length="'min_value:3'" data-vv-as="keyword list" name="keywords_list">
|
||||
<button class="pure-button button-small" @click.prevent="addKeyword()"><i class="fas fa-plus-circle"></i></button>
|
||||
@if ($dataset->subjects->count() > 0)
|
||||
<table id="keywords" class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
|
@ -268,23 +543,35 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- <tr v-for="(item, index) in dataset.keywords"> --}}
|
||||
@foreach($dataset->subjects as $key => $keyword)
|
||||
<tr>
|
||||
<tr v-for="(item, index) in form.subjects" :key="item.id">
|
||||
|
||||
<td>
|
||||
{{-- <input name="Keyword Value" class="form-control" placeholder="[KEYWORD VALUE]" v-model="item.value" v-validate="'required'"
|
||||
data-vv-scope="step-2" /> --}}
|
||||
{{ Form::text('keywords['.$keyword->id.'][value]', $keyword->value, ['class' => 'form-control', 'placeholder' => '[KEYWORD VALUE]']) }}
|
||||
<input v-bind:name="'subjects[' + index +'][id]'" readonly class="form-control" v-model="item.id" hidden />
|
||||
<input v-bind:name="'subjects[' + index +'][value]'" class="form-control"
|
||||
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>
|
||||
{!! Form::select('keywords['.$keyword->id.'][type]', $keywordTypes, $keyword->type, ['placeholder'
|
||||
=> '[keyword type]', 'v-model' => 'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
|
||||
{{-- {!! Form::select('keywords['.$keyword->id.'][type]', $keywordTypes, $keyword->type, ['placeholder'
|
||||
=> '[keyword type]', 'v-model' =>
|
||||
'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!} --}}
|
||||
{{-- <select v-bind:name="'keywords[' + item.id +'][type]'" v-model="item.type" class="form-control">
|
||||
<option value="" disabled>[keyword type]</option>
|
||||
@foreach($keywordTypes as $option)
|
||||
<option value="{{ $option }}">{{ $option }}</option>
|
||||
@endforeach
|
||||
</select> --}}
|
||||
<input v-bind:name="'subjects[' + index +'][type]'" readonly class="form-control"
|
||||
placeholder="[KEYWORD TYPE]" v-model="item.type" v-validate="'required'" />
|
||||
</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>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
|
@ -294,37 +581,76 @@
|
|||
|
||||
<fieldset id="fieldset-files">
|
||||
<legend>Files</legend>
|
||||
|
||||
{{-- <h3>File Upload</h3>--}}
|
||||
{{-- <div class="dropbox"> --}}
|
||||
<div>
|
||||
<input type="hidden" v-validate:files_length="'min_value:1'" data-vv-scope="step-4" data-vv-as="files list" name="files_list">
|
||||
{{-- <input type="file" name="uploads[]" multiple @change="filesChange($event.target.name, $event.target.files)" class="input-file">
|
||||
<p>
|
||||
Drag your file(s) here to begin<br> or click to browse
|
||||
</p> --}}
|
||||
</div>
|
||||
|
||||
<table id="items" class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Path Name</th>
|
||||
<th>ID</th>
|
||||
<th>Label</th>
|
||||
{{-- <th>New</th> --}}
|
||||
<th style="width: 130px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($dataset->files as $key => $file)
|
||||
<tr>
|
||||
<tr v-for="(file, index) in form.files" :key="file.id">
|
||||
<td>
|
||||
@if($file->exists() === true)
|
||||
@{{ index +1 }}
|
||||
</td>
|
||||
<td>
|
||||
{{-- @if($file->exists() === true)
|
||||
<a href="{{ route('settings.file.download', ['id' => $file->id]) }}"> {{ $file->path_name }} </a>
|
||||
@else
|
||||
<span class="alert">missing file: {{ $file->path_name }}</span>
|
||||
@endif
|
||||
@endif --}}
|
||||
<a v-if="file.id != undefined" v-bind:href=" '/publish/workflow/editor/file/download/' + file.id ">
|
||||
@{{ file.path_name }}
|
||||
</a>
|
||||
<span v-else> File name will be generated</span>
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{{-- {{ $file->label }} --}}
|
||||
{{ Form::text('files['.$file->id.'][label]', $file->label, ['class' => 'form-control', 'placeholder' => '[FILE LABEL]']) }}
|
||||
<input v-bind:name="'files[' + index +'][id]'" readonly class="form-control" v-model="file.id" />
|
||||
</td>
|
||||
<td>
|
||||
<input v-bind:name="'files['+index+'][label]'" class="form-control" placeholder="[FILE LABEL]"
|
||||
v-model="file.label" v-validate="'required'" />
|
||||
</td>
|
||||
{{-- <td>
|
||||
<i v-if="file.file" class="fas fa-file-upload"></i>
|
||||
<input type="text" v-bind:name="'files['+index+'][file]'" class="form-control" v-model="file.file"/>
|
||||
</td> --}}
|
||||
<td>
|
||||
<button v-if="file.id == undefined" class="pure-button button-small is-warning"
|
||||
@click.prevent="removeFile(index)">
|
||||
<i class="fa fa-trash"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
<button type="submit" class="pure-button button-small">
|
||||
<i class="fa fa-save"></i>
|
||||
<button :disabled="errors.any()" type="submit" class="pure-button button-small">
|
||||
<i class="fas fa-save"></i>
|
||||
<span>{!! $submitButtonText !!}</span>
|
||||
</button>
|
||||
</div>
|
|
@ -7,6 +7,17 @@
|
|||
</h3>
|
||||
</div>
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-3-3">
|
||||
|
@ -16,13 +27,41 @@
|
|||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div id="app1">
|
||||
{!! Form::model($dataset, ['method' => 'POST', 'route' => ['publish.workflow.editor.update', $dataset->id], 'class' => 'pure-form', 'enctype' => 'multipart/form-data' ]) !!}
|
||||
@include('workflow/editor/_form', ['submitButtonText' => 'Edit Dataset', 'bookLabel' => 'Edit Dataset.'])
|
||||
@include('errors._errors')
|
||||
{{-- @include('errors._errors') --}}
|
||||
|
||||
<!-- client errors -->
|
||||
<div v-if="errors.items.length > 0">
|
||||
<b>Please correct the following error(s):</b>
|
||||
<ul class="alert validation-summary-errors">
|
||||
<li style="margin-left:5px;" v-for="error in errors.items">@{{ error.msg }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('after-scripts')
|
||||
<script>
|
||||
window.Laravel = <?php echo json_encode([
|
||||
'csrf_token' => csrf_token(),
|
||||
'form' => $dataset,
|
||||
'titleTypes' => $titleTypes,
|
||||
'descriptionTypes' => $descriptionTypes,
|
||||
'languages' => $languages,
|
||||
'projects' => $projects,
|
||||
'licenses' => $licenses,
|
||||
'checkeds' => $checkeds,
|
||||
'referenceTypes' => $referenceTypes,
|
||||
'relationTypes' => $relationTypes
|
||||
]); ?>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="{{ asset('backend/publish/mainEditDataset.js') }}"></script>
|
||||
@stop
|
|
@ -1,9 +1,9 @@
|
|||
<fieldset id="fieldset-State">
|
||||
<legend>State & notes</legend>
|
||||
<div class="pure-g">
|
||||
@if(!empty($reject_reviewer_note))
|
||||
@if($dataset->reject_editor_note)
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('reject_reviewer_note', 'editor reject note..') !!}
|
||||
{!! Form::label('reject_editor_note', 'editor reject note..') !!}
|
||||
{{-- {!! 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']) !!}
|
||||
|
@ -34,8 +34,7 @@
|
|||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('type', 'Type..') !!}
|
||||
<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'"]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,7 +54,7 @@
|
|||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('creating_corporation', 'Creating Corporation') !!}
|
||||
{!! Form::text('creating_corporation', null, ['class' =>
|
||||
{!! Form::text('creating_corporation', null, ['readonly', 'class' =>
|
||||
'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>
|
||||
|
@ -114,7 +113,7 @@
|
|||
<td>
|
||||
<input v-bind:name="'titles['+index+'][id]'" readonly class="form-control" v-model="title.id" hidden />
|
||||
<input type="text" :id="'titles['+index+'][value]'" :name="'titles['+index+'][value]'"
|
||||
v-validate="'required'" class="form-control" v-model="title.value">
|
||||
v-validate="'required|min:4|max:255'" class="form-control" v-model="title.value">
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="title.type == 'Main'">
|
||||
|
@ -124,7 +123,7 @@
|
|||
<template v-else>
|
||||
<select type="text" :id="'titles['+index+'][type]'" :name="'titles['+index+'][type]'"
|
||||
class="form-control"
|
||||
v-validate="{required: true, translatedLanguage: [form.language, title.type]}"
|
||||
v-validate="{required: true}"
|
||||
v-model="title.type" v-bind:readonly="title.type == 'Main'">
|
||||
<option v-for="option in remainingTitleTypes" :value='option'
|
||||
:disabled="title.type == 'Main'">
|
||||
|
@ -196,7 +195,7 @@
|
|||
<input v-bind:name="'abstracts[' + index +'][id]'" readonly class="form-control" v-model="abstract.id" hidden />
|
||||
|
||||
<input type="text" :id="'abstracts['+ index +'][value]'"
|
||||
:name="'abstracts['+index+'][value]'" v-validate="'required'" v-model="abstract.value"
|
||||
:name="'abstracts['+index+'][value]'" v-validate="'required|min:4|max:2500'" v-model="abstract.value"
|
||||
class="form-control">
|
||||
</td>
|
||||
<td>
|
||||
|
@ -207,7 +206,7 @@
|
|||
<template v-else>
|
||||
<select type="text" :id="'abstracts['+ index +'][type]'"
|
||||
:name="'abstracts['+ index +'][type]'" class="form-control"
|
||||
v-validate="{required: true, translatedLanguage: [form.language, abstract.type]}"
|
||||
v-validate="{required: true}"
|
||||
v-model="abstract.type" v-bind:readonly="abstract.type == 'Abstract'">
|
||||
<option v-for="option in descriptionTypes" :value='option'>
|
||||
@{{ option }}
|
||||
|
@ -283,21 +282,45 @@
|
|||
</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' : '' " ]) !!}
|
||||
{{-- {!! Form::text('elevation_absolut', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'form.coverage.elevation_absolut',
|
||||
"v-validate" => "this.isElevationAbsolut ? 'required|integer' : '' " ]) !!} --}}
|
||||
<input
|
||||
name="coverage[elevation_absolut]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.elevation_absolut"
|
||||
id="elevation_absolut"
|
||||
v-validate.immediate="{ required: isElevationAbsolut, integer: true}"
|
||||
/>
|
||||
</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' : '' "]) !!}
|
||||
{{-- {!! Form::text('elevation_min', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'form.coverage.elevation_min',
|
||||
"v-validate" => "this.isElevationRange ? 'required|integer' : '' "]) !!} --}}
|
||||
<input
|
||||
name="coverage[elevation_min]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.elevation_min"
|
||||
id="elevation_min"
|
||||
v-validate.immediate="{ required: this.isElevationRange, integer: true}"
|
||||
/>
|
||||
</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' : '' "]) !!}
|
||||
{{-- {!! Form::text('elevation_max', null,
|
||||
['class' => 'pure-u-23-24', 'v-model' => 'form.coverage.elevation_max',
|
||||
"v-validate" => "this.isElevationRange ? 'required|integer' : '' "]) !!} --}}
|
||||
<input
|
||||
name="coverage[elevation_max]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.elevation_max"
|
||||
id="elevation_max"
|
||||
v-validate.immediate="{ required: this.isElevationRange, integer: true}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -318,25 +341,37 @@
|
|||
</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' : '' " ]) !!}
|
||||
{!! Form::label('depth_absolut', 'depth absolut: ') !!}
|
||||
<input
|
||||
name="coverage[depth_absolut]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.depth_absolut"
|
||||
id="depth_absolut"
|
||||
v-validate.immediate="{ required: this.isDepthAbsolut, integer: true}"
|
||||
/>
|
||||
</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'
|
||||
: '' "]) !!}
|
||||
{!! Form::label('depth_min', 'depth min: ') !!}
|
||||
<input
|
||||
name="coverage[depth_min]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.depth_min"
|
||||
id="depth_min"
|
||||
v-validate.immediate="{ required: this.isDepthRange, integer: true}"
|
||||
/>
|
||||
</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'
|
||||
: '' "]) !!}
|
||||
{!! Form::label('depth_max', 'depth max: ') !!}
|
||||
<input
|
||||
name="coverage[depth_max]"
|
||||
type="text"
|
||||
class="pure-u-23-24"
|
||||
v-model="form.coverage.depth_max"
|
||||
id="depth_max"
|
||||
v-validate.immediate="{ required: this.isDepthRange, integer: true}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -344,11 +379,11 @@
|
|||
<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)
|
||||
absolut time (yyyy-MM-dd 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)
|
||||
time range (yyyy-MM-dd 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">
|
||||
|
@ -361,9 +396,9 @@
|
|||
{{-- {!! 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 ref="absoluteTimeDatepicker" name="coverage[time_absolut]"
|
||||
v-validate.immediate="this.isTimeAbsolut ? 'required' : '' "
|
||||
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">
|
||||
|
@ -371,18 +406,18 @@
|
|||
{{-- {!! 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>
|
||||
<datetime ref="minTimeDatepicker" name="coverage[time_min]"
|
||||
v-validate.immediate="this.isTimeRange ? 'required' : '' "
|
||||
format="YYYY-MM-DD 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>
|
||||
<datetime ref="maxTimeDatepicker" name="coverage[time_max]"
|
||||
v-validate.immediate="this.isTimeRange ? 'required' : '' "
|
||||
format="YYYY-MM-DD h:i:s" v-model='form.coverage.time_max'></datetime>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -495,6 +530,7 @@
|
|||
<fieldset id="fieldset-keywords">
|
||||
<legend>Dataset Keywords</legend>
|
||||
<label name="SubjectLabel">Add Keyword </label>
|
||||
<input type="hidden" v-validate:keywords_length="'min_value:3'" data-vv-as="keyword list" name="keywords_list">
|
||||
<button class="pure-button button-small" @click.prevent="addKeyword()"><i class="fas fa-plus-circle"></i></button>
|
||||
@if ($dataset->subjects->count() > 0)
|
||||
<table id="keywords" class="pure-table pure-table-horizontal">
|
||||
|
@ -545,21 +581,24 @@
|
|||
<fieldset id="fieldset-files">
|
||||
<legend>Files</legend>
|
||||
|
||||
{{-- <h3>File Upload</h3>
|
||||
<div class="dropbox">
|
||||
<input type="file" name="uploads" multiple @change="filesChange($event.target.name, $event.target.files)" class="input-file">
|
||||
{{-- <h3>File Upload</h3>--}}
|
||||
{{-- <div class="dropbox"> --}}
|
||||
<div>
|
||||
<input type="hidden" v-validate:files_length="'min_value:1'" data-vv-scope="step-4" data-vv-as="files list" name="files_list">
|
||||
{{-- <input type="file" name="uploads[]" multiple @change="filesChange($event.target.name, $event.target.files)" class="input-file">
|
||||
<p>
|
||||
Drag your file(s) here to begin<br> or click to browse
|
||||
</p>
|
||||
</div> --}}
|
||||
</p> --}}
|
||||
</div>
|
||||
|
||||
<table id="items" class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Path Name</th>
|
||||
<th>ID</th>
|
||||
<th>Label</th>
|
||||
<th>New</th>
|
||||
{{-- <th>New</th> --}}
|
||||
<th style="width: 130px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -575,7 +614,6 @@
|
|||
<span class="alert">missing file: {{ $file->path_name }}</span>
|
||||
@endif --}}
|
||||
<a v-if="file.id != undefined" v-bind:href=" '/settings/file/download/' + file.id ">
|
||||
|
||||
@{{ file.path_name }}
|
||||
</a>
|
||||
<span v-else> File name will be generated</span>
|
||||
|
@ -583,14 +621,16 @@
|
|||
|
||||
</td>
|
||||
<td>
|
||||
<input v-bind:name="'files[' + index +'][id]'" readonly class="form-control" v-model="file.id" hidden />
|
||||
<input v-bind:name="'files[' + index +'][id]'" readonly class="form-control" v-model="file.id" />
|
||||
</td>
|
||||
<td>
|
||||
<input v-bind:name="'files['+index+'][label]'" class="form-control" placeholder="[FILE LABEL]"
|
||||
v-model="file.label" v-validate="'required'" />
|
||||
</td>
|
||||
<td>
|
||||
{{-- <td>
|
||||
<i v-if="file.file" class="fas fa-file-upload"></i>
|
||||
<input type="hidden" v-bind:name="'files['+index+'][file]'" class="form-control" v-bind:file="file.file"/>
|
||||
</td>
|
||||
<input type="text" v-bind:name="'files['+index+'][file]'" class="form-control" v-model="file.file"/>
|
||||
</td> --}}
|
||||
<td>
|
||||
<button v-if="file.id == undefined" class="pure-button button-small is-warning"
|
||||
@click.prevent="removeFile(index)">
|
||||
|
@ -613,11 +653,3 @@
|
|||
<span>{!! $submitButtonText !!}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if($errors->any())
|
||||
<ul class="alert validation-summary-errors">
|
||||
@foreach($errors->all() as $error)
|
||||
<li style="margin-left:5px;">{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
|
@ -32,8 +32,19 @@
|
|||
{!! Form::model($dataset, ['method' => 'POST', 'route' => ['publish.workflow.submit.update', $dataset->id], 'id' => 'submitEditForm',
|
||||
'class' => 'pure-form', 'enctype' => 'multipart/form-data', 'v-on:submit.prevent' => 'onSubmit' ]) !!}
|
||||
@include('workflow/submitter/_form', ['submitButtonText' => 'Save Dataset', 'bookLabel' => 'Edit Dataset.'])
|
||||
{{-- @include('errors._errors') --}}
|
||||
|
||||
{{-- @if (count($errors) > 0)
|
||||
<div>
|
||||
<b>Please correct the following error(s):</b>
|
||||
<ul class="alert validation-summary-errors">
|
||||
@foreach($errors->all() as $error)
|
||||
<li style="margin-left:5px;">{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif --}}
|
||||
|
||||
<!-- client errors -->
|
||||
<div v-if="errors.items.length > 0">
|
||||
<b>Please correct the following error(s):</b>
|
||||
<ul class="alert validation-summary-errors">
|
||||
|
|
|
@ -111,6 +111,10 @@ Route::group(
|
|||
'middleware' => ['permission:dataset-editor-update'],
|
||||
'as' => 'workflow.editor.update', 'uses' => 'EditorController@update',
|
||||
]);
|
||||
Route::get('workflow/editor/file/download/{id}', [
|
||||
'middleware' => ['permission:dataset-editor-update'],
|
||||
'as' => 'workflow.editor.file.download', 'uses' => 'EditorController@download',
|
||||
]);
|
||||
Route::get('workflow/editor/approve/{id}', [
|
||||
'middleware' => ['permission:dataset-approve'],
|
||||
'as' => 'workflow.editor.approve', 'uses' => 'EditorController@approve',
|
||||
|
|
Loading…
Reference in New Issue
Block a user