backend improvements
This commit is contained in:
parent
50bcae442e
commit
4ac1c34b6a
|
@ -244,7 +244,7 @@ class IndexController extends Controller
|
||||||
$dataset->save();
|
$dataset->save();
|
||||||
|
|
||||||
//store related files
|
//store related files
|
||||||
if (null != $data['files']) {
|
if (isset($data['files'])) {
|
||||||
foreach ($data['files'] as $uploadedFile) {
|
foreach ($data['files'] as $uploadedFile) {
|
||||||
$file = $uploadedFile['file'];
|
$file = $uploadedFile['file'];
|
||||||
$label = urldecode($uploadedFile['label']);
|
$label = urldecode($uploadedFile['label']);
|
||||||
|
@ -299,7 +299,9 @@ class IndexController extends Controller
|
||||||
DB::commit();
|
DB::commit();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
DB::rollback();
|
DB::rollback();
|
||||||
Storage::deleteDirectory($datasetFolder);
|
if (isset($datasetFolder)) {
|
||||||
|
Storage::deleteDirectory($datasetFolder);
|
||||||
|
}
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => false,
|
'success' => false,
|
||||||
'error' => [
|
'error' => [
|
||||||
|
@ -310,7 +312,9 @@ class IndexController extends Controller
|
||||||
//throw $e;
|
//throw $e;
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
DB::rollback();
|
DB::rollback();
|
||||||
Storage::deleteDirectory($datasetFolder);
|
if (isset($datasetFolder)) {
|
||||||
|
Storage::deleteDirectory($datasetFolder);
|
||||||
|
}
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => false,
|
'success' => false,
|
||||||
'error' => [
|
'error' => [
|
||||||
|
|
|
@ -21,7 +21,8 @@ class LicenseController extends Controller
|
||||||
|
|
||||||
public function index() : View
|
public function index() : View
|
||||||
{
|
{
|
||||||
$licenses = License::get();
|
$direction = 'asc'; // or desc
|
||||||
|
$licenses = License::orderBy('sort_order', $direction)->get();
|
||||||
return view('settings.license.license', compact('licenses'));
|
return view('settings.license.license', compact('licenses'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ class PersonController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* activatew author, submitter etc....
|
* activate author, submitter etc....
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
|
|
|
@ -8,8 +8,10 @@ use App\Models\Dataset;
|
||||||
class Collection extends Model
|
class Collection extends Model
|
||||||
{
|
{
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
//mass assignable
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name',
|
'name',
|
||||||
|
'number',
|
||||||
'role_id',
|
'role_id',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -27,4 +27,9 @@ class License extends Model
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(Dataset::class, 'link_documents_licences', 'licence_id', 'document_id');
|
return $this->belongsToMany(Dataset::class, 'link_documents_licences', 'licence_id', 'document_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getCheckedAttribute()
|
||||||
|
{
|
||||||
|
return "false";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -10886,6 +10886,12 @@
|
||||||
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
|
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"vee-validate": {
|
||||||
|
"version": "2.1.0-beta.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/vee-validate/-/vee-validate-2.1.0-beta.9.tgz",
|
||||||
|
"integrity": "sha512-c5oKINWG1X++aeEoHjLihYFM0ycobfDJMl6/iJhwVtAzRZdr5jH1h5hbajAI3gF+Y7052g49F6EFu7ZY19P1zQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"vendors": {
|
"vendors": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
"jquery": "^3.2",
|
"jquery": "^3.2",
|
||||||
"laravel-mix": "^2.1.14",
|
"laravel-mix": "^2.1.14",
|
||||||
"lodash": "^4.17.10",
|
"lodash": "^4.17.10",
|
||||||
|
"vee-validate": "^2.1.0-beta.9",
|
||||||
"vue": "^2.5.7",
|
"vue": "^2.5.7",
|
||||||
"vue-events": "^3.0.0",
|
"vue-events": "^3.0.0",
|
||||||
"vuetable-2": "^1.7.5"
|
"vuetable-2": "^1.7.5"
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -23,9 +23,15 @@ window._ = require('lodash');
|
||||||
// window.Vue = require('vue');
|
// window.Vue = require('vue');
|
||||||
// Vue.prototype.$http = axios;
|
// Vue.prototype.$http = axios;
|
||||||
|
|
||||||
|
// import Vue from 'vue';
|
||||||
// Vue.component('example', require('./components/Example.vue'));
|
// Vue.component('example', require('./components/Example.vue'));
|
||||||
//Vue.component('my-autocomplete', require('./components/MyAutocomplete.vue'));
|
//Vue.component('my-autocomplete', require('./components/MyAutocomplete.vue'));
|
||||||
import MyAutocomplete from './components/MyAutocomplete.vue';
|
import MyAutocomplete from './components/MyAutocomplete.vue';
|
||||||
|
import VeeValidate from 'vee-validate';
|
||||||
|
// import { Validator } from 'vee-validate';
|
||||||
|
|
||||||
|
|
||||||
|
Vue.use(VeeValidate);
|
||||||
|
|
||||||
const STATUS_INITIAL = 0, STATUS_SAVING = 1, STATUS_SUCCESS = 2, STATUS_FAILED = 3;
|
const STATUS_INITIAL = 0, STATUS_SAVING = 1, STATUS_SUCCESS = 2, STATUS_FAILED = 3;
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
|
@ -38,7 +44,7 @@ const app = new Vue({
|
||||||
// { qty: 5, value: "Something", language: 10, type: "additional", sort_order: 0 },
|
// { qty: 5, value: "Something", language: 10, type: "additional", sort_order: 0 },
|
||||||
// { qty: 2, value: "Something else", language: 20, type: "additional", sort_order: 0 },
|
// { qty: 2, value: "Something else", language: 20, type: "additional", sort_order: 0 },
|
||||||
],
|
],
|
||||||
errors: [],
|
serrors: [],
|
||||||
uploadedFiles: [],
|
uploadedFiles: [],
|
||||||
uploadError: null,
|
uploadError: null,
|
||||||
currentStatus: null,
|
currentStatus: null,
|
||||||
|
@ -66,14 +72,28 @@ const app = new Vue({
|
||||||
language: ''
|
language: ''
|
||||||
},
|
},
|
||||||
checkedPersons: [],
|
checkedPersons: [],
|
||||||
checkedLicenses: [],
|
checkedLicenses: [],// [],
|
||||||
files: []
|
files: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created: function () {
|
||||||
|
VeeValidate.Validator.extend('Name', {
|
||||||
|
getMessage: field => '* Enter valid ' + field + '',
|
||||||
|
validate: value => /^[a-zA-Z]*$/.test(value)
|
||||||
|
});
|
||||||
|
// add the required rule
|
||||||
|
VeeValidate.Validator.extend('oneChecked', {
|
||||||
|
getMessage: field => 'At least one ' + field + ' needs to be checked.',
|
||||||
|
validate: (value, [testProp]) => {
|
||||||
|
const options = this.dataset.checkedLicenses;
|
||||||
|
return value || options.some((option) => option[testProp]);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.step = 1;
|
this.step = 1;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isInitial() {
|
isInitial() {
|
||||||
|
@ -103,7 +123,7 @@ const app = new Vue({
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
this.errors = [];
|
this.serrors = [];
|
||||||
/*
|
/*
|
||||||
Initialize the form data
|
Initialize the form data
|
||||||
*/
|
*/
|
||||||
|
@ -126,7 +146,7 @@ const app = new Vue({
|
||||||
*/
|
*/
|
||||||
formData.append('type', this.dataset.type);
|
formData.append('type', this.dataset.type);
|
||||||
formData.append('server_state', this.dataset.state);
|
formData.append('server_state', this.dataset.state);
|
||||||
formData.append('rights', this.dataset.rights);
|
formData.append('rights', Number(this.dataset.rights));
|
||||||
formData.append('creating_corporation', this.dataset.creating_corporation);
|
formData.append('creating_corporation', this.dataset.creating_corporation);
|
||||||
formData.append('project_id', this.dataset.project_id);
|
formData.append('project_id', this.dataset.project_id);
|
||||||
formData.append('embargo_date', this.dataset.embargo_date);
|
formData.append('embargo_date', this.dataset.embargo_date);
|
||||||
|
@ -171,12 +191,12 @@ const app = new Vue({
|
||||||
var errorsArray = errorObject.response.data.errors;
|
var errorsArray = errorObject.response.data.errors;
|
||||||
for (var index in errorsArray) {
|
for (var index in errorsArray) {
|
||||||
console.log(errorsArray[index]);
|
console.log(errorsArray[index]);
|
||||||
_this.errors.push(errorsArray[index]);
|
_this.serrors.push(errorsArray[index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (errorObject.response.data.error) {
|
if (errorObject.response.data.error) {
|
||||||
var error = errorObject.response.data.error;
|
var error = errorObject.response.data.error;
|
||||||
_this.errors.push(error.message);
|
_this.serrors.push(error.message);
|
||||||
}
|
}
|
||||||
_this.currentStatus = STATUS_FAILED;
|
_this.currentStatus = STATUS_FAILED;
|
||||||
});
|
});
|
||||||
|
@ -230,8 +250,24 @@ const app = new Vue({
|
||||||
prev() {
|
prev() {
|
||||||
this.step--;
|
this.step--;
|
||||||
},
|
},
|
||||||
next() {
|
next(scope) {
|
||||||
this.step++;
|
// if(this.validate(scope)) {
|
||||||
|
// this.step++;
|
||||||
|
// }
|
||||||
|
this.$validator.validateAll(scope).then((result) => {
|
||||||
|
if (result) {
|
||||||
|
this.step++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
validate: function (scope) {
|
||||||
|
this.$validator.validateAll(scope);
|
||||||
|
if (this.errors.any()) {
|
||||||
|
console.log('The form is invalid');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
// alert('Submit to blah and show blah and etc.');
|
// alert('Submit to blah and show blah and etc.');
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
* building robust, powerful web applications using Vue and Laravel.
|
* building robust, powerful web applications using Vue and Laravel.
|
||||||
*/
|
*/
|
||||||
require('./bootstrap');
|
require('./bootstrap');
|
||||||
window.Vue = require('vue');
|
// window.Vue = require('vue');
|
||||||
|
import Vue from 'vue';
|
||||||
|
|
||||||
Vue.prototype.$http = axios;
|
Vue.prototype.$http = axios;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<ul class="pure-menu-children" role="menu">
|
<ul class="pure-menu-children" role="menu">
|
||||||
<!--<li class="pure-menu-item"><a href="{{ route('settings.book') }}" class="pure-menu-link">BOOK</a></li>-->
|
<!--<li class="pure-menu-item"><a href="{{ route('settings.book') }}" class="pure-menu-link">BOOK</a></li>-->
|
||||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('settings.document') }}" >DATASET</a></li>
|
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('settings.document') }}" >DATASET</a></li>
|
||||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('settings.collection') }}">COLLECTION</a></li>
|
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('settings.collection.index') }}">COLLECTION</a></li>
|
||||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('settings.project') }}">PROJECT</a></li>
|
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('settings.project') }}">PROJECT</a></li>
|
||||||
|
|
||||||
<!-- <li><a href="{{ route('settings.shelf') }}" class="marvel">SHELF</a></li>-->
|
<!-- <li><a href="{{ route('settings.shelf') }}" class="marvel">SHELF</a></li>-->
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
@extends('settings.layouts.app')
|
@extends('settings.layouts.app')
|
||||||
@section('title', 'Publish')
|
|
||||||
|
@section('title', 'Publish')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h3 class="header-title">
|
<h3 class="header-title">
|
||||||
|
@ -8,12 +10,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="app" class="box-content">
|
<div id="app" class="box-content">
|
||||||
<form action={{ route( 'publish.dataset.store1') }} method="post" class="pure-form" enctype="multipart/form-data">
|
{{-- <form action={{ route( 'publish.dataset.store1') }} method="post" class="pure-form" enctype="multipart/form-data"> --}}
|
||||||
|
<main class="steps pure-form" enctype="multipart/form-data">
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
|
|
||||||
<div v-if="step === 1">
|
<form v-if="step === 1" data-vv-scope="step-1">
|
||||||
<h1>Step One</h1>
|
<h1>Step One</h1>
|
||||||
<fieldset class="left-labels">
|
|
||||||
|
<div class="form-group">
|
||||||
<legend>Datensatztyp</legend>
|
<legend>Datensatztyp</legend>
|
||||||
<div class="description hint">
|
<div class="description hint">
|
||||||
<p>Bitte wählen Sie einen Datensatztyp aus der Liste aus.</p>
|
<p>Bitte wählen Sie einen Datensatztyp aus der Liste aus.</p>
|
||||||
|
@ -22,44 +26,51 @@
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
<label for="documentType">Datensatztyp<span class="required" title="Dieses Feld muss ausgefüllt werden."> *</span></label>
|
<label for="documentType">Datensatztyp<span class="required" title="Dieses Feld muss ausgefüllt werden."> *</span></label>
|
||||||
<div class="select" style="width:300px" title="Bitte wählen Sie einen Datensatztyp aus der Liste aus.">
|
<div class="select" style="width:300px" 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' =>
|
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --',
|
||||||
'dataset.type']) !!}
|
'v-model' => 'dataset.type', "v-validate" => "'required'"]) !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</div>
|
||||||
|
|
||||||
<fieldset class="left-labels">
|
<div :class="{'form-group':true, 'has-error':errors.has('rights')}">
|
||||||
<legend>Einräumung eines einfachen Nutzungsrechts</legend>
|
<legend>Einräumung eines einfachen Nutzungsrechts</legend>
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
{{-- <div class="pure-u-1 pure-u-md-1-2 pure-div"> --}}
|
||||||
|
<p>
|
||||||
|
I accept
|
||||||
|
<a target="_blank" href="{{ route("frontend.pages.show", ['page_slug'=>'terms-and-conditions']) }}">
|
||||||
|
{!! trans('validation.attributes.backend.create-dataset.terms_and_conditions').'*' !!}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<small for="rights" class="pure-form-message-inline">Ich habe diese rechtlichen Hinweise gelesen und bin damit einverstanden.
|
<small for="rights" class="pure-form-message-inline">Ich habe diese rechtlichen Hinweise gelesen und bin damit einverstanden.
|
||||||
<span class="required" title="Dieses Feld muss ausgefüllt werden.">*</span>
|
<span class="required" title="Dieses Feld muss ausgefüllt werden.">*</span>
|
||||||
</small> {{-- <input name="rights" value="0" type="hidden"> --}}
|
</small> {{-- <input name="rights" value="0" type="hidden"> --}}
|
||||||
<label>
|
<label>
|
||||||
<input class="form-checkbox" name="rights" id="rights" type="checkbox" v-model="dataset.rights" true-value="1" false-value="0">
|
<input class="form-checkbox" name="rights" id="rights" type="checkbox" v-model="dataset.rights" v-validate="'required'">
|
||||||
<p>
|
<br />
|
||||||
I accept
|
<i v-show="errors.has('step-1.rights')" class="fa fa-warning"></i>
|
||||||
<a target="_blank" href="{{ route("frontend.pages.show", ['page_slug'=>'terms-and-conditions']) }}">
|
<span v-show="errors.has('step-1.rights')" class="text-danger">@{{ errors.first('step-1.rights') }}</span>
|
||||||
{!! trans('validation.attributes.backend.create-dataset.terms_and_conditions').'*' !!}
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
<span class="help-block">You must agree to continue</span>
|
||||||
</fieldset>
|
{{-- </div> --}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div class="pure-controls">
|
<div class="pure-controls">
|
||||||
{{-- <button type="submit" class="pure-button button-small">
|
<button @click.prevent="next('step-1')" class="pure-button button-small" :disabled="errors.any()">
|
||||||
<i class="fa fa-arrow-right"></i>
|
|
||||||
<span>Weiter zum nächsten Schritt</span>
|
|
||||||
</button> --}}
|
|
||||||
<button @click.prevent="next()" class="pure-button button-small">
|
|
||||||
<i class="fa fa-arrow-right"></i>
|
<i class="fa fa-arrow-right"></i>
|
||||||
<span>Continue</span>
|
<span>Continue</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<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>
|
||||||
|
|
||||||
<div v-if="step === 2">
|
<form v-if="step === 2" data-vv-scope="step-2">
|
||||||
<h1>Step Two</h1>
|
<h1>Step Two</h1>
|
||||||
<fieldset id="fieldset-general">
|
<fieldset id="fieldset-general">
|
||||||
<legend>General</legend>
|
<legend>General</legend>
|
||||||
|
@ -76,22 +87,22 @@
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{!! Form::label('Type', 'Type..') !!}
|
{!! Form::label('Type', 'Type..') !!}
|
||||||
<div class="select pure-u-23-24">
|
<div class="select pure-u-23-24">
|
||||||
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --', 'v-model' =>
|
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --',
|
||||||
'dataset.type']) !!}
|
'v-model' => 'dataset.type', "v-validate" => "'required'"]) !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{!! Form::label('State', 'State..') !!}
|
{!! Form::label('State', 'State..') !!}
|
||||||
<div class="select pure-u-23-24">
|
<div class="select pure-u-23-24">
|
||||||
{!! Form::select( 'State', array_except(Config::get('enums.server_states'),['published', 'deleted', 'temporary']), '', ['placeholder'
|
{!! Form::select( 'State', array_except(Config::get('enums.server_states'),['published', 'deleted', 'temporary']), '',
|
||||||
=> '-- select server state --', 'v-model' => 'dataset.state'] ) !!}
|
['placeholder' => '-- select server state --', 'v-model' => 'dataset.state', "v-validate" => "'required'"] ) !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{!! Form::label('CreatingCorporation', 'Creating Corporation') !!} {!! Form::text('CreatingCorporation', null, ['class' =>
|
{!! Form::label('CreatingCorporation', 'Creating Corporation') !!} {!! Form::text('CreatingCorporation', null, ['class' =>
|
||||||
'pure-u-23-24', 'v-model' => 'dataset.creating_corporation']) !!}
|
'pure-u-23-24', 'v-model' => 'dataset.creating_corporation', "v-validate" => "'required'"]) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
|
@ -125,28 +136,29 @@
|
||||||
<legend>Main Title & Abstract</legend>
|
<legend>Main Title & Abstract</legend>
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
|
|
||||||
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{!! Form::label('TitleMain', 'Main Title ') !!} {!! Form::text('TitleMain[Value]', null, ['class' => 'pure-u-23-24', 'v-model'
|
{!! Form::label('TitleMain', 'Main Title ') !!}
|
||||||
=> 'dataset.title_main.value']) !!}
|
{!! Form::text('TitleMain[Value]', null, ['class' => 'pure-u-23-24', 'v-model'
|
||||||
|
=> 'dataset.title_main.value', "v-validate" => "'required|min:3'", "data-vv-as" => "Main Title"]) !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{!! Form::label('TitleLanguage', 'Title Language..') !!}
|
{!! Form::label('TitleLanguage', 'Title Language..') !!}
|
||||||
<div class="select pure-u-23-24">
|
<div class="select pure-u-23-24">
|
||||||
{!! Form::select('TitleMain[Language]', $languages, null, ['placeholder' => '--no language--', 'v-model' => 'dataset.title_main.language'])
|
{!! Form::select('TitleMain[Language]', $languages, null,
|
||||||
!!}
|
['placeholder' => '--no language--', 'v-model' => 'dataset.title_main.language', "v-validate" => "'required'", "data-vv-as" => "Title Language"]) !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{!! Form::label('TitleAbstract', 'Main Abstract ') !!} {{ Form::textarea('TitleAbstract[Value]', null, ['class' => 'pure-u-23-24',
|
{!! Form::label('TitleAbstract', 'Main Abstract ') !!}
|
||||||
'size' => '70x6', 'v-model' => 'dataset.abstract_main.value']) }}
|
{{ Form::textarea('TitleAbstract[Value]', null, ['class' => 'pure-u-23-24',
|
||||||
|
'size' => '70x6', 'v-model' => 'dataset.abstract_main.value', "v-validate" => "'required|min:3'", "data-vv-as" => "Main Abstract"]) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||||
{!! Form::label('AbstractLanguage', 'Abstract Language..') !!}
|
{!! Form::label('AbstractLanguage', 'Abstract Language..') !!}
|
||||||
<div class="select pure-u-23-24">
|
<div class="select pure-u-23-24">
|
||||||
{!! Form::select('TitleAbstract[Language]', $languages, null, ['placeholder' => '--no language--', 'v-model' => 'dataset.abstract_main.language'])
|
{!! Form::select('TitleAbstract[Language]', $languages, null,
|
||||||
!!}
|
['placeholder' => '--no language--', 'v-model' => 'dataset.abstract_main.language', "v-validate" => "'required'", "data-vv-as" => "Abstract Language"]) !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -155,13 +167,19 @@
|
||||||
<legend>Licenses</legend>
|
<legend>Licenses</legend>
|
||||||
|
|
||||||
<div class="pure-control-group checkboxlist">
|
<div class="pure-control-group checkboxlist">
|
||||||
@foreach ($licenses as $license)
|
@foreach ($licenses as $indexKey => $license)
|
||||||
<label for={{ "license". $license->id }} class="pure-checkbox">
|
<label for={{ "license". $license->id }} class="pure-checkbox">
|
||||||
<input name="licenses[]" value={{ $license->id }} v-model="dataset.checkedLicenses" type="checkbox" class="form-check-input">
|
@if ($loop->first)
|
||||||
|
<input name="licenses" value={{ $license->id }} v-model="dataset.checkedLicenses" type="radio" class="form-check-input" v-validate="'required'" data-vv-as="Licence" >
|
||||||
{{ $license->name_long }}
|
{{ $license->name_long }}
|
||||||
</label> @endforeach
|
@else
|
||||||
|
<input name="licenses" value={{ $license->id }} v-model="dataset.checkedLicenses" type="radio" class="form-check-input" >
|
||||||
|
{{ $license->name_long }}
|
||||||
|
@endif
|
||||||
|
</label>
|
||||||
|
@endforeach
|
||||||
<br>
|
<br>
|
||||||
<span>Checked licenses: @{{ dataset.checkedLicenses }}</span>
|
<span>Checked license: @{{ dataset.checkedLicenses }}</span>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
@ -172,15 +190,20 @@
|
||||||
<span>Back</span>
|
<span>Back</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button @click.prevent="next()" class="pure-button button-small">
|
<button @click.prevent="next('step-2')" class="pure-button button-small" v-bind:disabled="errors.any()">
|
||||||
<i class="fa fa-arrow-right"></i>
|
<i class="fa fa-arrow-right"></i>
|
||||||
<span>Continue</span>
|
<span>Continue</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<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>
|
||||||
|
|
||||||
</div>
|
<form v-if="step === 3" data-vv-scope="step-3">
|
||||||
|
|
||||||
<div v-if="step === 3">
|
|
||||||
<h1>Select authors, contributors</h1>
|
<h1>Select authors, contributors</h1>
|
||||||
<fieldset id="fieldset-general">
|
<fieldset id="fieldset-general">
|
||||||
<legend>Authors</legend>
|
<legend>Authors</legend>
|
||||||
|
@ -212,6 +235,10 @@
|
||||||
<legend>Contributors</legend>
|
<legend>Contributors</legend>
|
||||||
<small id="contributorHelp" class="pure-form-message-inline">will come soon...</small>
|
<small id="contributorHelp" class="pure-form-message-inline">will come soon...</small>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<fieldset id="fieldset-general">
|
||||||
|
<legend>Submitters</legend>
|
||||||
|
<small id="submitterHelp" class="pure-form-message-inline">will come soon...</small>
|
||||||
|
</fieldset>
|
||||||
<br />
|
<br />
|
||||||
<div class="pure-controls">
|
<div class="pure-controls">
|
||||||
<button @click.prevent="prev()" class="pure-button button-small">
|
<button @click.prevent="prev()" class="pure-button button-small">
|
||||||
|
@ -219,14 +246,14 @@
|
||||||
<span>Back</span>
|
<span>Back</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button @click.prevent="next()" class="pure-button button-small">
|
<button @click.prevent="next('step-3')" class="pure-button button-small">
|
||||||
<i class="fa fa-arrow-right"></i>
|
<i class="fa fa-arrow-right"></i>
|
||||||
<span>Review Dataset</span>
|
<span>Review Dataset</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
|
|
||||||
<div v-if="step === 4">
|
<form v-if="step === 4" data-vv-scope="step-4">
|
||||||
<h1>File Upload</h1>
|
<h1>File Upload</h1>
|
||||||
|
|
||||||
<div class="dropbox">
|
<div class="dropbox">
|
||||||
|
@ -281,32 +308,41 @@
|
||||||
<span>Create Dataset</span>
|
<span>Create Dataset</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</form>
|
||||||
|
|
||||||
<div v-if="errors.length > 0">
|
<div v-if="serrors.length > 0">
|
||||||
<b>Please correct the following error(s):</b>
|
<b>Please correct the following server error(s):</b>
|
||||||
<ul class="alert validation-summary-errors">
|
<ul class="alert validation-summary-errors">
|
||||||
<li style="margin-left:5px;" v-for="error in errors">@{{ error }}</li>
|
<li style="margin-left:5px;" v-for="error in serrors">@{{ error }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</main>
|
||||||
{{-- <br/><br/>Debug:@{{ dataset }} --}}
|
{{-- <br/><br/>Debug:@{{ dataset }} --}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
@section('styles')
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
/* main.steps article {
|
||||||
|
display:block;
|
||||||
|
} */
|
||||||
|
|
||||||
|
.help-block {
|
||||||
|
display: none;
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-error .help-block {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
@stop
|
||||||
|
|
||||||
|
|
||||||
@section('after-scripts') {{--
|
@section('after-scripts') {{--
|
||||||
<script type="text/javascript" src="{{ asset('js/lib.js') }}"></script> --}} {{--
|
<script type="text/javascript" src="{{ asset('js/lib.js') }}"></script> --}} {{--
|
||||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||||
|
@ -314,14 +350,4 @@
|
||||||
<script type="text/javascript" src="{{ resource_path('assets\js\datasetPublish.js') }}"></script> --}}
|
<script type="text/javascript" src="{{ resource_path('assets\js\datasetPublish.js') }}"></script> --}}
|
||||||
<script type="text/javascript" src="{{ asset('backend/publish/datasetPublish.js') }}"></script>
|
<script type="text/javascript" src="{{ asset('backend/publish/datasetPublish.js') }}"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@stop
|
@stop
|
|
@ -24,9 +24,15 @@
|
||||||
'pure-form pure-form-aligned']) !!}
|
'pure-form pure-form-aligned']) !!}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
{{ Form::label('name', 'collection name') }} {{ Form::text('name', null, ['class' => 'form-control']) }}
|
{{ Form::label('name', 'collection name') }}
|
||||||
|
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||||
<em>*</em>
|
<em>*</em>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
{{ Form::label('number', 'number') }}
|
||||||
|
{{ Form::text('number', null, ['class' => 'form-control']) }}
|
||||||
|
<small id="numberHelp" class="pure-form-message-inline">number is optional</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group pure-div">
|
<div class="pure-control-group pure-div">
|
||||||
{!! Form::label('role_id', 'Collection Role..') !!}
|
{!! Form::label('role_id', 'Collection Role..') !!}
|
||||||
|
|
|
@ -49,25 +49,25 @@
|
||||||
var myChart = new Chart(ctx, {
|
var myChart = new Chart(ctx, {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: {
|
data: {
|
||||||
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
|
labels: ["2017", "2018", "2019"],
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: '# of Votes',
|
label: 'Number of published datasets',
|
||||||
data: [12, 14, 8, 2, 5, 1],
|
data: [12, 14, 8, 2, 5, 1],
|
||||||
backgroundColor: [
|
backgroundColor: [
|
||||||
'rgba(255, 99, 132, 0.2)',
|
'rgba(255, 99, 132, 0.2)',
|
||||||
'rgba(54, 162, 235, 0.2)',
|
'rgba(54, 162, 235, 0.2)',
|
||||||
'rgba(255, 206, 86, 0.2)',
|
'rgba(255, 206, 86, 0.2)'
|
||||||
'rgba(75, 192, 192, 0.2)',
|
// 'rgba(75, 192, 192, 0.2)',
|
||||||
'rgba(153, 102, 255, 0.2)',
|
// 'rgba(153, 102, 255, 0.2)',
|
||||||
'rgba(255, 159, 64, 0.2)'
|
// 'rgba(255, 159, 64, 0.2)'
|
||||||
],
|
],
|
||||||
borderColor: [
|
borderColor: [
|
||||||
'rgba(255,99,132,1)',
|
'rgba(255,99,132,1)',
|
||||||
'rgba(54, 162, 235, 1)',
|
'rgba(54, 162, 235, 1)',
|
||||||
'rgba(255, 206, 86, 1)',
|
'rgba(255, 206, 86, 1)'
|
||||||
'rgba(75, 192, 192, 1)',
|
// 'rgba(75, 192, 192, 1)',
|
||||||
'rgba(153, 102, 255, 1)',
|
// 'rgba(153, 102, 255, 1)',
|
||||||
'rgba(255, 159, 64, 1)'
|
// 'rgba(255, 159, 64, 1)'
|
||||||
],
|
],
|
||||||
borderWidth: 1
|
borderWidth: 1
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/style.css') }}">
|
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/style.css') }}">
|
||||||
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/pagination.css') }}">
|
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/pagination.css') }}">
|
||||||
|
@yield('styles')
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<th>Licence</th>
|
<th>Licence</th>
|
||||||
|
<th>Sort Order</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
|
@ -21,7 +22,8 @@
|
||||||
|
|
||||||
@foreach($licenses as $license)
|
@foreach($licenses as $license)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $license->name_long }}</td>
|
<td>{{ $license->name_long }}</td>
|
||||||
|
<td>{{ $license->sort_order }}</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a class="edit" href="{{ route('settings.license.edit', $license->id) }}">
|
<a class="edit" href="{{ route('settings.license.edit', $license->id) }}">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user