more metadata fields

This commit is contained in:
Arno Kaimbacher 2019-01-22 18:24:18 +01:00
parent b74927b5f2
commit bba029e74e
14 changed files with 288 additions and 100 deletions

View File

@ -49,19 +49,21 @@ class IndexController extends Controller
->get(); ->get();
$languages = DB::table('languages') $languages = DB::table('languages')
->where('active', true) ->where('active', true)
->pluck('part2_t', 'part2_t'); ->pluck('part1', 'part1');
// ->toArray(); // ->toArray();
// $persons = Person::where('status', 1) // $persons = Person::where('status', 1)
// ->pluck('last_name', 'id'); // ->pluck('last_name', 'id');
$projects = Project::pluck('label', 'id'); $projects = Project::pluck('label', 'id');
$types = array( $relatedIdentifierTypes = ["ARK", "arXiv", "bibcode", "DOI", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISSN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "URL", "URN"];
'doi' => 'doi', 'handle' => 'handle', 'urn' => 'urn', 'std-doi' => 'std-doi', $relatedIdentifierTypes = array_combine($relatedIdentifierTypes, $relatedIdentifierTypes);
'url' => 'url', 'isbn' => 'isbn', 'issn' => 'issn', 'rdr-id' => 'rdr-id'
); $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"];
$relations = array('updates' => 'updates', 'updated-by' => 'updated-by', 'other' => 'other'); $relationTypes = array_combine($relationTypes, $relationTypes);
return view('publish.create-step1', compact('licenses', 'languages', 'projects', 'types', 'relations')); $titleTypes = ['sub' => 'sub', 'alternative' => 'alternative', 'translated' => 'translated', 'other' => 'other'];
//$relationTypes = array('updates' => 'updates', 'updated-by' => 'updated-by', 'other' => 'other');
return view('publish.create-step1', compact('licenses', 'languages', 'projects', 'relatedIdentifierTypes', 'relationTypes', 'titleTypes'));
} }
/** /**

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Settings;
use App\Http\Controllers\Controller;
use Illuminate\View\View;
use Illuminate\Support\Facades\Config;
class FiletypeController extends Controller
{
// public function download($id)
// {
// //$report = $this->report->find($id);
// $file = File::findOrFail($id);
// $file_path = public_path('storage/' . $file->path_name);
// return response()->download($file_path, $file->label, ['Content-Type:' . $file->mime_type]);
// }
public function __construct()
{
$this->middleware('auth');
}
public function index(): View
{
$direction = 'asc'; // or desc
$fileextensions = Config::get('enums.filetypes_allowed');
return view('settings.filetype.index', compact('fileextensions'));
}
}

View File

@ -2,6 +2,7 @@
namespace App\Library\Xml; namespace App\Library\Xml;
use App\Models\Title; use App\Models\Title;
use App\Models\Description;
use App\Models\License; use App\Models\License;
use App\Models\Person; use App\Models\Person;
use App\Models\File; use App\Models\File;
@ -24,8 +25,8 @@ trait DatasetExtension
'fetch' => 'eager' 'fetch' => 'eager'
), ),
'TitleAbstract' => array( 'TitleAbstract' => array(
'model' => Title::class, 'model' => Description::class,
'options' => array('type' => 'abstract'), 'options' => array('type' => ['abstract', 'methods']),
'fetch' => 'eager' 'fetch' => 'eager'
), ),
'Licence' => array( 'Licence' => array(
@ -153,10 +154,10 @@ trait DatasetExtension
return $this; return $this;
} }
public function getField($name) // public function getField($name)
{ // {
return $this->_getField($name); // return $this->_getField($name);
} // }
/** /**
* Return a reference to an actual field. * Return a reference to an actual field.
@ -164,7 +165,7 @@ trait DatasetExtension
* @param string $name Name of the requested field. * @param string $name Name of the requested field.
* @return Field The requested field instance. If no such instance can be found, null is returned. * @return Field The requested field instance. If no such instance can be found, null is returned.
*/ */
protected function _getField($name) protected function getField($name)
{ {
if (isset($this->fields[$name])) { if (isset($this->fields[$name])) {
return $this->fields[$name]; return $this->fields[$name];

View File

@ -6,7 +6,8 @@ use App\Library\Xml\DatasetExtension;
use App\Models\Collection; use App\Models\Collection;
use App\Models\License; use App\Models\License;
use App\Models\Project; use App\Models\Project;
use App\Models\Title; use App\Models\Description;
use App\Models\Titel;
use App\Models\Person; use App\Models\Person;
use App\Models\XmlCache; use App\Models\XmlCache;
use App\Models\File; use App\Models\File;
@ -129,33 +130,28 @@ class Dataset extends Model
#endregion #endregion
#region title table: #region title table:
public function titlesAbstracts()
{
return $this->hasMany(Title::class, 'document_id', 'id');
}
public function titles() public function titles()
{ {
return $this->hasMany(Title::class, 'document_id', 'id') return $this->hasMany(Titel::class, 'document_id', 'id');
->where('type', 'main');
} }
public function addMainTitle(Title $title) public function addMainTitle(Title $title)
{ {
$title->type = 'main'; $title->type = 'main';
$this->titlesAbstracts()->save($title); $this->titles()->save($title);
// $this->titles()->save($title, ['type' => 'main']); // $this->titles()->save($title, ['type' => 'main']);
} }
/** /**
* Relation abstracts * Relation abstracts
* *
* @return \App\Title * @return \App\Description
*/ */
public function abstracts() public function abstracts()
{ {
return $this->hasMany(Title::class, 'document_id', 'id') return $this->hasMany(Description::class, 'document_id', 'id');
->where('type', 'abstract');
} }
public function addMainAbstract(Title $title) public function addMainAbstract(Title $title)
{ {
$title->type = 'abstract'; $title->type = 'abstract';

View File

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

View File

@ -6,7 +6,7 @@ use App\Models\Dataset;
class Title extends Model class Title extends Model
{ {
protected $table = 'document_title_abstracts'; protected $table = 'dataset_titles';
public $timestamps = false; public $timestamps = false;

12
composer.lock generated
View File

@ -1234,16 +1234,16 @@
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v4.1.1", "version": "v4.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "8aae5b59b83bb4d0dbf07b0a835f2680a658f610" "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8aae5b59b83bb4d0dbf07b0a835f2680a658f610", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/594bcae1fc0bccd3993d2f0d61a018e26ac2865a",
"reference": "8aae5b59b83bb4d0dbf07b0a835f2680a658f610", "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1259,7 +1259,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "4.1-dev" "dev-master": "4.2-dev"
} }
}, },
"autoload": { "autoload": {
@ -1281,7 +1281,7 @@
"parser", "parser",
"php" "php"
], ],
"time": "2018-12-26T11:32:39+00:00" "time": "2019-01-12T16:31:37+00:00"
}, },
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",

File diff suppressed because one or more lines are too long

View File

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

View File

@ -48,17 +48,17 @@ const app = new Vue({
// { qty: 2, value: "Something else", language: 20, type: "additional", sort_order: 0 }, // { qty: 2, value: "Something else", language: 20, type: "additional", sort_order: 0 },
], ],
serrors: [], serrors: [],
uploadedFiles: [], uploadedFiles: [],
uploadError: null, uploadError: null,
currentStatus: null, currentStatus: null,
uploadFieldName: 'photos', uploadFieldName: 'photos',
fileCount: 0, fileCount: 0,
redirectLink : null, redirectLink: null,
step: 1, step: 1,
dataset : dataset dataset: dataset
// dataset: { // dataset: {
// type: '', // type: '',
// state: '', // state: '',
@ -85,7 +85,7 @@ const app = new Vue({
// checkedSubmitters: [], // checkedSubmitters: [],
// } // }
} }
}, },
created: function () { created: function () {
VeeValidate.Validator.extend('Name', { VeeValidate.Validator.extend('Name', {
getMessage: field => '* Enter valid ' + field + '', getMessage: field => '* Enter valid ' + field + '',
@ -96,13 +96,13 @@ const app = new Vue({
getMessage: field => 'At least one ' + field + ' needs to be checked.', getMessage: field => 'At least one ' + field + ' needs to be checked.',
validate: (value, [testProp]) => { validate: (value, [testProp]) => {
const options = this.dataset.checkedLicenses; const options = this.dataset.checkedLicenses;
return value || options.some((option) => option[testProp]); return value || options.some((option) => option[testProp]);
} }
}); });
}, },
mounted() { mounted() {
//this.step = 2; //this.step = 2;
this.reset(); this.reset();
}, },
computed: { computed: {
isInitial() { isInitial() {
@ -266,17 +266,28 @@ const app = new Vue({
/* /*
Handles a change on the file upload Handles a change on the file upload
*/ */
addReference() { addReference() {
let newReference = { value: '', label: '', relation: 'updates', type: 'rdr-id' }; let newReference = { value: '', label: '', relation: '', type: '' };
//this.dataset.files.push(uploadedFiles[i]); //this.dataset.files.push(uploadedFiles[i]);
this.dataset.references.push(newReference); this.dataset.references.push(newReference);
}, },
/* /*
Removes a selected reference Removes a selected reference
*/ */
removeReference(key) { removeReference(key) {
this.dataset.references.splice(key, 1); this.dataset.references.splice(key, 1);
}, },
addTitle() {
let newTitle = { value: '', language: '', type: '' };
//this.dataset.files.push(uploadedFiles[i]);
this.dataset.titles.push(newTitle);
},
/*
Removes a selected reference
*/
removeTitle(key) {
this.dataset.titles.splice(key, 1);
},
filesChange(fieldName, fileList) { filesChange(fieldName, fileList) {
this.fileCount = fileList.length this.fileCount = fileList.length
// this.dataset.files = this.$refs.files.files; // this.dataset.files = this.$refs.files.files;
@ -300,7 +311,7 @@ const app = new Vue({
onAddAuthor(person) { onAddAuthor(person) {
//if person is not in person array //if person is not in person array
//if (this.persons.includes(person) == false) { //if (this.persons.includes(person) == false) {
if (this.dataset.persons.filter(e => e.id === person.id).length == 0) { if (this.dataset.persons.filter(e => e.id === person.id).length == 0) {
this.dataset.persons.push(person); this.dataset.persons.push(person);
this.dataset.checkedAuthors.push(person.id); this.dataset.checkedAuthors.push(person.id);
} }
@ -308,7 +319,7 @@ const app = new Vue({
onAddContributor(person) { onAddContributor(person) {
//if person is not in contributors array //if person is not in contributors array
//if (this.contributors.includes(person) == false) { //if (this.contributors.includes(person) == false) {
if (this.dataset.contributors.filter(e => e.id === person.id).length == 0) { if (this.dataset.contributors.filter(e => e.id === person.id).length == 0) {
this.dataset.contributors.push(person); this.dataset.contributors.push(person);
this.dataset.checkedContributors.push(person.id); this.dataset.checkedContributors.push(person.id);
} }
@ -316,7 +327,7 @@ const app = new Vue({
onAddSubmitter(person) { onAddSubmitter(person) {
//if person is not in submitters array //if person is not in submitters array
//if (this.submitters.includes(person) == false) { //if (this.submitters.includes(person) == false) {
if (this.dataset.submitters.filter(e => e.id === person.id).length == 0) { if (this.dataset.submitters.filter(e => e.id === person.id).length == 0) {
this.dataset.submitters.push(person); this.dataset.submitters.push(person);
this.dataset.checkedSubmitters.push(person.id); this.dataset.checkedSubmitters.push(person.id);
} }

View File

@ -17,23 +17,107 @@
{{ csrf_field() }} {{ csrf_field() }}
<div v-if="step === 1 && isInitial" data-vv-scope="step-1"> <div v-if="step === 1 && isInitial" data-vv-scope="step-1">
<h1>Step One</h1> <h1>Step One: Mandatory Elements</h1>
<div class="form-group"> <div class="form-group">
<legend>Datensatztyp</legend> <legend>General</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>
</div> </div>
<p></p> <p></p>
<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 --', 'v-model' =>
'dataset.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-1']) !!} 'dataset.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-1']) !!}
</div> </div>
</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>
<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']) !!}
</div>
</div>
</div> </div>
<fieldset id="fieldset-titles">
<legend>Title(s)</legend>
<div class="pure-g">
<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:3'", "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..') !!}
<div class="select pure-u-23-24">
{!! Form::select('TitleMain[Language]', $languages, null, ['placeholder' => '--no language--', 'v-model' => 'dataset.title_main.language',
"v-validate" => "'required'", "data-vv-as" => "Title Language", 'data-vv-scope' => 'step-1']) !!}
</div>
</div>
</div>
<button class="pure-button button-small" @click.prevent="addTitle()">+</button>
<table class="pure-table pure-table-horizontal" v-if="dataset.titles.length">
<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="(item, index) in dataset.titles">
<td>
<input name="Title" class="form-control" placeholder="[TITLE]" v-model="item.value" v-validate="'required'" data-vv-scope="step-1" />
</td>
<td>
{!! Form::select('Title[Type]', $titleTypes, null,
['placeholder' => '[titleType]', 'v-model' => 'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-1']) !!}
</td>
<td>
{!! Form::select('Title[Relation]', $languages, null,
['placeholder' => '[language]', 'v-model' => 'item.language', 'data-vv-scope' => 'step-1']) !!}
</td>
<td>
<button class="pure-button button-small is-warning" @click.prevent="removeTitle(index)">-</button>
</td>
</tr>
</tbody>
</table>
</fieldset>
<fieldset id="fieldset-general">
<legend>Creator(s)</legend>
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2 pure-div">
<my-autocomplete title="searching active person table" @person="onAddAuthor"></my-autocomplete>
{{--
<my-autocomplete :items="[ 'Apple', 'Banana', 'Orange', 'Mango', 'Pear', 'Peach', 'Grape', 'Tangerine', 'Pineapple']"></my-autocomplete> --}}
</div>
<div class="pure-u-1 pure-u-md-1-2 pure-div">
<div class="pure-control-group checkboxlist">
<label v-for="(person, index) in dataset.persons" :for="person.id" class="pure-checkbox">
<input type="checkbox" name="persons" v-bind:value="person.id" v-model="dataset.checkedAuthors" class="form-check-input" data-vv-scope="step-1">
@{{ person.full_name }}
</label>
<br />
{{-- <span>Checked Authors: @{{ dataset.checkedAuthors }}</span> --}}
</div>
</div>
</div>
</fieldset>
<fieldset id="fieldset-publisher">
<legend>Publisher</legend>
<div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('CreatingCorporation', 'Creating Corporation') !!}
{!! Form::text('CreatingCorporation', null, ['class' =>
'pure-u-23-24', 'v-model' => 'dataset.creating_corporation', "v-validate" => "'required'", 'data-vv-scope' => 'step-1']) !!}
</div>
</fieldset>
<div :class="{'form-group':true, 'has-error':errors.has('rights')}"> <div :class="{'form-group':true, 'has-error':errors.has('rights')}">
<legend>Einräumung eines einfachen Nutzungsrechts</legend> <legend>Einräumung eines einfachen Nutzungsrechts</legend>
@ -52,7 +136,7 @@
<span v-show="errors.has('step-1.rights')" class="text-danger">@{{ errors.first('step-1.rights') }}</span> <span v-show="errors.has('step-1.rights')" class="text-danger">@{{ errors.first('step-1.rights') }}</span>
<span class="help-block">You must agree to continue</span> {{-- </div> --}} <span class="help-block">You must agree to continue</span>
</div> </div>
<br /> <br />
@ -71,18 +155,10 @@
</div> </div>
<div v-if="step === 2 && isInitial" data-vv-scope="step-2"> <div v-if="step === 2 && isInitial" data-vv-scope="step-2">
<h1>Step Two</h1> <h1>Step Two: Recommended Elements</h1>
<fieldset id="fieldset-general"> <fieldset id="fieldset-general">
<legend>General</legend> <legend>General</legend>
<div class="pure-g"> <div class="pure-g">
{{--
<div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('Person', 'Person..') !!}
<div class="select pure-u-23-24">
{!! Form::select('Person', $persons, null, ['id' => 'type', 'placeholder' => '-- select person --']) !!}
</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('Type', 'Type..') !!} {!! Form::label('Type', 'Type..') !!}
@ -104,13 +180,7 @@
{!! Form::select( 'State', array_except(Config::get('enums.server_states'),['published', 'deleted', 'temporary']), '', {!! Form::select( 'State', array_except(Config::get('enums.server_states'),['published', 'deleted', 'temporary']), '',
['placeholder' => '-- select server state --', 'v-model' => 'dataset.state', "v-validate" => "'required'", 'data-vv-scope' => 'step-2'] ) !!} ['placeholder' => '-- select server state --', 'v-model' => 'dataset.state', "v-validate" => "'required'", 'data-vv-scope' => 'step-2'] ) !!}
</div> --}} </div> --}}
</div> </div>
<div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('CreatingCorporation', 'Creating Corporation') !!}
{!! Form::text('CreatingCorporation', null, ['class' =>
'pure-u-23-24', 'v-model' => 'dataset.creating_corporation', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
</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('project_id', 'Project..') !!} {!! Form::label('project_id', 'Project..') !!}
@ -219,7 +289,7 @@
</div> </div>
</fieldset> </fieldset>
<fieldset id="fieldset-references"> <fieldset id="fieldset-references">
<legend>Document references</legend> <legend>Dataset references</legend>
<button class="pure-button button-small" @click.prevent="addReference()">Add Reference</button> <button class="pure-button button-small" @click.prevent="addReference()">Add Reference</button>
<table class="table table-hover" v-if="dataset.references.length"> <table class="table table-hover" v-if="dataset.references.length">
<thead> <thead>
@ -234,15 +304,15 @@
<tbody> <tbody>
<tr v-for="(item, index) in dataset.references"> <tr v-for="(item, index) in dataset.references">
<td> <td>
<input name="Reference Value" class="form-control" v-model="item.value" v-validate="'required'" data-vv-scope="step-2" /> <input name="Reference Value" class="form-control" placeholder="[RELATED IDENTIFIER]" v-model="item.value" v-validate="'required'" data-vv-scope="step-2" />
</td> </td>
<td> <td>
{!! Form::select('Reference[Type]', $types, null, {!! Form::select('Reference[Type]', $relatedIdentifierTypes, null,
['placeholder' => '--no type--', 'v-model' => 'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!} ['placeholder' => '[relatedIdentifierType]', 'v-model' => 'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
</td> </td>
<td> <td>
{!! Form::select('Reference[Relation]', $relations, null, {!! Form::select('Reference[Relation]', $relationTypes, null,
['placeholder' => '--no relation--', 'v-model' => 'item.relation', 'data-vv-scope' => 'step-2']) !!} ['placeholder' => '[relationType]', 'v-model' => 'item.relation', 'data-vv-scope' => 'step-2']) !!}
</td> </td>
<td> <td>
<input name="Reference Label" class="form-control" v-model="item.label" v-validate="'required'" data-vv-scope="step-2" /> <input name="Reference Label" class="form-control" v-model="item.label" v-validate="'required'" data-vv-scope="step-2" />
@ -276,28 +346,7 @@
</div> </div>
<div v-if="step === 3 && isInitial" data-vv-scope="step-3"> <div v-if="step === 3 && isInitial" data-vv-scope="step-3">
<h1>Select authors, contributors, submitters</h1> <h1>Select contributors, submitters</h1>
<fieldset id="fieldset-general">
<legend>Authors</legend>
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2 pure-div">
<my-autocomplete title="searching active person table" @person="onAddAuthor"></my-autocomplete>
{{--
<my-autocomplete :items="[ 'Apple', 'Banana', 'Orange', 'Mango', 'Pear', 'Peach', 'Grape', 'Tangerine', 'Pineapple']"></my-autocomplete> --}}
</div>
<div class="pure-u-1 pure-u-md-1-2 pure-div">
<div class="pure-control-group checkboxlist">
<label v-for="(person, index) in dataset.persons" :for="person.id" class="pure-checkbox">
<input type="checkbox" name="persons" v-bind:value="person.id" v-model="dataset.checkedAuthors" class="form-check-input" data-vv-scope="step-3">
@{{ person.full_name }}
</label>
<br />
<span>Checked Authors: @{{ dataset.checkedAuthors }}</span>
</div>
</div>
</div>
</fieldset>
<fieldset id="fieldset-general"> <fieldset id="fieldset-general">
<legend>Contributors</legend> <legend>Contributors</legend>

View File

@ -0,0 +1,51 @@
@extends('settings.layouts.app')
@section('content')
<div class="header">
<h3 class="header-title">
<i class="fa fa-file"></i>
<span> File Extensions</span>
</h3>
</div>
<div class="pure-g box-content">
<div class="pure-u-1 pure-u-md-2-3">
<a class="pure-button button-small is-primary" href="{{ route('access.user.create') }}">
<i class="fa fa-plus-circle"></i>
<span>Create New File Extension</span>
</a>
<br><br>
@if ($message = Session::get('success'))
<div class="alert summary-success">
<p>{{ $message }}</p>
</div>
@endif
<table class="pure-table users">
<thead>
<tr>
<th>File Extensions</th>
<th width="280px">Action</th>
</tr>
</thead>
<tbody>
@foreach ($fileextensions as $key => $fileextension)
<tr>
<td>{{ $fileextension }}</td>
<td>
{{-- <a class="edit" href="{{ route('access.user.edit', $user->id) }}">&nbsp;Edit</a>
<span>&nbsp;</span>
<a class="delete" href="{{ route('access.user.destroy', $user->id) }}"><span>&nbsp;Delete</span></a> --}}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@stop

View File

@ -71,6 +71,10 @@
<a class="pure-menu-link" href="{{ route('settings.project') }}"><i class="fa fa-tasks"></i> Projects</a> <a class="pure-menu-link" href="{{ route('settings.project') }}"><i class="fa fa-tasks"></i> Projects</a>
</li> </li>
<li class="pure-menu-item {{ Route::is('settings.filetype') ? 'active' : '' }}">
<a class="pure-menu-link" href="{{ route('settings.filetype.index') }}"><i class="fa fa-archive"></i> Filetypes</a>
</li>
@permission('page') @permission('page')
<li class="{{ active_class(Active::checkUriPattern('settings/page*')) }}"> <li class="{{ active_class(Active::checkUriPattern('settings/page*')) }}">
<a class="pure-menu-link" href="{{ route('settings.page.index') }}"> <a class="pure-menu-link" href="{{ route('settings.page.index') }}">

View File

@ -153,6 +153,31 @@ Route::group(['middleware' => ['permission:settings']], function () {
'as' => 'settings.file.download', 'uses' => 'Settings\FileController@download', 'as' => 'settings.file.download', 'uses' => 'Settings\FileController@download',
]); ]);
//=================================================setting filetype=============================================
Route::get('/settings/filetype', [
'as' => 'settings.filetype.index', 'uses' => 'Settings\FiletypeController@index',
]);
// Route::get('/settings/collection/create', [
// 'as' => 'settings.collection.create', 'uses' => 'Settings\CollectionController@create',
// ]);
// Route::post('settings/collection/store', [
// 'as' => 'settings.collection.store', 'uses' => 'Settings\CollectionController@store',
// ]);
// Route::get('settings/collection/edit/{id}', [
// 'as' => 'settings.collection.edit', 'uses' => 'Settings\CollectionController@edit',
// ]);
// Route::patch('settings/collection/edit/{id}', [
// 'as' => 'settings.collection.update', 'uses' => 'Settings\CollectionController@update',
// ]);
// Route::get('settings/collection/show/{collection}', [
// 'as' => 'settings.collection.show', 'uses' => 'Settings\CollectionController@show',
// ]);
// Route::get('settings/collection/delete/{id}', [
// 'as' => 'settings.collection.delete', 'uses' => 'Settings\CollectionController@delete',
// ]);
//=================================================setting collection============================================= //=================================================setting collection=============================================
Route::get('/settings/collection', [ Route::get('/settings/collection', [
'as' => 'settings.collection.index', 'uses' => 'Settings\CollectionController@index', 'as' => 'settings.collection.index', 'uses' => 'Settings\CollectionController@index',