add publish module
This commit is contained in:
parent
100f6db9a6
commit
ffbbc04206
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Library\Xml\DatasetExtension;
|
||||
use phpDocumentor\Reflection\Types\Null_;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\Title;
|
||||
|
||||
class Dataset extends Model
|
||||
{
|
||||
|
@ -13,16 +13,17 @@ class Dataset extends Model
|
|||
|
||||
//public $timestamps = false; //default true
|
||||
// customize the names of the columns used to store the timestamps:
|
||||
const CREATED_AT = 'server_date_created';
|
||||
const CREATED_AT = 'created_at';
|
||||
const UPDATED_AT = 'server_date_modified';
|
||||
const PUBLISHED_AT = 'server_date_published';
|
||||
|
||||
protected $fillable = [
|
||||
'type',
|
||||
'publication_state',
|
||||
'thesis_year_accepted',
|
||||
'server_state',
|
||||
'creating_corporation',
|
||||
'project_id',
|
||||
'embargo_date'
|
||||
'embargo_date',
|
||||
'belongs_to_bibliography'
|
||||
];
|
||||
/**
|
||||
* The attributes that should be mutated to dates.
|
||||
|
@ -32,17 +33,19 @@ class Dataset extends Model
|
|||
protected $dates = [
|
||||
'server_date_created',
|
||||
'server_date_modified',
|
||||
'server_date_published'
|
||||
'server_date_published',
|
||||
];
|
||||
//protected $dateFormat = 'Y-m-d';
|
||||
|
||||
|
||||
public function __construct(array $attributes = array())
|
||||
{
|
||||
parent::__construct($attributes);
|
||||
// $this->_init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the project that the product belongs to.
|
||||
*/
|
||||
public function project()
|
||||
{
|
||||
return $this->belongsTo(\App\Project::class, 'project_id', 'id');
|
||||
|
@ -82,7 +85,7 @@ class Dataset extends Model
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addAuthor(\App\User $user) : void
|
||||
public function addAuthor(\App\User $user): void
|
||||
{
|
||||
$this->persons()->save($user, ['role' => 'author']);
|
||||
}
|
||||
|
@ -102,16 +105,22 @@ class Dataset extends Model
|
|||
#endregion
|
||||
|
||||
#region title table:
|
||||
public function titlesAbstracts()
|
||||
{
|
||||
return $this->hasMany(Title::class, 'document_id', 'id');
|
||||
}
|
||||
|
||||
public function titles()
|
||||
{
|
||||
return $this->hasMany(\App\Title::class, 'document_id', 'id')
|
||||
return $this->hasMany(Title::class, 'document_id', 'id')
|
||||
->where('type', 'main');
|
||||
}
|
||||
// public function addTitle(\App\Title $title)
|
||||
// {
|
||||
// $this->persons()->save($title, ['type' => 'main']);
|
||||
// }
|
||||
public function addMainTitle(Title $title)
|
||||
{
|
||||
$title->type = 'main';
|
||||
$this->titlesAbstracts()->save($title);
|
||||
// $this->titles()->save($title, ['type' => 'main']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Relation abstracts
|
||||
|
@ -120,15 +129,17 @@ class Dataset extends Model
|
|||
*/
|
||||
public function abstracts()
|
||||
{
|
||||
return $this->hasMany(\App\Title::class, 'document_id', 'id')
|
||||
return $this->hasMany(Title::class, 'document_id', 'id')
|
||||
->where('type', 'abstract');
|
||||
}
|
||||
// public function addAbstract (\App\Title $title)
|
||||
// {
|
||||
// $this->persons()->save($title, ['type' => 'abstract']);
|
||||
// }
|
||||
public function addMainAbstract(Title $title)
|
||||
{
|
||||
$title->type = 'abstract';
|
||||
$this->titlesAbstracts()->save($title);
|
||||
// $this->abstracts()->save($title, ['type' => 'abstract']);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion title table
|
||||
|
||||
public function licenses()
|
||||
{
|
||||
|
@ -137,7 +148,7 @@ class Dataset extends Model
|
|||
|
||||
public function files()
|
||||
{
|
||||
return $this->hasMany(\App\File::class, 'document_id', 'id');
|
||||
return $this->hasMany(\App\Models\File::class, 'document_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -150,8 +161,6 @@ class Dataset extends Model
|
|||
return $this->hasOne(\App\XmlCache::class, 'document_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function scopeOrderByType($query)
|
||||
{
|
||||
return $query->orderBy('type');
|
||||
|
|
19
app/File.php
19
app/File.php
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class File extends Model
|
||||
{
|
||||
protected $table = 'document_files';
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
protected $fillable = [];
|
||||
|
||||
public function dataset()
|
||||
{
|
||||
return $this->belongsTo(\App\Dataset::class, 'document_id', 'id');
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ class LoginController extends Controller
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/';
|
||||
protected $redirectTo = '/settings';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
@ -46,6 +46,6 @@ class LoginController extends Controller
|
|||
|
||||
$request->session()->regenerate();
|
||||
|
||||
return redirect('/');
|
||||
return redirect('/settings');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,19 @@
|
|||
//https://www.5balloons.info/multi-page-step-form-in-laravel-with-validation/
|
||||
namespace App\Http\Controllers\Publish;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Dataset;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\License;
|
||||
use App\Models\File;
|
||||
use App\Person;
|
||||
use App\Models\Title;
|
||||
use App\Rules\RdrFiletypes;
|
||||
use App\Rules\RdrFilesize;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class IndexController extends Controller
|
||||
{
|
||||
|
@ -26,8 +35,17 @@ class IndexController extends Controller
|
|||
*/
|
||||
public function createStep1(Request $request)
|
||||
{
|
||||
$dataset = $request->session()->get('dataset');
|
||||
return view('publish.create-step1', compact('dataset', $dataset));
|
||||
#$dataset = $request->session()->get('dataset');
|
||||
$licenses = License::all('id', 'name_long');
|
||||
$languages = DB::table('languages')
|
||||
->where('active', true)
|
||||
->pluck('part2_t', 'part2_t');
|
||||
// ->toArray();
|
||||
|
||||
$persons = Person::where('status', 1)
|
||||
->pluck('last_name', 'id');
|
||||
|
||||
return view('publish.create-step1', compact('licenses', 'languages', 'persons'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,7 +58,7 @@ class IndexController extends Controller
|
|||
{
|
||||
$validatedData = $this->validate($request, [
|
||||
'Type' => 'required|min:4',
|
||||
'rights' => 'required|boolean|in:1'
|
||||
'rights' => 'required|boolean|in:1',
|
||||
]);
|
||||
// $validatedData = $request->validate([
|
||||
// 'name' => 'required|unique:products',
|
||||
|
@ -100,7 +118,7 @@ class IndexController extends Controller
|
|||
"TitleMain.Value" => 'required|min:5|max:255',
|
||||
"TitleMain.Language" => 'required|min:3',
|
||||
"TitleAbstract.Value" => 'required|min:5|max:255',
|
||||
"TitleAbstract.Language" => 'required|min:3'
|
||||
"TitleAbstract.Language" => 'required|min:3',
|
||||
]);
|
||||
$optionalData = $request->all();
|
||||
|
||||
|
@ -109,12 +127,12 @@ class IndexController extends Controller
|
|||
$dataset = $request->session()->get('dataset');
|
||||
|
||||
//update dataset with validated data
|
||||
$dataset['Type'] = $validatedData['Type'];
|
||||
$dataset['BelongsToBibliography'] = $validatedData['BelongsToBibliography'];
|
||||
$dataset['TitleMain']['Value'] = $validatedData['TitleMain']['Value'];
|
||||
$dataset['TitleMain']['Language'] = $validatedData['TitleMain']['Language'];
|
||||
$dataset['TitleAbstract']['Value'] = $validatedData['TitleAbstract']['Value'];
|
||||
$dataset['TitleAbstract']['Language'] = $validatedData['TitleAbstract']['Language'];
|
||||
$dataset['Type'] = $validatedData['Type'];
|
||||
$dataset['BelongsToBibliography'] = $validatedData['BelongsToBibliography'];
|
||||
$dataset['TitleMain']['Value'] = $validatedData['TitleMain']['Value'];
|
||||
$dataset['TitleMain']['Language'] = $validatedData['TitleMain']['Language'];
|
||||
$dataset['TitleAbstract']['Value'] = $validatedData['TitleAbstract']['Value'];
|
||||
$dataset['TitleAbstract']['Language'] = $validatedData['TitleAbstract']['Language'];
|
||||
if (isset($optionalData['CreatingCorporation'])) {
|
||||
$dataset['CreatingCorporation'] = $optionalData['CreatingCorporation'];
|
||||
}
|
||||
|
@ -124,7 +142,7 @@ class IndexController extends Controller
|
|||
|
||||
if (!isset($dataset['DatasetFile'])) {
|
||||
$this->validate($request, [
|
||||
'dataset_file' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048'
|
||||
'dataset_file' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
|
||||
]);
|
||||
|
||||
//update session variable
|
||||
|
@ -151,7 +169,7 @@ class IndexController extends Controller
|
|||
*/
|
||||
public function createStep3(Request $request)
|
||||
{
|
||||
//if no dataset is'nt in session variable return to step1
|
||||
//if no dataset is'nt in session variable return to step1
|
||||
if (empty($request->session()->get('dataset'))) {
|
||||
return redirect()->route('dataset.create1');
|
||||
}
|
||||
|
@ -159,17 +177,157 @@ class IndexController extends Controller
|
|||
return view('publish.create-step3', compact('dataset'));
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function storeTest(Request $request)
|
||||
{
|
||||
//$data = $request->all();
|
||||
$data = json_decode($request->getContent(), true);
|
||||
|
||||
$validator = Validator::make($data, [
|
||||
'type' => 'required|min:4',
|
||||
'belongs_to_bibliography' => 'required|boolean',
|
||||
]);
|
||||
if ($validator->passes()) {
|
||||
//TODO Handle your data
|
||||
return response()->json(array(
|
||||
'response' => 'success'));
|
||||
} else {
|
||||
//TODO Handle your error
|
||||
//pass validator errors as errors object for ajax response
|
||||
return response()->json(['errors' => $validator->errors()->all()], 422);
|
||||
}
|
||||
}
|
||||
|
||||
//https://laravel.io/forum/06-11-2014-how-to-save-eloquent-model-with-relations-in-one-go
|
||||
//attach vs save https://stackoverflow.com/questions/35756469/laravel-5-many-to-many-attach-versus-save
|
||||
public function store(Request $request)
|
||||
{
|
||||
$dataset = $request->session()->get('dataset');
|
||||
// $product->save();
|
||||
// return redirect('/dataset');
|
||||
$data = $request->all();
|
||||
// $validatedData = $this->validate($request, [
|
||||
// 'type' => 'required|min:4',
|
||||
// 'rights' => 'required|boolean|in:1',
|
||||
// ]);
|
||||
$rules = [
|
||||
'server_state' => 'required',
|
||||
'type' => 'required|min:5',
|
||||
'rights' => 'required|boolean|in:1',
|
||||
'belongs_to_bibliography' => 'required|boolean',
|
||||
'title_main.value' => 'required|min:5',
|
||||
'title_main.language' => 'required',
|
||||
];
|
||||
if (null != $request->file('files')) {
|
||||
$files = count($request->file('files')) - 1;
|
||||
foreach (range(0, $files) as $index) {
|
||||
// $rules['files.' . $index] = 'image|max:2048';
|
||||
$rules['files.' . $index . '.file'] = ['required', 'file', new RdrFiletypes(), new RdrFilesize()];
|
||||
}
|
||||
}
|
||||
$validator = Validator::make($request->all(), $rules);
|
||||
if ($validator->passes()) {
|
||||
//store dataset todo
|
||||
//$data = $request->all();
|
||||
$input = $request->except('files', 'licenses', 'abstract_main', 'title_main');
|
||||
// array_push($input, "Himbeere");
|
||||
$dataset = new Dataset($input);
|
||||
|
||||
DB::beginTransaction(); //Start transaction!
|
||||
try {
|
||||
$dataset->save();
|
||||
|
||||
//store related files
|
||||
if (null != $data['files']) {
|
||||
foreach ($data['files'] as $uploadedFile) {
|
||||
$file = $uploadedFile['file'];
|
||||
$label = urldecode($uploadedFile['label']);
|
||||
$sorting = $uploadedFile['sorting'];
|
||||
$fileName = "productImage-" . 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);
|
||||
$file = new File([
|
||||
'path_name' => $path,
|
||||
'file_size' => $size,
|
||||
'mime_type' => $mimeType,
|
||||
'label' => $label,
|
||||
'sort_order' => $sorting,
|
||||
'visible_in_frontdoor' => 1,
|
||||
'visible_in_oai' => 1
|
||||
]);
|
||||
//$test = $file->path_name;
|
||||
$dataset->files()->save($file);
|
||||
$file->createHashValues();
|
||||
}
|
||||
}
|
||||
|
||||
//store licenses:
|
||||
$licenses = $request->input('licenses');
|
||||
$dataset->licenses()->sync($licenses);
|
||||
|
||||
//save main title:
|
||||
if (isset($data['title_main'])) {
|
||||
$formTitle = $request->input('title_main');
|
||||
$title = new Title();
|
||||
$title->value = $formTitle['value'];
|
||||
$title->language = $formTitle['language'];
|
||||
$dataset->addMainTitle($title);
|
||||
}
|
||||
|
||||
//save main abstract:
|
||||
if (isset($data['abstract_main'])) {
|
||||
$formAbstract = $request->input('abstract_main');
|
||||
$abstract = new Title();
|
||||
$abstract->value = $formAbstract['value'];
|
||||
$abstract->language = $formAbstract['language'];
|
||||
$dataset->addMainAbstract($abstract);
|
||||
}
|
||||
|
||||
// $error = 'Always throw this error';
|
||||
// throw new \Exception($error);
|
||||
|
||||
// all good//commit everything
|
||||
DB::commit();
|
||||
} catch (\Exception $e) {
|
||||
DB::rollback();
|
||||
Storage::deleteDirectory($datasetFolder);
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'error' => [
|
||||
'code' => $e->getCode(),
|
||||
'message' => $e->getMessage(),
|
||||
],
|
||||
], 422);
|
||||
//throw $e;
|
||||
} catch (\Throwable $e) {
|
||||
DB::rollback();
|
||||
Storage::deleteDirectory($datasetFolder);
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'error' => [
|
||||
'code' => $e->getCode(),
|
||||
'message' => $e->getMessage(),
|
||||
],
|
||||
], 422);
|
||||
//throw $e;
|
||||
}
|
||||
|
||||
return response()->json(array(
|
||||
'redirect' => route('settings.document', ['state' => $dataset->server_state]),
|
||||
));
|
||||
} else {
|
||||
//TODO Handle validation error
|
||||
//pass validator errors as errors object for ajax response
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'errors' => $validator->errors()->all(),
|
||||
], 422);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?php
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use App\Http\Requests;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Project;
|
||||
use App\Http\Requests\ProjectRequest;
|
||||
use Illuminate\View\View;
|
||||
use App\Project;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
|
@ -17,7 +16,7 @@ class CategoryController extends Controller
|
|||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
public function index() : View
|
||||
public function index(): View
|
||||
{
|
||||
$projects = Project::get();
|
||||
return view('settings.project.category', compact('projects'));
|
||||
|
@ -28,12 +27,12 @@ class CategoryController extends Controller
|
|||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function add() : View
|
||||
public function add(): View
|
||||
{
|
||||
return view('settings.project.add');
|
||||
}
|
||||
|
||||
public function store(ProjectRequest $request) : RedirectResponse
|
||||
public function store(ProjectRequest $request): RedirectResponse
|
||||
{
|
||||
$input = $request->all();
|
||||
Project::create($input);
|
||||
|
@ -47,7 +46,7 @@ class CategoryController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id) : View
|
||||
public function edit($id): View
|
||||
{
|
||||
$project = Project::findOrFail($id);
|
||||
return view('settings.project.edit', compact('project'));
|
||||
|
@ -60,7 +59,7 @@ class CategoryController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update($id, ProjectRequest $request) : RedirectResponse
|
||||
public function update($id, ProjectRequest $request): RedirectResponse
|
||||
{
|
||||
$project = Project::findOrFail($id);
|
||||
$input = $request->all();
|
||||
|
@ -75,16 +74,16 @@ class CategoryController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function delete($id) : RedirectResponse
|
||||
public function delete($id): RedirectResponse
|
||||
{
|
||||
$project = Project::with('documents')->findOrFail($id);
|
||||
if ($project->documents->count() > 0) {
|
||||
session()->flash(
|
||||
'flash_message',
|
||||
'You cannot delete this project!'
|
||||
. ' There are '
|
||||
. $project->documents->count()
|
||||
. ' documents in this project!'
|
||||
. ' There are '
|
||||
. $project->documents->count()
|
||||
. ' documents in this project!'
|
||||
);
|
||||
return redirect()->route('settings.project');
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
namespace App\Http\Controllers;
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Requests;
|
||||
|
@ -24,8 +24,8 @@ class CollectionController extends Controller
|
|||
//$collections = Collection::take(10)->get();
|
||||
//$collections = Collection::get();
|
||||
$collections = Collection::with('documents')
|
||||
->paginate(8); //get();
|
||||
return view('rdr.settings.collection.collection', compact('collections'));
|
||||
->paginate(8); //get();
|
||||
return view('settings.collection.collection', compact('collections'));
|
||||
}
|
||||
|
||||
/**
|
|
@ -5,7 +5,7 @@ use App\Http\Controllers\Controller;
|
|||
use App\Dataset;
|
||||
use App\Project;
|
||||
use App\License;
|
||||
use App\Title;
|
||||
use App\Models\Title;
|
||||
use App\Http\Requests\DocumentRequest;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
@ -27,7 +27,14 @@ class DatasetController extends Controller
|
|||
//$registers = array();
|
||||
|
||||
$filter = $request->input('search');
|
||||
$state = (strlen($request->input('state')) > 0) ? $request->input('state') : "published";
|
||||
|
||||
if (null !== ($request->input('state'))) {
|
||||
$state = $request->input('state');
|
||||
} else {
|
||||
$state = "published";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data = $request->all();
|
||||
|
||||
|
@ -131,7 +138,10 @@ class DatasetController extends Controller
|
|||
// for($jahr = 1990; $jahr <= $nowYear; $jahr++){
|
||||
// $years[$jahr] = $jahr;
|
||||
// }
|
||||
return view('settings.document.edit', compact('document', 'projects', 'options', 'checkeds', 'years', 'languages'));
|
||||
return view(
|
||||
'settings.document.edit',
|
||||
compact('document', 'projects', 'options', 'checkeds', 'years', 'languages')
|
||||
);
|
||||
}
|
||||
|
||||
//https://stackoverflow.com/questions/17480200/using-laravel-how-do-i-create-a-view-that-will-update-a-one-to-many-relationshi?rq=1
|
||||
|
@ -145,18 +155,18 @@ class DatasetController extends Controller
|
|||
*/
|
||||
public function update(DocumentRequest $request, $id) : RedirectResponse
|
||||
{
|
||||
$document = Dataset::findOrFail($id);
|
||||
$dataset = Dataset::findOrFail($id);
|
||||
//$input = $request->all();
|
||||
$input = $request->except('licenses', 'titles');
|
||||
$document->update($input);
|
||||
// $document->type = $input['type'];
|
||||
// $document->thesis_year_accepted = $input['thesis_year_accepted'];
|
||||
// $document->project_id = $input['project_id'];
|
||||
// $document->save();
|
||||
$dataset->update($input);
|
||||
// $dataset->type = $input['type'];
|
||||
// $dataset->thesis_year_accepted = $input['thesis_year_accepted'];
|
||||
// $dataset->project_id = $input['project_id'];
|
||||
// $dataset->save();
|
||||
|
||||
$licenses = $request->input('licenses');
|
||||
//$licenses = $input['licenses'];
|
||||
$document->licenses()->sync($licenses);
|
||||
$dataset->licenses()->sync($licenses);
|
||||
|
||||
//save the titles:
|
||||
$titles = $request->input('titles');
|
||||
|
|
27
app/Http/Controllers/Settings/HomeController.php
Normal file
27
app/Http/Controllers/Settings/HomeController.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index(): View
|
||||
{
|
||||
return view('settings.home.index');
|
||||
}
|
||||
}
|
|
@ -35,8 +35,20 @@ class LicenseController extends Controller
|
|||
return view('settings.license.edit', compact('license', 'languages'));
|
||||
}
|
||||
|
||||
public function update($id, LicenseRequest $request): RedirectResponse
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
$validatedData = $this->validate($request, [
|
||||
'desc_text' => 'max:4000',
|
||||
'language' => 'max:3',
|
||||
'link_licence' => 'required|url:max:255',
|
||||
'link_logo' => 'url|max:255',
|
||||
'mime_type' => 'max:30',
|
||||
'name_long' => 'required|min:5|max:255',
|
||||
'sort_order' => 'required|integer',
|
||||
'active' => 'required|boolean',
|
||||
'pod_allowed' => 'required|boolean',
|
||||
]);
|
||||
|
||||
$license = License::findOrFail($id);
|
||||
$input = $request->all();
|
||||
$license->update($input);
|
||||
|
|
|
@ -73,7 +73,7 @@ class PersonController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update($id, PersonRequest $request)
|
||||
public function update(PersonRequest $request, $id)
|
||||
{
|
||||
$person = Person::findOrFail($id);
|
||||
$input = $request->all();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use App\Role;
|
||||
use App\Permission;
|
||||
use App\Models\Role;
|
||||
use App\Models\Permission;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
|
@ -38,7 +38,28 @@ class RoleController extends Controller
|
|||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
$this->validate($request, [
|
||||
'name' => 'required',
|
||||
'display_name' => 'max:255',
|
||||
'description' => 'max:255'
|
||||
]);
|
||||
//$input = $request->all();
|
||||
$input = $request->except('permissions');
|
||||
//$input = $request->only(['name']); //Retreive the name field
|
||||
$role = Role::create($input);
|
||||
|
||||
$permissions = $request['permissions']; //Retrieving permissions
|
||||
//Checking if a role was selected
|
||||
if (isset($permissions)) {
|
||||
foreach ($permissions as $permission) {
|
||||
$permission_r = Permission::where('id', '=', $permission)->firstOrFail();
|
||||
$role->attachPermission($permission_r); //Assigning permission to role
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()
|
||||
->route('role.index')
|
||||
->with('success', 'Role has been created successfully');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -64,7 +85,7 @@ class RoleController extends Controller
|
|||
$permissions = Permission::all('id', 'name');
|
||||
|
||||
//$userRoles = $user->roles->pluck('name','name')->all();
|
||||
$checkeds = $role->permissions->pluck('id')->toArray();
|
||||
$checkeds = $role->perms->pluck('id')->toArray();
|
||||
return view('settings.role.edit', compact('role', 'permissions', 'checkeds'));
|
||||
}
|
||||
|
||||
|
@ -78,7 +99,9 @@ class RoleController extends Controller
|
|||
public function update(Request $request, $id)
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'name' => 'required'
|
||||
'name' => 'required',
|
||||
'display_name' => 'max:255',
|
||||
'description' => 'max:255'
|
||||
]);
|
||||
$role = Role::findOrFail($id);
|
||||
$role->update($request->except('permissions'));
|
||||
|
@ -86,9 +109,9 @@ class RoleController extends Controller
|
|||
$permissions = $request->input('permissions') ? $request->input('permissions') : [];
|
||||
//$role->syncPermissions($permissions);
|
||||
if (isset($permissions)) {
|
||||
$role->permissions()->sync($permissions);//If one or more role is selected associate user to roles
|
||||
$role->perms()->sync($permissions);//If one or more role is selected associate user to roles
|
||||
} else {
|
||||
$role->permissions()->detach(); //If no role is selected remove exisiting role associated to a user
|
||||
$role->perms()->detach(); //If no role is selected remove exisiting role associated to a user
|
||||
}
|
||||
|
||||
return redirect()->route('role.index')
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
<?php
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Role;
|
||||
use App\User;
|
||||
//use Spatie\Permission\Models\Role;
|
||||
use App\Role;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
// public function __construct()
|
||||
// {
|
||||
// $this->middleware('permission:settings');
|
||||
// }
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
@ -22,9 +25,11 @@ class UserController extends Controller
|
|||
// return abort(401, 'Unauthorized action.');
|
||||
//}
|
||||
|
||||
$users = User::orderBy('id', 'DESC')->paginate(5);
|
||||
$users = User::with('roles')
|
||||
->orderBy('id', 'DESC')
|
||||
->paginate(5);
|
||||
return view('settings.user.user', compact('users'))
|
||||
->with('i', ($request->input('page', 1) - 1) * 5);
|
||||
->with('i', ($request->input('page', 1) - 1) * 5);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +40,7 @@ class UserController extends Controller
|
|||
public function create()
|
||||
{
|
||||
//$roles = Role::pluck('name','name')->all();
|
||||
$roles = Role::all('id', 'name');
|
||||
$roles = Role::all('id', 'name');
|
||||
return view('settings.user.create', compact('roles'));
|
||||
}
|
||||
|
||||
|
@ -56,7 +61,7 @@ class UserController extends Controller
|
|||
$this->validate($request, [
|
||||
'login' => 'required',
|
||||
'email' => 'required|email|unique:accounts',
|
||||
'password' => 'required|min:6|confirmed'
|
||||
'password' => 'required|min:6|confirmed',
|
||||
//'roles' => 'required'
|
||||
]);
|
||||
|
||||
|
@ -65,13 +70,12 @@ class UserController extends Controller
|
|||
$input['password'] = bcrypt($input['password']);
|
||||
$user = User::create($input);
|
||||
|
||||
|
||||
$roles = $request['roles']; //Retrieving the roles field
|
||||
$roles = $request['roles']; //Retrieving roles
|
||||
//Checking if a role was selected
|
||||
if (isset($roles)) {
|
||||
foreach ($roles as $role) {
|
||||
$role_r = Role::where('id', '=', $role)->firstOrFail();
|
||||
$user->assignRole($role_r); //Assigning role to user
|
||||
$user->attachRole($role_r); //Assigning role to user
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,11 +126,11 @@ class UserController extends Controller
|
|||
$this->validate(request(), [
|
||||
'login' => 'required',
|
||||
'email' => 'required|email|unique:accounts,email,' . $id,
|
||||
'password' => 'required|min:6|confirmed'
|
||||
'password' => 'required|min:6|confirmed',
|
||||
]);
|
||||
|
||||
$user = User::findOrFail($id);
|
||||
// $input = $request->except('roles');
|
||||
$user = User::findOrFail($id);
|
||||
// $input = $request->except('roles');
|
||||
// $user->fill($input)->save();
|
||||
|
||||
$input = $request->only(['login', 'email', 'password']); //Retreive the name, email and password fields
|
||||
|
@ -139,7 +143,7 @@ class UserController extends Controller
|
|||
$roles = $request['roles']; //Retreive all roles
|
||||
|
||||
if (isset($roles)) {
|
||||
$user->roles()->sync($roles);//If one or more role is selected associate user to roles
|
||||
$user->roles()->sync($roles); //If one or more role is selected associate user to roles
|
||||
} else {
|
||||
$user->roles()->detach(); //If no role is selected remove exisiting role associated to a user
|
||||
}
|
||||
|
|
|
@ -56,8 +56,12 @@ class Kernel extends HttpKernel
|
|||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,
|
||||
'perm' => \App\Http\Middleware\PermissionMiddleware::class,
|
||||
|
||||
// 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,
|
||||
// 'perm' => \App\Http\Middleware\PermissionMiddleware::class,
|
||||
// 'role' => \Zizaco\Entrust\Middleware\EntrustRole::class,
|
||||
'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class,
|
||||
'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class,
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ class DocumentRequest extends Request
|
|||
{
|
||||
return [
|
||||
'type' => 'required|min:5',
|
||||
'server_state' => 'required',
|
||||
// 'author' => 'required|min:4',
|
||||
// 'stock' => 'required|integer',
|
||||
// 'year' => 'required|integer|min:4'
|
||||
|
|
|
@ -47,7 +47,7 @@ trait DatasetExtension
|
|||
'fetch' => 'eager'
|
||||
),
|
||||
'File' => array(
|
||||
'model' => 'App\File',
|
||||
'model' => 'App\Models\File',
|
||||
'relation' => 'files',
|
||||
'fetch' => 'eager'
|
||||
),
|
||||
|
|
69
app/Models/File.php
Normal file
69
app/Models/File.php
Normal file
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Dataset;
|
||||
use App\Models\HashValue;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class File extends Model
|
||||
{
|
||||
protected $table = 'document_files';
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = ['path_name', 'file_size', 'mime_type', 'label', 'sort_order'];
|
||||
|
||||
public function dataset()
|
||||
{
|
||||
return $this->belongsTo(Dataset::class, 'document_id', 'id');
|
||||
}
|
||||
|
||||
public function hashvalues()
|
||||
{
|
||||
return $this->hasMany(HashValue::class, 'file_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create hash value model objects from original file.
|
||||
*
|
||||
* TODO throws Exception in case hash computation is not possible
|
||||
* (e.g., if referenced file is missing in file system)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function createHashValues()
|
||||
{
|
||||
$hashtypes = array('md5', 'sha512');
|
||||
|
||||
foreach ($hashtypes as $type) {
|
||||
$hash = new HashValue();
|
||||
$hash->type = $type;
|
||||
$hashString = $this->getRealHash($type);
|
||||
$hash->value = $hashString;
|
||||
$this->hashvalues()->save($hash);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the hash value of the file
|
||||
*
|
||||
* @param string $type Type of the hash value, @see hash_file();
|
||||
* @return string hash value
|
||||
*/
|
||||
private function getRealHash($type)
|
||||
{
|
||||
$hash = @hash_file($type, $this->getPath());
|
||||
if (empty($hash)) {
|
||||
throw new \Exception("Empty HASH for file '" . $this->getPath() . "'");
|
||||
}
|
||||
return $hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get full path of destination file.
|
||||
*/
|
||||
private function getPath()
|
||||
{
|
||||
return storage_path('app/public/' . $this->path_name);
|
||||
}
|
||||
}
|
17
app/Models/HashValue.php
Normal file
17
app/Models/HashValue.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\File;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class HashValue extends Model
|
||||
{
|
||||
protected $table = 'file_hashvalues';
|
||||
public $timestamps = false;
|
||||
|
||||
public function file()
|
||||
{
|
||||
return $this->belongsTo(File::class, 'file_id', 'id');
|
||||
}
|
||||
}
|
10
app/Models/Permission.php
Normal file
10
app/Models/Permission.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Zizaco\Entrust\EntrustPermission;
|
||||
|
||||
class Permission extends EntrustPermission
|
||||
{
|
||||
//
|
||||
}
|
15
app/Models/Role.php
Normal file
15
app/Models/Role.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Zizaco\Entrust\EntrustRole;
|
||||
|
||||
class Role extends EntrustRole
|
||||
{
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = ['name', 'description'];
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
namespace App;
|
||||
namespace App\Models;
|
||||
|
||||
//use App\Library\Xml\DatasetExtension;
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
<?php
|
||||
namespace App;
|
||||
|
||||
use Spatie\Permission\Guard;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
use Spatie\Permission\Traits\RefreshesPermissionCache;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Spatie\Permission\PermissionRegistrar;
|
||||
use Spatie\Permission\Exceptions\PermissionAlreadyExists;
|
||||
use Spatie\Permission\Exceptions\PermissionDoesNotExist;
|
||||
use Spatie\Permission\Contracts\Permission as PermissionContract;
|
||||
|
||||
class Permission extends Model implements PermissionContract
|
||||
{
|
||||
use HasRoles;
|
||||
use RefreshesPermissionCache;
|
||||
|
||||
public $guarded = ['id'];
|
||||
|
||||
public function __construct(array $attributes = [])
|
||||
{
|
||||
$attributes['guard_name'] = $attributes['guard_name'] ?? config('auth.defaults.guard');
|
||||
|
||||
parent::__construct($attributes);
|
||||
|
||||
$this->setTable(config('permission.table_names.permissions'));
|
||||
}
|
||||
|
||||
public static function create(array $attributes = [])
|
||||
{
|
||||
$attributes['guard_name'] = $attributes['guard_name'] ?? Guard::getDefaultName(static::class);
|
||||
$permission = static::getPermissions()->filter(function ($permission) use ($attributes) {
|
||||
return $permission->name === $attributes['name'] && $permission->guard_name === $attributes['guard_name'];
|
||||
})->first();
|
||||
|
||||
if ($permission) {
|
||||
throw PermissionAlreadyExists::create($attributes['name'], $attributes['guard_name']);
|
||||
}
|
||||
if (isNotLumen() && app()::VERSION < '5.4') {
|
||||
return parent::create($attributes);
|
||||
}
|
||||
return static::query()->create($attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* A permission can be applied to roles.
|
||||
*/
|
||||
public function roles() : BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
\App\Role::class,
|
||||
config('permission.table_names.role_has_permissions'),
|
||||
'permission_id',
|
||||
'role_id'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function findByName(string $name, $guardName = null): PermissionContract
|
||||
{
|
||||
$guardName = $guardName ?? Guard::getDefaultName(static::class);
|
||||
|
||||
$permission = static::getPermissions()
|
||||
->filter(function ($permission) use ($name, $guardName) {
|
||||
return $permission->name === $name && $permission->guard_name === $guardName;
|
||||
})
|
||||
->first();
|
||||
|
||||
if (! $permission) {
|
||||
throw PermissionDoesNotExist::create($name, $guardName);
|
||||
}
|
||||
|
||||
return $permission;
|
||||
}
|
||||
|
||||
public static function findById(int $id, $guardName = null): PermissionContract
|
||||
{
|
||||
$guardName = $guardName ?? Guard::getDefaultName(static::class);
|
||||
$permission = static::getPermissions()
|
||||
->filter(function ($permission) use ($id, $guardName) {
|
||||
return $permission->id === $id && $permission->guard_name === $guardName;
|
||||
})
|
||||
->first();
|
||||
|
||||
if (! $permission) {
|
||||
throw PermissionDoesNotExist::withId($id, $guardName);
|
||||
}
|
||||
return $permission;
|
||||
}
|
||||
|
||||
public static function findOrCreate(string $name, $guardName = null): PermissionContract
|
||||
{
|
||||
$guardName = $guardName ?? Guard::getDefaultName(static::class);
|
||||
$permission = static::getPermissions()
|
||||
->filter(function ($permission) use ($name, $guardName) {
|
||||
return $permission->name === $name && $permission->guard_name === $guardName;
|
||||
})
|
||||
->first();
|
||||
|
||||
if (! $permission) {
|
||||
return static::create(['name' => $name, 'guard_name' => $guardName]);
|
||||
}
|
||||
return $permission;
|
||||
}
|
||||
|
||||
protected static function getPermissions(): Collection
|
||||
{
|
||||
return app(PermissionRegistrar::class)->getPermissions();
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
<?php namespace App;
|
||||
<?php
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
|
|
@ -4,20 +4,20 @@ use Illuminate\Support\ServiceProvider;
|
|||
|
||||
class ConfigServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Overwrite any vendor / package configuration.
|
||||
*
|
||||
* This service provider is intended to provide a convenient location for you
|
||||
* to overwrite any "vendor" or package configuration that you may want to
|
||||
* modify before the application handles the incoming request / command.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
config([
|
||||
//
|
||||
]);
|
||||
}
|
||||
/**
|
||||
* Overwrite any vendor / package configuration.
|
||||
*
|
||||
* This service provider is intended to provide a convenient location for you
|
||||
* to overwrite any "vendor" or package configuration that you may want to
|
||||
* modify before the application handles the incoming request / command.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
config([
|
||||
//
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
122
app/Role.php
122
app/Role.php
|
@ -1,122 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Spatie\Permission\Contracts\Role as RoleContract;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Spatie\Permission\Exceptions\RoleDoesNotExist;
|
||||
use Spatie\Permission\Exceptions\GuardDoesNotMatch;
|
||||
use Spatie\Permission\Exceptions\RoleAlreadyExists;
|
||||
use Spatie\Permission\Guard;
|
||||
|
||||
use Spatie\Permission\Traits\HasPermissions;
|
||||
use Spatie\Permission\Traits\RefreshesPermissionCache;
|
||||
|
||||
class Role extends Model implements RoleContract
|
||||
{
|
||||
use HasPermissions;
|
||||
use RefreshesPermissionCache;
|
||||
|
||||
//protected $table = 'user_roles';
|
||||
public $timestamps = false;
|
||||
|
||||
public $guarded = ['id'];
|
||||
|
||||
public function __construct(array $attributes = [])
|
||||
{
|
||||
$attributes['guard_name'] = $attributes['guard_name'] ?? config('auth.defaults.guard');
|
||||
parent::__construct($attributes);
|
||||
$this->setTable(config('permission.table_names.roles'));
|
||||
}
|
||||
|
||||
public static function create(array $attributes = [])
|
||||
{
|
||||
$attributes['guard_name'] = $attributes['guard_name'] ?? Guard::getDefaultName(static::class);
|
||||
|
||||
if (static::where('name', $attributes['name'])
|
||||
->where('guard_name', $attributes['guard_name'])->first()) {
|
||||
throw RoleAlreadyExists::create($attributes['name'], $attributes['guard_name']);
|
||||
}
|
||||
|
||||
if (isNotLumen() && app()::VERSION < '5.4') {
|
||||
return parent::create($attributes);
|
||||
}
|
||||
|
||||
return static::query()->create($attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* A role may be given various permissions.
|
||||
*/
|
||||
public function permissions() : BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
\App\Permission::class,
|
||||
config('permission.table_names.role_has_permissions'),
|
||||
'role_id',
|
||||
'permission_id'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A role belongs to some users of the model associated with its guard.
|
||||
*/
|
||||
public function users() : BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
\App\User::class,
|
||||
config('permission.table_names.model_has_roles'),
|
||||
'role_id',
|
||||
'account_id'
|
||||
);
|
||||
}
|
||||
|
||||
public static function findByName(string $name, $guardName = null): RoleContract
|
||||
{
|
||||
$guardName = $guardName ?? Guard::getDefaultName(static::class);
|
||||
|
||||
$role = static::where('name', $name)->where('guard_name', $guardName)->first();
|
||||
if (! $role) {
|
||||
throw RoleDoesNotExist::named($name);
|
||||
}
|
||||
return $role;
|
||||
}
|
||||
|
||||
public static function findById(int $id, $guardName = null): RoleContract
|
||||
{
|
||||
$guardName = $guardName ?? Guard::getDefaultName(static::class);
|
||||
$role = static::where('id', $id)->where('guard_name', $guardName)->first();
|
||||
if (! $role) {
|
||||
throw RoleDoesNotExist::withId($id);
|
||||
}
|
||||
return $role;
|
||||
}
|
||||
|
||||
public static function findOrCreate(string $name, $guardName = null): RoleContract
|
||||
{
|
||||
$guardName = $guardName ?? Guard::getDefaultName(static::class);
|
||||
$role = static::where('name', $name)->where('guard_name', $guardName)->first();
|
||||
if (! $role) {
|
||||
return static::create(['name' => $name, 'guard_name' => $guardName]);
|
||||
}
|
||||
return $role;
|
||||
}
|
||||
|
||||
public function hasPermissionTo($permission): bool
|
||||
{
|
||||
if (is_string($permission)) {
|
||||
$permission = app(Permission::class)->findByName($permission, $this->getDefaultGuardName());
|
||||
}
|
||||
|
||||
if (is_int($permission)) {
|
||||
$permission = app(Permission::class)->findById($permission, $this->getDefaultGuardName());
|
||||
}
|
||||
|
||||
if (! $this->getGuardNames()->contains($permission->guard_name)) {
|
||||
throw GuardDoesNotMatch::create($permission->guard_name, $this->getGuardNames());
|
||||
}
|
||||
|
||||
return $this->permissions->contains('id', $permission->id);
|
||||
}
|
||||
}
|
63
app/Rules/RdrFilesize.php
Normal file
63
app/Rules/RdrFilesize.php
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
namespace App\Rules;
|
||||
|
||||
use Illuminate\Contracts\Validation\Rule;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
|
||||
class RdrFilesize implements Rule
|
||||
{
|
||||
protected $maxFileSize;
|
||||
|
||||
/**
|
||||
* Create a new rule instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->maxFileSize = Config::get('enums.max_filesize');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the validation rule passes.
|
||||
*
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
* @return bool
|
||||
*/
|
||||
public function passes($attribute, $value)
|
||||
{
|
||||
//return Rule::in($this->filetypes);
|
||||
return $this->getSize($attribute, $value) <= $this->maxFileSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation error message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function message()
|
||||
{
|
||||
return 'file :attribute is too large for the destination storage system.';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the size of an attribute.
|
||||
*
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
* @return mixed
|
||||
*/
|
||||
private function getSize($attribute, $value)
|
||||
{
|
||||
if (is_numeric($value) && $hasNumeric) {
|
||||
return array_get($this->data, $attribute);
|
||||
} elseif (is_array($value)) {
|
||||
return count($value);
|
||||
} elseif ($value instanceof File) {
|
||||
return $value->getSize() / 1024;
|
||||
}
|
||||
return mb_strlen($value);
|
||||
}
|
||||
}
|
66
app/Rules/RdrFiletypes.php
Normal file
66
app/Rules/RdrFiletypes.php
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace App\Rules;
|
||||
|
||||
use Illuminate\Contracts\Validation\Rule;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
|
||||
class RdrFiletypes implements Rule
|
||||
{
|
||||
protected $filetypes;
|
||||
// protected $maxFileSize;
|
||||
/**
|
||||
* Create a new rule instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->filetypes = Config::get('enums.filetypes_allowed', ['pdf']);
|
||||
// $this->maxFileSize = Config::get('enums.max_filesize');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the validation rule passes.
|
||||
*
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
* @return bool
|
||||
*/
|
||||
public function passes($attribute, $value)
|
||||
{
|
||||
//return Rule::in($this->filetypes);
|
||||
return $value->getPath() != '' &&
|
||||
in_array($value->guessExtension(), $this->filetypes); // &&
|
||||
// $this->getSize($attribute, $value) <= $this->maxFileSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation error message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function message()
|
||||
{
|
||||
return 'attribute :attribute has not a valid mime type.';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the size of an attribute.
|
||||
*
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
* @return mixed
|
||||
*/
|
||||
private function getSize($attribute, $value)
|
||||
{
|
||||
if (is_numeric($value) && $hasNumeric) {
|
||||
return array_get($this->data, $attribute);
|
||||
} elseif (is_array($value)) {
|
||||
return count($value);
|
||||
} elseif ($value instanceof File) {
|
||||
return $value->getSize() / 1024;
|
||||
}
|
||||
return mb_strlen($value);
|
||||
}
|
||||
}
|
31
app/User.php
31
app/User.php
|
@ -2,21 +2,20 @@
|
|||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Auth\Passwords\CanResetPassword;
|
||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
|
||||
#use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Zizaco\Entrust\Traits\EntrustUserTrait;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
class User extends Model implements AuthenticatableContract, CanResetPasswordContract, AuthorizableContract
|
||||
class User extends Authenticatable
|
||||
{
|
||||
// use Authenticatable, CanResetPassword, Authorizable;
|
||||
use Notifiable;
|
||||
|
||||
// use HasRoles;
|
||||
use EntrustUserTrait;
|
||||
|
||||
use Authenticatable, CanResetPassword, Authorizable;
|
||||
use HasRoles;
|
||||
|
||||
/**
|
||||
* The database table used by the model.
|
||||
|
@ -47,6 +46,16 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||
}
|
||||
}
|
||||
|
||||
public function getAvatarUrl()
|
||||
{
|
||||
return "https://www.gravatar.com/avatar/" . md5($this->email) . "?d=mm";
|
||||
}
|
||||
|
||||
public function getRoleNames(): Collection
|
||||
{
|
||||
return $this->roles->pluck('name');
|
||||
}
|
||||
|
||||
//public function roles()
|
||||
//{
|
||||
// return $this->belongsToMany(\App\Role::class, 'link_accounts_roles', 'account_id', 'role_id');
|
||||
|
|
|
@ -27,18 +27,18 @@ $app = new Illuminate\Foundation\Application(
|
|||
*/
|
||||
|
||||
$app->singleton(
|
||||
'Illuminate\Contracts\Http\Kernel',
|
||||
'App\Http\Kernel'
|
||||
Illuminate\Contracts\Http\Kernel::class,
|
||||
App\Http\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
'Illuminate\Contracts\Console\Kernel',
|
||||
'App\Console\Kernel'
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
App\Console\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
'Illuminate\Contracts\Debug\ExceptionHandler',
|
||||
'App\Exceptions\Handler'
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
App\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
/*
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"laravel/tinker": "~1.0",
|
||||
"laravelcollective/html": "^5.5.0",
|
||||
"solarium/solarium": "^3.8",
|
||||
"spatie/laravel-permission": "^2.12"
|
||||
"zizaco/entrust": "^1.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.0",
|
||||
|
|
475
composer.lock
generated
475
composer.lock
generated
File diff suppressed because it is too large
Load Diff
|
@ -39,7 +39,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'debug' => env('APP_DEBUG', false),
|
||||
'debug' => env('APP_DEBUG', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -178,7 +178,7 @@ return [
|
|||
|
||||
// List off others providers...
|
||||
App\Providers\SolariumServiceProvider::class,
|
||||
Spatie\Permission\PermissionServiceProvider::class,
|
||||
Zizaco\Entrust\EntrustServiceProvider::class,
|
||||
|
||||
],
|
||||
|
||||
|
|
132
config/entrust.php
Normal file
132
config/entrust.php
Normal file
|
@ -0,0 +1,132 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of Entrust,
|
||||
* a role & permission management solution for Laravel.
|
||||
*
|
||||
* @license MIT
|
||||
* @package Zizaco\Entrust
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust Role Model
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the Role model used by Entrust to create correct relations. Update
|
||||
| the role if it is in a different namespace.
|
||||
|
|
||||
*/
|
||||
'role' => 'App\Models\Role',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust Roles Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the roles table used by Entrust to save roles to the database.
|
||||
|
|
||||
*/
|
||||
'roles_table' => 'user_roles', //'roles',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust role foreign key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the role foreign key used by Entrust to make a proper
|
||||
| relation between permissions and roles & roles and users
|
||||
|
|
||||
*/
|
||||
'role_foreign_key' => 'role_id',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application User Model
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the User model used by Entrust to create correct relations.
|
||||
| Update the User if it is in a different namespace.
|
||||
|
|
||||
*/
|
||||
'user' => 'App\User',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Users Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the users table used by the application to save users to the
|
||||
| database.
|
||||
|
|
||||
*/
|
||||
'users_table' => 'accounts', //'users',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust role_user Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the role_user table used by Entrust to save assigned roles to the
|
||||
| database.
|
||||
|
|
||||
*/
|
||||
'role_user_table' => 'link_accounts_roles', //'role_user',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust user foreign key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the user foreign key used by Entrust to make a proper
|
||||
| relation between roles and users
|
||||
|
|
||||
*/
|
||||
'user_foreign_key' => 'account_id', //'user_id',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust Permission Model
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the Permission model used by Entrust to create correct relations.
|
||||
| Update the permission if it is in a different namespace.
|
||||
|
|
||||
*/
|
||||
'permission' => 'App\Models\Permission',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust Permissions Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the permissions table used by Entrust to save permissions to the
|
||||
| database.
|
||||
|
|
||||
*/
|
||||
'permissions_table' => 'permissions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust permission_role Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the permission_role table used by Entrust to save relationship
|
||||
| between permissions and roles to the database.
|
||||
|
|
||||
*/
|
||||
'permission_role_table' => 'role_has_permissions', //'permission_role',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust permission foreign key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the permission foreign key used by Entrust to make a proper
|
||||
| relation between permissions and roles
|
||||
|
|
||||
*/
|
||||
'permission_foreign_key' => 'permission_id',
|
||||
];
|
|
@ -6,15 +6,19 @@ return [
|
|||
"accepted" => "accepted",
|
||||
'submitted' => 'submitted',
|
||||
'published' => 'published',
|
||||
'updated' => 'updated'
|
||||
'updated' => 'updated',
|
||||
],
|
||||
'server_states' => [
|
||||
'server_states' => [
|
||||
"audited" => "audited",
|
||||
"published" => "published",
|
||||
'restricted' => 'restricted',
|
||||
'inprogress' => 'inprogress',
|
||||
'unpublished' => 'unpublished',
|
||||
'deleted' => 'deleted',
|
||||
'temporary' => 'temporary'
|
||||
]
|
||||
'deleted' => 'deleted',
|
||||
'temporary' => 'temporary',
|
||||
],
|
||||
'filetypes_allowed' => [
|
||||
"pdf", "txt", "html", "htm", "png", "jpeg",
|
||||
],
|
||||
'max_filesize' => '2048',
|
||||
];
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'models' => [
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* Eloquent model should be used to retrieve your permissions. Of course, it
|
||||
* is often just the "Permission" model but you may use whatever you like.
|
||||
*
|
||||
* The model you want to use as a Permission model needs to implement the
|
||||
* `Spatie\Permission\Contracts\Permission` contract.
|
||||
*/
|
||||
|
||||
'permission' => Spatie\Permission\Models\Permission::class,
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* Eloquent model should be used to retrieve your roles. Of course, it
|
||||
* is often just the "Role" model but you may use whatever you like.
|
||||
*
|
||||
* The model you want to use as a Role model needs to implement the
|
||||
* `Spatie\Permission\Contracts\Role` contract.
|
||||
*/
|
||||
|
||||
'role' => Spatie\Permission\Models\Role::class,
|
||||
|
||||
//'role' => App\Role::class,
|
||||
|
||||
],
|
||||
|
||||
'table_names' => [
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your roles. We have chosen a basic
|
||||
* default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
// 'roles' => 'roles',
|
||||
'roles' => 'user_roles',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your permissions. We have chosen a basic
|
||||
* default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'permissions' => 'permissions',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your models permissions. We have chosen a
|
||||
* basic default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'model_has_permissions' => 'model_has_permissions',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your models roles. We have chosen a
|
||||
* basic default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
// 'model_has_roles' => 'model_has_roles',
|
||||
'model_has_roles' => 'link_accounts_roles',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your roles permissions. We have chosen a
|
||||
* basic default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'role_has_permissions' => 'role_has_permissions',
|
||||
],
|
||||
|
||||
/*
|
||||
* By default all permissions will be cached for 24 hours unless a permission or
|
||||
* role is updated. Then the cache will be flushed immediately.
|
||||
*/
|
||||
|
||||
'cache_expiration_time' => 60 * 24,
|
||||
|
||||
/*
|
||||
* When set to true, the required permission/role names are added to the exception
|
||||
* message. This could be considered an information leak in some contexts, so
|
||||
* the default setting is false here for optimum safety.
|
||||
*/
|
||||
|
||||
'display_permission_in_exception' => false,
|
||||
];
|
|
@ -14,7 +14,7 @@ return [
|
|||
| Supported: "file", "cookie", "database", "apc",
|
||||
| "memcached", "redis", "array"
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'driver' => env('SESSION_DRIVER', 'file'),
|
||||
|
||||
|
@ -27,7 +27,7 @@ return [
|
|||
| to be allowed to remain idle before it expires. If you want them
|
||||
| to immediately expire on the browser closing, set that option.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'lifetime' => 60,
|
||||
// 120,
|
||||
|
@ -43,7 +43,7 @@ return [
|
|||
| should be encrypted before it is stored. All encryption will be run
|
||||
| automatically by Laravel and you can use the Session like normal.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'encrypt' => false,
|
||||
|
||||
|
@ -56,9 +56,9 @@ return [
|
|||
| files may be stored. A default has been set for you but a different
|
||||
| location may be specified. This is only needed for file sessions.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'files' => storage_path().'/framework/sessions',
|
||||
'files' => storage_path() . '/framework/sessions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -69,7 +69,7 @@ return [
|
|||
| connection that should be used to manage these sessions. This should
|
||||
| correspond to a connection in your database configuration options.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'connection' => null,
|
||||
|
||||
|
@ -82,7 +82,7 @@ return [
|
|||
| should use to manage the sessions. Of course, a sensible default is
|
||||
| provided for you; however, you are free to change this as needed.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'table' => 'sessions',
|
||||
|
||||
|
@ -95,7 +95,7 @@ return [
|
|||
| rid of old sessions from storage. Here are the chances that it will
|
||||
| happen on a given request. By default, the odds are 2 out of 100.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'lottery' => [2, 100],
|
||||
|
||||
|
@ -108,7 +108,7 @@ return [
|
|||
| instance by ID. The name specified here will get used every time a
|
||||
| new session cookie is created by the framework for every driver.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'cookie' => 'laravel_session',
|
||||
|
||||
|
@ -121,7 +121,7 @@ return [
|
|||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application but you are free to change this when necessary.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'path' => '/',
|
||||
|
||||
|
@ -134,7 +134,7 @@ return [
|
|||
| in your application. This will determine which domains the cookie is
|
||||
| available to in your application. A sensible default has been set.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'domain' => null,
|
||||
|
||||
|
@ -147,7 +147,7 @@ return [
|
|||
| to the server if the browser has a HTTPS connection. This will keep
|
||||
| the cookie from being sent to you if it can not be done securely.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'secure' => false,
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@ return [
|
|||
| an array of paths that should be checked for your views. Of course
|
||||
| the usual Laravel view path has already been registered for you.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'paths' => [
|
||||
// realpath(base_path('resources/views'))
|
||||
resource_path('views')
|
||||
resource_path('views'),
|
||||
],
|
||||
|
||||
/*
|
||||
|
@ -27,8 +27,8 @@ return [
|
|||
| stored for your application. Typically, this is within the storage
|
||||
| directory. However, as usual, you are free to change this value.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'compiled' => realpath(storage_path().'/framework/views'),
|
||||
'compiled' => realpath(storage_path() . '/framework/views'),
|
||||
|
||||
];
|
||||
|
|
10339
package-lock.json
generated
10339
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
|
@ -1,18 +1,20 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test": "echo \"Error\"",
|
||||
"dev": "npm run development",
|
||||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"prod": "npm run production",
|
||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "^5.1",
|
||||
"axios": "^0.17",
|
||||
"axios": "^0.18",
|
||||
"bootstrap-sass": "^3.3.7",
|
||||
"cross-env": "^5.1",
|
||||
"jquery": "^3.2",
|
||||
"laravel-mix": "^1.0",
|
||||
"lodash": "^4.17.4",
|
||||
"laravel-mix": "^2.1.14",
|
||||
"lodash": "^4.17.10",
|
||||
"vue": "^2.5.7"
|
||||
}
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
35
public/assets/functions.js
Normal file
35
public/assets/functions.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
(function (window, document) {
|
||||
|
||||
var layout = document.getElementById('layout'),
|
||||
menu = document.getElementById('menu'),
|
||||
menuLink = document.getElementById('menuLink');
|
||||
|
||||
function toggleClass(element, className) {
|
||||
var classes = element.className.split(/\s+/),
|
||||
length = classes.length,
|
||||
i = 0;
|
||||
|
||||
for(; i < length; i++) {
|
||||
if (classes[i] === className) {
|
||||
classes.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// The className is not found
|
||||
if (length === classes.length) {
|
||||
classes.push(className);
|
||||
}
|
||||
|
||||
element.className = classes.join(' ');
|
||||
}
|
||||
|
||||
menuLink.onclick = function (e) {
|
||||
var active = 'active';
|
||||
|
||||
e.preventDefault();
|
||||
toggleClass(layout, active);
|
||||
toggleClass(menu, active);
|
||||
toggleClass(menuLink, active);
|
||||
};
|
||||
|
||||
}(this, this.document));
|
243
public/assets/pagination.css
vendored
Normal file
243
public/assets/pagination.css
vendored
Normal file
|
@ -0,0 +1,243 @@
|
|||
/* vom cms Pagination */
|
||||
.pagination {
|
||||
text-align: center;
|
||||
margin: 80px 0 0 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.pagination a {
|
||||
/*font-size:1.1em;*/
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
/* selbst Pagination */
|
||||
.pagination-previous,
|
||||
.pagination-next,
|
||||
.pagination-link,
|
||||
.pagination-dots {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
align-items: center;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
box-shadow: none;
|
||||
display: inline-flex;
|
||||
/*display: inline-block;*/
|
||||
font-size: 1rem;
|
||||
height: 2.25em;
|
||||
justify-content: flex-start;
|
||||
line-height: 1.5;
|
||||
padding: calc(0.375em - 1px) calc(0.625em - 1px) calc(0.375em - 1px) calc(0.625em - 1px);
|
||||
/*padding-top: calc(0.375em - 1px);
|
||||
padding-right: calc(0.625em - 1px);
|
||||
padding-bottom: calc(0.375em - 1px);
|
||||
padding-left: calc(0.625em - 1px);*/
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.pagination-previous:focus,
|
||||
.pagination-next:focus,
|
||||
.pagination-link:focus,
|
||||
.pagination-dots:focus,
|
||||
.is-focused.pagination-next,
|
||||
.is-focused.pagination-link,
|
||||
.is-focused.pagination-dots,
|
||||
.pagination-previous:active,
|
||||
.pagination-next:active,
|
||||
.pagination-link:active,
|
||||
.pagination-dots:active, .is-active.pagination-previous,
|
||||
.is-active.pagination-next,
|
||||
.is-active.pagination-link,
|
||||
.is-active.pagination-dots {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.pagination-previous.disabled,
|
||||
.pagination-next.disabled,
|
||||
.pagination-link.disabled,
|
||||
.pagination-dots.disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.pagination {
|
||||
/*background-color:azure;*/
|
||||
font-size: 1rem;
|
||||
margin: -0.25rem;
|
||||
}
|
||||
|
||||
.pagination.is-small {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.pagination.is-medium {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.pagination.is-large {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.pagination.is-rounded .pagination-previous,
|
||||
.pagination.is-rounded .pagination-next {
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
border-radius: 290486px;
|
||||
}
|
||||
|
||||
.pagination.is-rounded .pagination-link {
|
||||
border-radius: 290486px;
|
||||
}
|
||||
|
||||
/*.pagination,*/
|
||||
.pagination-list {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.pagination-previous,
|
||||
.pagination-next,
|
||||
.pagination-link,
|
||||
.pagination-dots {
|
||||
font-size: 1em;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
justify-content: center;
|
||||
margin: 0.25rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.pagination-previous,
|
||||
.pagination-next,
|
||||
.pagination-link {
|
||||
border-color: #dbdbdb;
|
||||
color: #363636;
|
||||
min-width: 2.25em;
|
||||
}
|
||||
|
||||
.pagination-previous:hover,
|
||||
.pagination-next:hover,
|
||||
.pagination-link:hover {
|
||||
border-color: #b5b5b5;
|
||||
color: #363636;
|
||||
}
|
||||
|
||||
.pagination-previous:focus,
|
||||
.pagination-next:focus,
|
||||
.pagination-link:focus {
|
||||
border-color: #3273dc;
|
||||
}
|
||||
|
||||
.pagination-previous:active,
|
||||
.pagination-next:active,
|
||||
.pagination-link:active {
|
||||
box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.2);
|
||||
}
|
||||
|
||||
.pagination-previous.disabled,
|
||||
.pagination-next.disabled,
|
||||
.pagination-link.disabled {
|
||||
background-color: #dbdbdb;
|
||||
border-color: #dbdbdb;
|
||||
box-shadow: none;
|
||||
color: #7a7a7a;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.pagination-previous,
|
||||
.pagination-next {
|
||||
padding-left: 0.75em;
|
||||
padding-right: 0.75em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.pagination-link.is-current {
|
||||
background-color: #3abac4; /*#3273dc;*/
|
||||
border-color: #3abac4;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination-dots {
|
||||
color: #b5b5b5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.pagination-list {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.pagination {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.pagination-previous,
|
||||
.pagination-next {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
.pagination-list li {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px), print {
|
||||
.pagination-list {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
justify-content: flex-start;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.pagination-previous {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.pagination-next {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.pagination.is-centered .pagination-previous {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.pagination.is-centered .pagination-list {
|
||||
justify-content: center;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.pagination.is-centered .pagination-next {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.pagination.is-right .pagination-previous {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.pagination.is-right .pagination-next {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.pagination.is-right .pagination-list {
|
||||
justify-content: flex-end;
|
||||
order: 3;
|
||||
}
|
||||
}
|
936
public/assets/style.css
vendored
Normal file
936
public/assets/style.css
vendored
Normal file
|
@ -0,0 +1,936 @@
|
|||
body {
|
||||
background: #fff;
|
||||
color: #5F5C52;
|
||||
/* font-size: 1.15em; */
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
html, button, input, select, textarea,
|
||||
.pure-g [class *= "pure-u"] {
|
||||
/* Set your content font stack here: */
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
/* Typo */
|
||||
a {
|
||||
/*color: #bb2222;*/
|
||||
color: #3273dc;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a strong {
|
||||
color: currentColor;
|
||||
}
|
||||
a:hover {
|
||||
color: #363636;
|
||||
/*color: #660000;*/
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: whitesmoke;
|
||||
color: #ff3860;
|
||||
font-size: 0.875em;
|
||||
font-weight: normal;
|
||||
padding: 0.25em 0.5em 0.25em;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #423F37;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.2em;
|
||||
margin: 2em 0 1.2em 0;
|
||||
}
|
||||
|
||||
p {
|
||||
/*margin: 0 0 2.2em 0;*/
|
||||
margin: 0 0 1.4em 0;
|
||||
font-size: 1em;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
p + ul {
|
||||
margin-top: -0.5em;
|
||||
}
|
||||
|
||||
/*code {
|
||||
color: #000;
|
||||
font-weight: normal;
|
||||
}*/
|
||||
|
||||
pre {
|
||||
background: none repeat scroll 0 0 #e9e6e2;
|
||||
font-family: "Courier 10 Pitch",Courier,monospace;
|
||||
font-size: 0.9em;
|
||||
line-height: 1.3;
|
||||
margin-bottom: 2em;
|
||||
padding: 30px;
|
||||
color: #222;
|
||||
overflow: auto;
|
||||
word-wrap: normal;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
table {
|
||||
margin-bottom: 2.6em;
|
||||
font-size: 0.88em;
|
||||
}
|
||||
|
||||
menu .pure-menu .active a {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
||||
.pure-img-responsive {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
Add transition to containers so they can push in and out.
|
||||
*/
|
||||
#layout,
|
||||
#menu,
|
||||
.menu-link {
|
||||
-webkit-transition: all 0.2s ease-out;
|
||||
-moz-transition: all 0.2s ease-out;
|
||||
-ms-transition: all 0.2s ease-out;
|
||||
-o-transition: all 0.2s ease-out;
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
|
||||
/*
|
||||
This is the parent `<div>` that contains the menu and the content area.
|
||||
*/
|
||||
#layout {
|
||||
position: relative;
|
||||
padding-left: 0;
|
||||
}
|
||||
#layout.active #menu {
|
||||
left: 300px;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
#layout.active .menu-link {
|
||||
left: 300px;
|
||||
}
|
||||
/*
|
||||
The content `<div>` is where all your content goes.
|
||||
*/
|
||||
.content {
|
||||
margin: 0 0;
|
||||
padding: 2em;
|
||||
line-height: 1.6em;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
padding: 0.4em 2em 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.header h1 {
|
||||
margin: 0.2em 0;
|
||||
font-size: 3em;
|
||||
font-weight: 300;
|
||||
}
|
||||
.header h2 {
|
||||
font-weight: 300;
|
||||
color: #ccc;
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.content-subhead {
|
||||
margin: 50px 0 20px 0;
|
||||
font-weight: 300;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
.box-content {
|
||||
padding: 2em;
|
||||
}
|
||||
|
||||
.l-box .header-title{
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.l-box{
|
||||
margin: 0 1em 1em 0;
|
||||
background: #fff;
|
||||
outline: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.msg{
|
||||
padding: 0.8em 1.2em;
|
||||
border: 1px solid #ddd;
|
||||
display: block;
|
||||
margin-bottom: 1em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.msg .fa{
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.success{
|
||||
background: #dff0d8;
|
||||
color: #3c763d;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
.error{
|
||||
background: #f2dede;
|
||||
color: #ad4442;
|
||||
border-color: #ebccd1;
|
||||
}
|
||||
|
||||
.alert{
|
||||
background: #fcf8e3;
|
||||
color: #8a6d3b;
|
||||
border-color: #faebcc;
|
||||
}
|
||||
|
||||
.breadcrumb{
|
||||
margin-bottom: 2em;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.breadcrumb a{
|
||||
color: #999;
|
||||
padding: 0 0.8em;
|
||||
text-decoration: none;
|
||||
font-size: .9em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.breadcrumb a:hover,
|
||||
.breadcrumb a:focus{
|
||||
color: #2097e6;
|
||||
}
|
||||
|
||||
.site-logo{
|
||||
color: #fff;
|
||||
font-size: 1.4em;
|
||||
padding: 0.6em 0.4em;
|
||||
}
|
||||
|
||||
.site-logo strong{
|
||||
color: #2097e6;
|
||||
}
|
||||
|
||||
.text-right{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.user-info{
|
||||
padding: 1.6em 0.4em;
|
||||
}
|
||||
|
||||
.user-info a{
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
font-size: 0.8em;
|
||||
color: #999;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.user-info a:hover,
|
||||
.user-info a:focus{
|
||||
color: #2097e6;
|
||||
}
|
||||
|
||||
.divider{
|
||||
border-right: 1px solid #ddd;
|
||||
margin: 0 1em;
|
||||
}
|
||||
|
||||
.pure-form{
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
hr{
|
||||
display: block;
|
||||
border: 0;
|
||||
border-top: 1px solid #ddd;
|
||||
margin: 1.5em 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
|
||||
appears on the left side of the page.
|
||||
*/
|
||||
|
||||
#menu {
|
||||
margin-left: -300px; /* "#menu" width */
|
||||
width: 300px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000; /* so the menu or its navicon stays above all content */
|
||||
background: #202b33;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
/*
|
||||
All anchors inside the menu should be styled like this.
|
||||
*/
|
||||
#menu a {
|
||||
color: #738492;
|
||||
border: none;
|
||||
padding: 0.6em 0 0.6em 1em;
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
-webkit-transition: all 0.2s ease-out;
|
||||
-moz-transition: all 0.2s ease-out;
|
||||
-ms-transition: all 0.2s ease-out;
|
||||
-o-transition: all 0.2s ease-out;
|
||||
transition: all 0.2s ease-out;
|
||||
border-left: 2px solid #2097e6;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove all background/borders, since we are applying them to #menu.
|
||||
*/
|
||||
#menu .pure-menu,
|
||||
#menu .pure-menu ul {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*
|
||||
Add that light border to separate items into groups.
|
||||
*/
|
||||
#menu .pure-menu ul,
|
||||
#menu .pure-menu .menu-item-divided {
|
||||
border-top: 1px solid #2b363d;
|
||||
}
|
||||
|
||||
/*
|
||||
Change color of the anchor links on hover/focus.
|
||||
*/
|
||||
#menu .pure-menu li a:hover,
|
||||
#menu .pure-menu li a:focus,
|
||||
#menu .pure-menu li.active a {
|
||||
color: #2097e6;
|
||||
background: #1d272e;
|
||||
}
|
||||
|
||||
/*
|
||||
This styles the selected menu item `<li>`.
|
||||
*/
|
||||
#menu .pure-menu-selected,
|
||||
#menu .pure-menu-heading {
|
||||
padding-left: 0.5em;
|
||||
text-transform: capitalize;
|
||||
font-weight: normal;
|
||||
}
|
||||
/*
|
||||
This styles a link within a selected menu item `<li>`.
|
||||
*/
|
||||
#menu .pure-menu-selected a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*
|
||||
This styles the menu heading.
|
||||
*/
|
||||
#menu .pure-menu-heading {
|
||||
font-size: 100%;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
/* -- Dynamic Button For Responsive Menu -------------------------------------*/
|
||||
|
||||
/*
|
||||
The button to open/close the Menu is custom-made and not part of Pure. Here's
|
||||
how it works:
|
||||
*/
|
||||
|
||||
/*
|
||||
`.menu-link` represents the responsive menu toggle that shows/hides on
|
||||
small screens.
|
||||
*/
|
||||
.menu-link {
|
||||
position: fixed;
|
||||
display: block; /* show this only on small screens */
|
||||
top: 0;
|
||||
left: 0; /* "#menu width" */
|
||||
background: #000;
|
||||
background: rgba(0,0,0,0.7);
|
||||
font-size: 10px; /* change this value to increase/decrease button size */
|
||||
z-index: 10;
|
||||
width: 2em;
|
||||
height: auto;
|
||||
padding: 2.1em 1.6em;
|
||||
}
|
||||
|
||||
.menu-link:hover,
|
||||
.menu-link:focus {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.menu-link span {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menu-link span,
|
||||
.menu-link span:before,
|
||||
.menu-link span:after {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: 0.2em;
|
||||
}
|
||||
|
||||
.menu-link span:before,
|
||||
.menu-link span:after {
|
||||
position: absolute;
|
||||
margin-top: -0.6em;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.menu-link span:after {
|
||||
margin-top: 0.6em;
|
||||
}
|
||||
|
||||
|
||||
/* -- Responsive Styles (Media Queries) ------------------------------------- */
|
||||
|
||||
/*
|
||||
Hides the menu at `48em`, but modify this based on your app's needs.
|
||||
*/
|
||||
@media (min-width: 48em) {
|
||||
|
||||
.header,
|
||||
.content {
|
||||
padding-left: 2em;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
#layout {
|
||||
padding-left: 300px; /* left col width "#menu" */
|
||||
left: 0;
|
||||
}
|
||||
#menu {
|
||||
left: 300px;
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
position: fixed;
|
||||
left: 300px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#layout.active .menu-link {
|
||||
left: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 48em) {
|
||||
/* Only apply this when the window is small. Otherwise, the following
|
||||
case results in extra padding on the left:
|
||||
* Make the window small.
|
||||
* Tap the menu to trigger the active state.
|
||||
* Make the window large again.
|
||||
*/
|
||||
#layout.active {
|
||||
position: relative;
|
||||
left: 300px;
|
||||
}
|
||||
}
|
||||
/* _______________________________my edits ------------------------------------- */
|
||||
.box-l {
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
.box-r {
|
||||
padding-left: 1em
|
||||
}
|
||||
|
||||
fieldset, img, hr {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
/* TABLE */
|
||||
/*a { color: #4183c4; text-decoration: none; }
|
||||
a:hover { text-decoration: none; }*/
|
||||
.pure-button:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
/*table { width: 100%; margin: 2em 0; }*/
|
||||
.pure-table a {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.pure-table a:hover {
|
||||
text-decoration: none;
|
||||
color: #4183c4;
|
||||
}
|
||||
|
||||
.pure-table {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.pure-table td, .pure-table th {
|
||||
padding: 0.8em;
|
||||
border: none;
|
||||
border-bottom: 1px solid #f6f6f6;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.pure-table thead {
|
||||
background-color: #F2F9EF
|
||||
}
|
||||
|
||||
.pure-table th {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
table td .view:before {
|
||||
font-family: FontAwesome;
|
||||
top: 0;
|
||||
content: "\f05a";
|
||||
}
|
||||
|
||||
table td .edit:before {
|
||||
font-family: FontAwesome;
|
||||
top: 0;
|
||||
content: "\f044";
|
||||
}
|
||||
|
||||
table td .delete:before {
|
||||
font-family: FontAwesome;
|
||||
top: 0;
|
||||
content: "\f014";
|
||||
}
|
||||
|
||||
table .action {
|
||||
width: 1em;
|
||||
}
|
||||
|
||||
.pure-form .checkboxlist > label, .pure-form .checkboxlist > .field-validation-error,
|
||||
.pure-form .checkboxlist > i.fa-info-circle {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.pure-form .checkboxlist ul {
|
||||
max-height: 8.5em;
|
||||
overflow: auto;
|
||||
width: 17em;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
|
||||
.pure-form .checkboxlist ul li {
|
||||
margin-bottom: 3px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.pure-form .checkboxlist ul li label {
|
||||
width: 14em;
|
||||
}
|
||||
|
||||
.pure-form em, .pure-form i.fa-info-circle {
|
||||
color: silver;
|
||||
padding-left: 0.3em;
|
||||
}
|
||||
|
||||
.pure-form .pure-button {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.pure-form.detail span {
|
||||
vertical-align: middle;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.pure-form.detail label {
|
||||
color: silver;
|
||||
}
|
||||
|
||||
textarea.medium, select.medium {
|
||||
width: 25em;
|
||||
}
|
||||
|
||||
textarea.large, input.large {
|
||||
width: 40em;
|
||||
height: 17em;
|
||||
}
|
||||
|
||||
.pure-control-group.checkboxlist > span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.field-validation-error {
|
||||
color: #a94442;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.validation-summary-errors, .summary-error {
|
||||
border-left: 3px solid #d9534f;
|
||||
background: #fdf7f7;
|
||||
padding: 1em;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.validation-summary-errors ul {
|
||||
margin: 0.75em 1em;
|
||||
}
|
||||
|
||||
.validation-summary-valid {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.summary-success {
|
||||
border-left: 3px solid #009900;
|
||||
background: #F2F9EF;
|
||||
padding: 1em;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
|
||||
/* purecss buttons */
|
||||
.button-success,
|
||||
.button-error,
|
||||
.button-warning,
|
||||
.button-secondary {
|
||||
color: white;
|
||||
border-radius: 4px;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.button-success {
|
||||
background: rgb(28, 184, 65); /* this is a green */
|
||||
}
|
||||
|
||||
.button-error {
|
||||
background: rgb(202, 60, 60); /* this is a maroon */
|
||||
}
|
||||
|
||||
|
||||
.pure-button.is-primary {
|
||||
background-color: #00d1b2;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
.pure-button.is-primary:hover, .pure-button.is-primary.is-hovered {
|
||||
background-color: #00c4a7;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pure-button.is-primary:focus, .pure-button.is-primary.is-focused {
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pure-button.is-primary:focus:not(:active), .pure-button.is-primary.is-focused:not(:active) {
|
||||
box-shadow: 0 0 0 0.125em rgba(0, 209, 178, 0.25);
|
||||
}
|
||||
|
||||
.pure-button.is-primary:active, .pure-button.is-primary.is-active {
|
||||
background-color: #00b89c;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pure-button.is-primary[disabled] {
|
||||
background-color: #00d1b2;
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
.pure-button.is-success {
|
||||
background-color: #23d160;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pure-button.is-success:hover, .pure-button.is-success.is-hovered {
|
||||
background-color: #22c65b;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pure-button.is-success:focus, .pure-button.is-success.is-focused {
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pure-button.is-success:focus:not(:active), .pure-button.is-success.is-focused:not(:active) {
|
||||
box-shadow: 0 0 0 0.125em rgba(35, 209, 96, 0.25);
|
||||
}
|
||||
|
||||
.pure-button.is-success:active, .pure-button.is-success.is-active {
|
||||
background-color: #20bc56;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pure-button.is-success[disabled] {
|
||||
background-color: #23d160;
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
.pure-button.is-warning {
|
||||
background-color: #ffdd57;
|
||||
border-color: transparent;
|
||||
color: rgb(0, 0, 0);
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
.pure-button.is-warning:hover, .pure-button.is-warning.is-hovered {
|
||||
background-color: #ffdb4a;
|
||||
border-color: transparent;
|
||||
color: rgb(0, 0, 0);
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
.pure-button.is-warning:focus, .pure-button.is-warning.is-focused {
|
||||
border-color: transparent;
|
||||
color: rgb(0, 0, 0);
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
.pure-button.is-warning:focus:not(:active), .pure-button.is-warning.is-focused:not(:active) {
|
||||
box-shadow: 0 0 0 0.125em rgba(255, 221, 87, 0.25);
|
||||
}
|
||||
|
||||
.pure-button.is-warning:active, .pure-button.is-warning.is-active {
|
||||
background-color: #ffd83d;
|
||||
border-color: transparent;
|
||||
color: rgb(0, 0, 0);
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
.pure-button.is-warning[disabled] {
|
||||
background-color: #ffdd57;
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.select {
|
||||
height: 2.25em;
|
||||
}
|
||||
/*.pure-form .select{
|
||||
display:block;
|
||||
}*/
|
||||
.select {
|
||||
/*display: inline-block;*/
|
||||
display: grid;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
.select::after {
|
||||
border: 4px solid transparent;
|
||||
border-radius: 2px;
|
||||
border-right: 0;
|
||||
border-top: 0;
|
||||
content: " ";
|
||||
display: block;
|
||||
height: .325em;
|
||||
margin-top: -.4375em;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
-o-transform: rotate(-45deg);
|
||||
-ms-transform: rotate(-45deg);
|
||||
-moz-transform: rotate(-45deg);
|
||||
-webkit-transform: rotate(-45deg);
|
||||
transform: rotate(-45deg);
|
||||
-o-transform-origin: center;
|
||||
-ms-transform-origin: center;
|
||||
-moz-transform-origin: center;
|
||||
-webkit-transform-origin: center;
|
||||
transform-origin: center;
|
||||
width: .325em;
|
||||
|
||||
}
|
||||
.select::after {
|
||||
border-color: #51565c;
|
||||
/*right: 2.125em;*/
|
||||
right: 1.2em;
|
||||
z-index: 4;
|
||||
}
|
||||
.select select:not([multiple]) {
|
||||
padding-right: 2.5em;
|
||||
}
|
||||
|
||||
.select select {
|
||||
background-color: #fff;
|
||||
border-color: #dbdbdb;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
outline: 0;
|
||||
|
||||
}
|
||||
.select select {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
/* border: 1px solid transparent; */
|
||||
border-radius: 4px;
|
||||
box-shadow: none;
|
||||
/* display: inline-flex; */
|
||||
/* font-size: 1rem; */
|
||||
height: 2.25em;
|
||||
/* justify-content: flex-start; */
|
||||
/* line-height: 1.5; */
|
||||
padding: calc(.375em - 1px) calc(.625em - 1px) calc(.375em - 1px) calc(.625em - 1px);
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
}
|
||||
.pure-form input[type="text"] {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
border-color: #dbdbdb;
|
||||
box-shadow: none;
|
||||
height: 2.25em;
|
||||
}
|
||||
.pure-form textarea {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
border-color: #dbdbdb;
|
||||
box-shadow: none;
|
||||
}
|
||||
.pure-form legend {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
|
||||
.pure-form-message-inline {
|
||||
color: #7a7a7a;
|
||||
font-size: 0.675em;
|
||||
}
|
||||
.pure-div {
|
||||
padding-top:10px;
|
||||
}
|
||||
|
||||
|
||||
.pure-form-aligned .pure-control-group label {
|
||||
text-align: left;
|
||||
/*display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 10em;
|
||||
margin: 0 1em 0 0;*/
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar {
|
||||
border-left: 1px solid #E3E0D8;
|
||||
padding-left: 55px;
|
||||
}
|
||||
|
||||
.sidebar h4 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.sidebar ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar li {
|
||||
font-size: 0.8945em;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.sidebar .widget-blog {
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
color: #57534A;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
/*color:#00CA4C;*/
|
||||
color: #bb2222;
|
||||
}
|
||||
|
||||
.sidebar ul ul {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.sidebar .menu li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sidebar .menu li li a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.sidebar .menu li.active > a {
|
||||
color: #bb2222;
|
||||
}
|
||||
|
||||
.highlight pre {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.slider {
|
||||
background: #3abac4;
|
||||
}
|
||||
|
||||
|
||||
.dropbox {
|
||||
outline: 2px dashed grey; /* the dash box */
|
||||
outline-offset: -10px;
|
||||
background: lightcyan;
|
||||
color: dimgray;
|
||||
padding: 10px 0;
|
||||
min-height: 200px; /* minimum height */
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.input-file {
|
||||
opacity: 0; /* invisible but it's there! */
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropbox:hover {
|
||||
background: lightblue; /* when mouse over to the drop zone, change color */
|
||||
}
|
||||
|
||||
.dropbox p {
|
||||
font-size: 1.2em;
|
||||
text-align: center;
|
||||
padding: 50px 0;
|
||||
}
|
||||
span.remove-file{
|
||||
color: red;
|
||||
cursor: pointer;
|
||||
/* float: right; */
|
||||
}
|
||||
|
7
public/css/grids-responsive-min.css
vendored
Normal file
7
public/css/grids-responsive-min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
public/css/pure-min.css
vendored
Normal file
11
public/css/pure-min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1475
public/css/pure.css
vendored
1475
public/css/pure.css
vendored
File diff suppressed because it is too large
Load Diff
230
public/js/app.js
Normal file
230
public/js/app.js
Normal file
|
@ -0,0 +1,230 @@
|
|||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
// require('./bootstrap');
|
||||
// window.Vue = require('vue');
|
||||
Vue.prototype.$http = axios;
|
||||
|
||||
// Vue.component('example', require('./components/Example.vue'));
|
||||
const STATUS_INITIAL = 0, STATUS_SAVING = 1, STATUS_SUCCESS = 2, STATUS_FAILED = 3;
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
data() {
|
||||
return {
|
||||
rows: [
|
||||
//initial data
|
||||
// { qty: 5, value: "Something", language: 10, type: "additional", sort_order: 0 },
|
||||
// { qty: 2, value: "Something else", language: 20, type: "additional", sort_order: 0 },
|
||||
],
|
||||
errors: [],
|
||||
uploadedFiles: [],
|
||||
uploadError: null,
|
||||
currentStatus: null,
|
||||
uploadFieldName: 'photos',
|
||||
fileCount: 0,
|
||||
|
||||
step: 1,
|
||||
dataset: {
|
||||
type: '',
|
||||
state: '',
|
||||
rights: 0,
|
||||
|
||||
creating_corporation: "GBA",
|
||||
embargo_date: '',
|
||||
belongs_to_bibliography: 0,
|
||||
|
||||
title_main: {
|
||||
value: '',
|
||||
language: ''
|
||||
},
|
||||
abstract_main: {
|
||||
value: '',
|
||||
language: ''
|
||||
},
|
||||
checkedPersons: [],
|
||||
checkedLicenses: [],
|
||||
files: []
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.step = 1;
|
||||
this.reset();
|
||||
},
|
||||
computed: {
|
||||
isInitial() {
|
||||
return this.currentStatus === STATUS_INITIAL;
|
||||
},
|
||||
isSaving() {
|
||||
return this.currentStatus === STATUS_SAVING;
|
||||
},
|
||||
isSuccess() {
|
||||
return this.currentStatus === STATUS_SUCCESS;
|
||||
},
|
||||
isFailed() {
|
||||
return this.currentStatus === STATUS_FAILED;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
// reset form to initial state
|
||||
this.currentStatus = STATUS_INITIAL;
|
||||
this.uploadedFiles = [];
|
||||
this.uploadError = null;
|
||||
},
|
||||
resetDropbox() {
|
||||
// reset form to initial state
|
||||
this.currentStatus = STATUS_INITIAL;
|
||||
this.dataset.files = [];
|
||||
},
|
||||
save() {
|
||||
this.errors = [];
|
||||
/*
|
||||
Initialize the form data
|
||||
*/
|
||||
let formData = new FormData();
|
||||
/*
|
||||
Iteate over any file sent over appending the files
|
||||
to the form data.
|
||||
*/
|
||||
// formData.append('files', []);
|
||||
for (var i = 0; i < this.dataset.files.length; i++) {
|
||||
let file = this.dataset.files[i];
|
||||
formData.append('files[' + i + '][file]', file.file);
|
||||
formData.append('files[' + i + '][label]', file.label);
|
||||
formData.append('files[' + i + '][sorting]', i + 1);
|
||||
|
||||
// formData.append('files[' + i + ']', JSON.stringify(file));
|
||||
}
|
||||
/*
|
||||
Additional POST Data
|
||||
*/
|
||||
formData.append('type', this.dataset.type);
|
||||
formData.append('server_state', this.dataset.state);
|
||||
formData.append('rights', this.dataset.rights);
|
||||
formData.append('creating_corporation', this.dataset.creating_corporation);
|
||||
formData.append('embargo_date', this.dataset.embargo_date);
|
||||
formData.append('belongs_to_bibliography', this.dataset.belongs_to_bibliography);
|
||||
formData.append('title_main[value]', this.dataset.title_main.value);
|
||||
formData.append('title_main[language]', this.dataset.title_main.language);
|
||||
formData.append('abstract_main[value]', this.dataset.abstract_main.value);
|
||||
formData.append('abstract_main[language]', this.dataset.abstract_main.language);
|
||||
|
||||
for (var i = 0; i < this.dataset.checkedLicenses.length; i++) {
|
||||
formData.append('licenses[' + i + ']', this.dataset.checkedLicenses[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
Make the request to the POST /multiple-files URL
|
||||
*/
|
||||
axios.post('/publish/dataset/store',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
.then((response) => {
|
||||
// success callback
|
||||
console.log(response.data);
|
||||
// this.loading = false;
|
||||
// this.items = response.data;
|
||||
//Vue.set(app.skills, 1, "test55");
|
||||
this.currentStatus = STATUS_SUCCESS;
|
||||
|
||||
if (response.data.redirect) {
|
||||
window.location = response.data.redirect;
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
// this.loading = false;
|
||||
// console.log("test");
|
||||
let errorObject = JSON.parse(JSON.stringify(error));
|
||||
// console.log(errorObject);
|
||||
if (errorObject.response.data.errors) {
|
||||
var errorsArray = errorObject.response.data.errors;
|
||||
for (var index in errorsArray) {
|
||||
console.log(errorsArray[index]);
|
||||
this.errors.push(errorsArray[index]);
|
||||
}
|
||||
}
|
||||
if (errorObject.response.data.error) {
|
||||
var error = errorObject.response.data.error;
|
||||
this.errors.push(error.message);
|
||||
}
|
||||
|
||||
|
||||
this.currentStatus = STATUS_FAILED;
|
||||
});
|
||||
},
|
||||
// filesChange(fieldName, fileList) {
|
||||
// // handle file changes
|
||||
// // const formData = new FormData();
|
||||
// if (!fileList.length) return;
|
||||
// // append the files to FormData
|
||||
// Array
|
||||
// .from(Array(fileList.length).keys())
|
||||
// .map(x => {
|
||||
// dataset.files.append(fieldName, fileList[x], fileList[x].name);
|
||||
// });
|
||||
// // save it
|
||||
// // this.save(formData);
|
||||
|
||||
// },
|
||||
/*
|
||||
Handles a change on the file upload
|
||||
*/
|
||||
filesChange(fieldName, fileList) {
|
||||
// this.dataset.files = this.$refs.files.files;
|
||||
let uploadedFiles = fileList;
|
||||
|
||||
/*
|
||||
Adds the uploaded file to the files array
|
||||
*/
|
||||
for (var i = 0; i < uploadedFiles.length; i++) {
|
||||
let fileName = uploadedFiles[i].name.replace(/\.[^/.]+$/, '');
|
||||
let uploadeFile = { file: uploadedFiles[i], label: fileName, sorting: 0 };
|
||||
//this.dataset.files.push(uploadedFiles[i]);
|
||||
this.dataset.files.push(uploadeFile);
|
||||
}
|
||||
// if (this.dataset.files.length > 0)
|
||||
// {
|
||||
// this.currentStatus = STATUS_SAVING;
|
||||
// }
|
||||
|
||||
},
|
||||
/*
|
||||
Removes a select file the user has uploaded
|
||||
*/
|
||||
removeFile(key) {
|
||||
this.dataset.files.splice(key, 1);
|
||||
},
|
||||
|
||||
prev() {
|
||||
this.step--;
|
||||
},
|
||||
next() {
|
||||
this.step++;
|
||||
},
|
||||
submit() {
|
||||
// alert('Submit to blah and show blah and etc.');
|
||||
// save it
|
||||
this.save();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// const app = new Vue({
|
||||
// el: '#app',
|
||||
|
||||
// data: {
|
||||
// loading: false,
|
||||
// downloading: false,
|
||||
// items: [],
|
||||
// message: "Just a test",
|
||||
// }
|
||||
// });
|
|
@ -1,4 +1,3 @@
|
|||
{
|
||||
"/js/lib.js": "/js/lib.js",
|
||||
"/css/app1.css": "/css/app1.css"
|
||||
"/js/app.js": "/js/app.js"
|
||||
}
|
218
resources/assets/js/app.js
Normal file
218
resources/assets/js/app.js
Normal file
|
@ -0,0 +1,218 @@
|
|||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
require('./bootstrap');
|
||||
window.Vue = require('vue');
|
||||
Vue.prototype.$http = axios;
|
||||
|
||||
// Vue.component('example', require('./components/Example.vue'));
|
||||
const STATUS_INITIAL = 0, STATUS_SAVING = 1, STATUS_SUCCESS = 2, STATUS_FAILED = 3;
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
data() {
|
||||
return {
|
||||
rows: [
|
||||
//initial data
|
||||
// { qty: 5, value: "Something", language: 10, type: "additional", sort_order: 0 },
|
||||
// { qty: 2, value: "Something else", language: 20, type: "additional", sort_order: 0 },
|
||||
],
|
||||
errors: [],
|
||||
uploadedFiles: [],
|
||||
uploadError: null,
|
||||
currentStatus: null,
|
||||
uploadFieldName: 'photos',
|
||||
fileCount: 0,
|
||||
|
||||
step: 1,
|
||||
dataset: {
|
||||
type: '',
|
||||
state: '',
|
||||
rights: 0,
|
||||
|
||||
creating_corporation: "GBA",
|
||||
embargo_date: '',
|
||||
belongs_to_bibliography: 0,
|
||||
|
||||
title_main: {
|
||||
value: '',
|
||||
language: ''
|
||||
},
|
||||
abstract_main: {
|
||||
value: '',
|
||||
language: ''
|
||||
},
|
||||
checkedPersons: [],
|
||||
checkedLicenses: [],
|
||||
files: []
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.step = 1;
|
||||
this.reset();
|
||||
},
|
||||
computed: {
|
||||
isInitial() {
|
||||
return this.currentStatus === STATUS_INITIAL;
|
||||
},
|
||||
isSaving() {
|
||||
return this.currentStatus === STATUS_SAVING;
|
||||
},
|
||||
isSuccess() {
|
||||
return this.currentStatus === STATUS_SUCCESS;
|
||||
},
|
||||
isFailed() {
|
||||
return this.currentStatus === STATUS_FAILED;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
// reset form to initial state
|
||||
this.currentStatus = STATUS_INITIAL;
|
||||
this.uploadedFiles = [];
|
||||
this.uploadError = null;
|
||||
},
|
||||
resetDropbox() {
|
||||
// reset form to initial state
|
||||
this.currentStatus = STATUS_INITIAL;
|
||||
this.dataset.files = [];
|
||||
},
|
||||
save() {
|
||||
this.errors = [];
|
||||
/*
|
||||
Initialize the form data
|
||||
*/
|
||||
let formData = new FormData();
|
||||
/*
|
||||
Iteate over any file sent over appending the files
|
||||
to the form data.
|
||||
*/
|
||||
// formData.append('files', []);
|
||||
for (var i = 0; i < this.dataset.files.length; i++) {
|
||||
let file = this.dataset.files[i];
|
||||
formData.append('files[' + i + '][file]', file.file);
|
||||
formData.append('files[' + i + '][label]', file.label);
|
||||
formData.append('files[' + i + '][sorting]', i + 1);
|
||||
|
||||
// formData.append('files[' + i + ']', JSON.stringify(file));
|
||||
}
|
||||
/*
|
||||
Additional POST Data
|
||||
*/
|
||||
formData.append('type', this.dataset.type);
|
||||
formData.append('server_state', this.dataset.state);
|
||||
formData.append('rights', this.dataset.rights);
|
||||
formData.append('creating_corporation', this.dataset.creating_corporation);
|
||||
formData.append('embargo_date', this.dataset.embargo_date);
|
||||
formData.append('belongs_to_bibliography', this.dataset.belongs_to_bibliography);
|
||||
formData.append('main_title[value]', this.dataset.title_main.value);
|
||||
formData.append('main_title[language]', this.dataset.title_main.language);
|
||||
formData.append('abstract_main[value]', this.dataset.title_main.value);
|
||||
formData.append('abstract_main[language]', this.dataset.title_main.language);
|
||||
|
||||
for (var i = 0; i < this.dataset.checkedLicenses.length; i++) {
|
||||
formData.append('licenses[' + i + ']', this.dataset.checkedLicenses[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
Make the request to the POST /multiple-files URL
|
||||
*/
|
||||
axios.post('/publish/dataset/store',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
.then((response) => {
|
||||
// success callback
|
||||
console.log(response.data);
|
||||
// this.loading = false;
|
||||
// this.items = response.data;
|
||||
//Vue.set(app.skills, 1, "test55");
|
||||
this.currentStatus = STATUS_SUCCESS;
|
||||
})
|
||||
.catch((error) => {
|
||||
// this.loading = false;
|
||||
console.log("test");
|
||||
let errorObject = JSON.parse(JSON.stringify(error));
|
||||
console.log(errorObject);
|
||||
var errorsArray = errorObject.response.data.errors;
|
||||
for (var index in errorsArray) {
|
||||
console.log(errorsArray[index]);
|
||||
this.errors.push(errorsArray[index]);
|
||||
}
|
||||
this.currentStatus = STATUS_FAILED;
|
||||
});
|
||||
},
|
||||
// filesChange(fieldName, fileList) {
|
||||
// // handle file changes
|
||||
// // const formData = new FormData();
|
||||
// if (!fileList.length) return;
|
||||
// // append the files to FormData
|
||||
// Array
|
||||
// .from(Array(fileList.length).keys())
|
||||
// .map(x => {
|
||||
// dataset.files.append(fieldName, fileList[x], fileList[x].name);
|
||||
// });
|
||||
// // save it
|
||||
// // this.save(formData);
|
||||
|
||||
// },
|
||||
/*
|
||||
Handles a change on the file upload
|
||||
*/
|
||||
filesChange(fieldName, fileList) {
|
||||
// this.dataset.files = this.$refs.files.files;
|
||||
let uploadedFiles = fileList;
|
||||
|
||||
/*
|
||||
Adds the uploaded file to the files array
|
||||
*/
|
||||
for (var i = 0; i < uploadedFiles.length; i++) {
|
||||
let fileName = uploadedFiles[i].name.replace(/\.[^/.]+$/, '');
|
||||
let uploadeFile = { file: uploadedFiles[i], label: fileName, sorting: 0 };
|
||||
//this.dataset.files.push(uploadedFiles[i]);
|
||||
this.dataset.files.push(uploadeFile);
|
||||
}
|
||||
// if (this.dataset.files.length > 0)
|
||||
// {
|
||||
// this.currentStatus = STATUS_SAVING;
|
||||
// }
|
||||
|
||||
},
|
||||
/*
|
||||
Removes a select file the user has uploaded
|
||||
*/
|
||||
removeFile(key) {
|
||||
this.dataset.files.splice(key, 1);
|
||||
},
|
||||
|
||||
prev() {
|
||||
this.step--;
|
||||
},
|
||||
next() {
|
||||
this.step++;
|
||||
},
|
||||
submit() {
|
||||
// alert('Submit to blah and show blah and etc.');
|
||||
// save it
|
||||
this.save();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// const app = new Vue({
|
||||
// el: '#app',
|
||||
|
||||
// data: {
|
||||
// loading: false,
|
||||
// downloading: false,
|
||||
// items: [],
|
||||
// message: "Just a test",
|
||||
// }
|
||||
// });
|
|
@ -2,23 +2,23 @@
|
|||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'analysisdata' => 'Analysis Data',
|
||||
'interpreteddata' => 'Interpreted Data',
|
||||
'measurementdata' => 'Measurement Data',
|
||||
'models' => 'Models',
|
||||
'rawdata' => 'Raw Data',
|
||||
'supplementarydata' => 'Supplementary Data'
|
||||
'supplementarydata' => 'Supplementary Data',
|
||||
//'diplom' => 'Diploma Thesis',
|
||||
//'doctoralthesis' => 'Doctoral Thesis',
|
||||
//'coursematerial' => 'Course Material',
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Previous',
|
||||
'next' => 'Next »',
|
||||
'previous' => '« Previous',
|
||||
'next' => 'Next »',
|
||||
|
||||
];
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reminder Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reminder Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
"password" => "Passwords must be at least six characters and match the confirmation.",
|
||||
"user" => "We can't find a user with that e-mail address.",
|
||||
"token" => "This password reset token is invalid.",
|
||||
"sent" => "We have e-mailed your password reset link!",
|
||||
"reset" => "Your password has been reset!",
|
||||
"password" => "Passwords must be at least six characters and match the confirmation.",
|
||||
"user" => "We can't find a user with that e-mail address.",
|
||||
"token" => "This password reset token is invalid.",
|
||||
"sent" => "We have e-mailed your password reset link!",
|
||||
"reset" => "Your password has been reset!",
|
||||
|
||||
];
|
||||
|
|
|
@ -44,4 +44,3 @@ return [
|
|||
'default_auth_index' => 'Login',
|
||||
'auth_pagetitle' => 'User Login',
|
||||
];
|
||||
?>
|
|
@ -2,106 +2,106 @@
|
|||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
"accepted" => "The :attribute must be accepted.",
|
||||
"active_url" => "The :attribute is not a valid URL.",
|
||||
"after" => "The :attribute must be a date after :date.",
|
||||
"alpha" => "The :attribute may only contain letters.",
|
||||
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
|
||||
"alpha_num" => "The :attribute may only contain letters and numbers.",
|
||||
"array" => "The :attribute must be an array.",
|
||||
"before" => "The :attribute must be a date before :date.",
|
||||
"between" => [
|
||||
"numeric" => "The :attribute must be between :min and :max.",
|
||||
"file" => "The :attribute must be between :min and :max kilobytes.",
|
||||
"string" => "The :attribute must be between :min and :max characters.",
|
||||
"array" => "The :attribute must have between :min and :max items.",
|
||||
],
|
||||
"boolean" => "The :attribute field must be true or false.",
|
||||
"confirmed" => "The :attribute confirmation does not match.",
|
||||
"date" => "The :attribute is not a valid date.",
|
||||
"date_format" => "The :attribute does not match the format :format.",
|
||||
"different" => "The :attribute and :other must be different.",
|
||||
"digits" => "The :attribute must be :digits digits.",
|
||||
"digits_between" => "The :attribute must be between :min and :max digits.",
|
||||
"email" => "The :attribute must be a valid email address.",
|
||||
"filled" => "The :attribute field is required.",
|
||||
"exists" => "The selected :attribute is invalid.",
|
||||
"image" => "The :attribute must be an image.",
|
||||
"in" => "The selected :attribute is invalid.",
|
||||
"integer" => "The :attribute must be an integer.",
|
||||
"ip" => "The :attribute must be a valid IP address.",
|
||||
"max" => [
|
||||
"numeric" => "The :attribute may not be greater than :max.",
|
||||
"file" => "The :attribute may not be greater than :max kilobytes.",
|
||||
"string" => "The :attribute may not be greater than :max characters.",
|
||||
"array" => "The :attribute may not have more than :max items.",
|
||||
],
|
||||
"mimes" => "The :attribute must be a file of type: :values.",
|
||||
"min" => [
|
||||
"numeric" => "The :attribute must be at least :min.",
|
||||
"file" => "The :attribute must be at least :min kilobytes.",
|
||||
"string" => "The :attribute must be at least :min characters.",
|
||||
"array" => "The :attribute must have at least :min items.",
|
||||
],
|
||||
"not_in" => "The selected :attribute is invalid.",
|
||||
"numeric" => "The :attribute must be a number.",
|
||||
"regex" => "The :attribute format is invalid.",
|
||||
"required" => "The :attribute field is required.",
|
||||
"required_if" => "The :attribute field is required when :other is :value.",
|
||||
"required_with" => "The :attribute field is required when :values is present.",
|
||||
"required_with_all" => "The :attribute field is required when :values is present.",
|
||||
"required_without" => "The :attribute field is required when :values is not present.",
|
||||
"required_without_all" => "The :attribute field is required when none of :values are present.",
|
||||
"same" => "The :attribute and :other must match.",
|
||||
"size" => [
|
||||
"numeric" => "The :attribute must be :size.",
|
||||
"file" => "The :attribute must be :size kilobytes.",
|
||||
"string" => "The :attribute must be :size characters.",
|
||||
"array" => "The :attribute must contain :size items.",
|
||||
],
|
||||
"unique" => "The :attribute has already been taken.",
|
||||
"url" => "The :attribute format is invalid.",
|
||||
"timezone" => "The :attribute must be a valid zone.",
|
||||
"accepted" => "The :attribute must be accepted.",
|
||||
"active_url" => "The :attribute is not a valid URL.",
|
||||
"after" => "The :attribute must be a date after :date.",
|
||||
"alpha" => "The :attribute may only contain letters.",
|
||||
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
|
||||
"alpha_num" => "The :attribute may only contain letters and numbers.",
|
||||
"array" => "The :attribute must be an array.",
|
||||
"before" => "The :attribute must be a date before :date.",
|
||||
"between" => [
|
||||
"numeric" => "The :attribute must be between :min and :max.",
|
||||
"file" => "The :attribute must be between :min and :max kilobytes.",
|
||||
"string" => "The :attribute must be between :min and :max characters.",
|
||||
"array" => "The :attribute must have between :min and :max items.",
|
||||
],
|
||||
"boolean" => "The :attribute field must be true or false.",
|
||||
"confirmed" => "The :attribute confirmation does not match.",
|
||||
"date" => "The :attribute is not a valid date.",
|
||||
"date_format" => "The :attribute does not match the format :format.",
|
||||
"different" => "The :attribute and :other must be different.",
|
||||
"digits" => "The :attribute must be :digits digits.",
|
||||
"digits_between" => "The :attribute must be between :min and :max digits.",
|
||||
"email" => "The :attribute must be a valid email address.",
|
||||
"filled" => "The :attribute field is required.",
|
||||
"exists" => "The selected :attribute is invalid.",
|
||||
"image" => "The :attribute must be an image.",
|
||||
"in" => "The selected :attribute is invalid.",
|
||||
"integer" => "The :attribute must be an integer.",
|
||||
"ip" => "The :attribute must be a valid IP address.",
|
||||
"max" => [
|
||||
"numeric" => "The :attribute may not be greater than :max.",
|
||||
"file" => "The :attribute may not be greater than :max kilobytes.",
|
||||
"string" => "The :attribute may not be greater than :max characters.",
|
||||
"array" => "The :attribute may not have more than :max items.",
|
||||
],
|
||||
"mimes" => "The :attribute must be a file of type: :values.",
|
||||
"min" => [
|
||||
"numeric" => "The :attribute must be at least :min.",
|
||||
"file" => "The :attribute must be at least :min kilobytes.",
|
||||
"string" => "The :attribute must be at least :min characters.",
|
||||
"array" => "The :attribute must have at least :min items.",
|
||||
],
|
||||
"not_in" => "The selected :attribute is invalid.",
|
||||
"numeric" => "The :attribute must be a number.",
|
||||
"regex" => "The :attribute format is invalid.",
|
||||
"required" => "The :attribute field is required.",
|
||||
"required_if" => "The :attribute field is required when :other is :value.",
|
||||
"required_with" => "The :attribute field is required when :values is present.",
|
||||
"required_with_all" => "The :attribute field is required when :values is present.",
|
||||
"required_without" => "The :attribute field is required when :values is not present.",
|
||||
"required_without_all" => "The :attribute field is required when none of :values are present.",
|
||||
"same" => "The :attribute and :other must match.",
|
||||
"size" => [
|
||||
"numeric" => "The :attribute must be :size.",
|
||||
"file" => "The :attribute must be :size kilobytes.",
|
||||
"string" => "The :attribute must be :size characters.",
|
||||
"array" => "The :attribute must contain :size items.",
|
||||
],
|
||||
"unique" => "The :attribute has already been taken.",
|
||||
"url" => "The :attribute format is invalid.",
|
||||
"timezone" => "The :attribute must be a valid zone.",
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
'attributes' => [],
|
||||
|
||||
];
|
||||
|
|
|
@ -1,53 +1,49 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<h1>Login</h1>
|
||||
<div class="panel-body">
|
||||
|
||||
@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
|
||||
|
||||
<form class="pure-form pure-form-stacked" role="form" method="POST" action="{{ url('/login') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="email">E-Mail Address</label>
|
||||
<input type="email" class="pure-input-1" name="email" id="email" placeholder="Email" value="{{ old('email') }}">
|
||||
<span class="pure-form-message-inline">This is a required field.</span>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" class="pure-input-1" name="password" id="password" placeholder="Password">
|
||||
</div>
|
||||
|
||||
<div class="pure-controls">
|
||||
<label for="remember" class="pure-checkbox">
|
||||
<input name="remember" id="remember" type="checkbox"> Remember me
|
||||
</label>
|
||||
<button type="submit" class="pure-button pure-button-primary">Login</button>
|
||||
<a class="btn btn-link" href="{{ url('/password/email') }}">Forgot Your Password?</a>
|
||||
</div>
|
||||
</form>
|
||||
<h1>Login</h1>
|
||||
|
||||
<div class="panel-body">
|
||||
@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
|
||||
<form class="pure-form pure-form-stacked" role="form" method="POST" action="{{ url('/login') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="email">E-Mail Address</label>
|
||||
<input type="email" class="pure-input-1" name="email" id="email" placeholder="Email" value="{{ old('email') }}">
|
||||
<span class="pure-form-message-inline">This is a required field.</span>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" class="pure-input-1" name="password" id="password" placeholder="Password">
|
||||
</div>
|
||||
|
||||
<div class="pure-controls">
|
||||
<label for="remember" class="pure-checkbox">
|
||||
<input name="remember" id="remember" type="checkbox"> Remember me
|
||||
</label>
|
||||
<button type="submit" class="pure-button pure-button-primary">Login</button>
|
||||
<a class="btn btn-link" href="{{ url('/password/email') }}">Forgot Your Password?</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -2,64 +2,64 @@
|
|||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Register</div>
|
||||
<div class="panel-body">
|
||||
@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="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Register</div>
|
||||
<div class="panel-body">
|
||||
@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
|
||||
|
||||
<form class="form-horizontal" role="form" method="POST" action="{{ url('/register') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<form class="form-horizontal" role="form" method="POST" action="{{ url('/register') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Name</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="name" value="{{ old('name') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Name</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="name" value="{{ old('name') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">E-Mail Address</label>
|
||||
<div class="col-md-6">
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">E-Mail Address</label>
|
||||
<div class="col-md-6">
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Password</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" name="password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Password</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" name="password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Confirm Password</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" name="password_confirmation">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Confirm Password</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" name="password_confirmation">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-md-offset-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Register
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-md-offset-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Register
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{{-- \resources\views\errors\401.blade.php --}}
|
||||
{{-- \resources\views\errors\403.blade.php --}}
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class='col-lg-4 col-lg-offset-4'>
|
||||
<h1><center>401<br>
|
||||
<h1><center>403<br>
|
||||
ACCESS DENIED</center></h1>
|
||||
<h2>{{ $exception->getMessage() }}</h2>
|
||||
</div>
|
|
@ -1,41 +1,41 @@
|
|||
<html>
|
||||
<head>
|
||||
<link href='//fonts.googleapis.com/css?family=Lato:100' rel='stylesheet' type='text/css'>
|
||||
<head>
|
||||
<link href='//fonts.googleapis.com/css?family=Lato:100' rel='stylesheet' type='text/css'>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #B0BEC5;
|
||||
display: table;
|
||||
font-weight: 100;
|
||||
font-family: 'Lato';
|
||||
}
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #B0BEC5;
|
||||
display: table;
|
||||
font-weight: 100;
|
||||
font-family: 'Lato';
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
.content {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 72px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="title">Be right back.</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
.title {
|
||||
font-size: 72px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="title">Be right back.</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
|
||||
@if($errors->any())
|
||||
@if($errors->any())
|
||||
|
||||
<ul class="alert validation-summary-errors">
|
||||
<ul class="alert validation-summary-errors">
|
||||
|
||||
@foreach($errors->all() as $error)
|
||||
@foreach($errors->all() as $error)
|
||||
|
||||
<li style="margin-left:5px;">{{ $error }}</li>
|
||||
<li style="margin-left:5px;">{{ $error }}</li>
|
||||
|
||||
@endforeach
|
||||
@endforeach
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
<link rel="shortcut icon" type="image/x-icon" href="{{ asset('favicon.ico') }}">
|
||||
{{-- <link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap.min.css') }}"> --}}
|
||||
|
||||
<link rel='stylesheet' href="{{ asset('css/pure.css') }}" />
|
||||
<link rel='stylesheet' href="{{ asset('css/grids-responsive.css') }}" />
|
||||
<link rel='stylesheet' href="{{ asset('css/pure-min.css') }}" />
|
||||
<link rel='stylesheet' href="{{ asset('css/grids-responsive-min.css') }}" />
|
||||
<!--<link href="{{ asset('css/app1.css') }}" rel="stylesheet" />-->
|
||||
<!--<link rel='stylesheet' href="{{ asset('css/page.css') }}" />-->
|
||||
<link rel='stylesheet' href="{{ asset('css/styles.css') }}" />
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<!-- Styles -->
|
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<nav class="navbar navbar-default navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
|
||||
<!-- Collapsed Hamburger -->
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse" aria-expanded="false">
|
||||
<span class="sr-only">Toggle Navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
<!-- Branding Image -->
|
||||
<a class="navbar-brand" href="{{ url('/') }}">
|
||||
{{ config('app.name', 'Laravel') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="app-navbar-collapse">
|
||||
<!-- Left Side Of Navbar -->
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- Right Side Of Navbar -->
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<!-- Authentication Links -->
|
||||
@guest
|
||||
<li><a href="{{ route('login') }}">Login</a></li>
|
||||
<li><a href="{{ route('register') }}">Register</a></li>
|
||||
@else
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true">
|
||||
{{ Auth::user()->name }} <span class="caret"></span>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="{{ route('logout') }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
Logout
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
||||
{{ csrf_field() }}
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endguest
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@yield('content')
|
||||
</div>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="{{ asset('js/app.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
217
resources/views/layouts/settings/layout.blade.php
Normal file
217
resources/views/layouts/settings/layout.blade.php
Normal file
|
@ -0,0 +1,217 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ app()->getLocale() }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>Admin PureRDR</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ asset('favicon.ico') }}">
|
||||
|
||||
<link rel='stylesheet' href="{{ asset('css/pure-min.css') }}" />
|
||||
<link rel='stylesheet' href="{{ asset('css/grids-responsive-min.css') }}" />
|
||||
|
||||
<!-- <script src="bower_components/chart.js/dist/Chart.min.js"></script> -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.1/Chart.min.js"></script>
|
||||
<!--<link rel="stylesheet" type="text/css" href="bower_components/font-awesome/css/font-awesome.min.css">-->
|
||||
<link rel='stylesheet' href="{{ asset('css/font-awesome.css') }}" />
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('/assets/style.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('/assets/pagination.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="layout">
|
||||
|
||||
<a href="#menu" id="menuLink" class="menu-link">
|
||||
<!-- Hamburger icon -->
|
||||
<span></span>
|
||||
</a>
|
||||
|
||||
<div id="menu">
|
||||
<nav class="pure-menu">
|
||||
<h1 class="site-logo">Admin<strong>Rdr</strong></h1>
|
||||
<div class="menu-item-divided"></div>
|
||||
|
||||
<h2 class="pure-menu-heading">Home</h2>
|
||||
<ul class="pure-menu-list">
|
||||
<li class="pure-menu-item {{ Route::is('settings.home.index') ? 'active' : '' }}">
|
||||
<a href="{{ route('settings.home.index') }}" class="pure-menu-link">Reports</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@permission('settings')
|
||||
<h2 class="pure-menu-heading">Settings</h2>
|
||||
<ul class="pure-menu-list">
|
||||
<li class="pure-menu-item {{ Route::is('settings.document*') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ route('settings.document') }}"><i class="fa fa-database"></i> Datasets</a>
|
||||
</li>
|
||||
<li class="pure-menu-item {{ Route::is('settings.collection*') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ route('settings.collection') }}"><i class="fa fa-archive"></i> Collections</a>
|
||||
</li>
|
||||
<li class="pure-menu-item {{ Route::is('settings.license*') ? 'active' : '' }}">
|
||||
<a href="{{ route('settings.license') }}" class="pure-menu-link"><i class="fa fa-file"></i> Licenses</a>
|
||||
</li>
|
||||
<li class="pure-menu-item {{ Route::is('settings.person*') ? 'active' : '' }}">
|
||||
<a href="{{ route('settings.person') }}" class="pure-menu-link"><i class="fa fa-edit"></i> Persons</a>
|
||||
</li>
|
||||
<li class="pure-menu-item {{ Route::is('settings.project*') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ route('settings.project') }}"><i class="fa fa-tasks"></i> Projects</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@endpermission
|
||||
|
||||
@permission('review')
|
||||
<h2 class="pure-menu-heading">Publish</h2>
|
||||
<ul class="pure-menu-list">
|
||||
<li class="pure-menu-item {{ Route::is('dataset.*') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ URL::route('dataset.create1') }}"><i class="fa fa-upload"></i> Publish</a>
|
||||
</li>
|
||||
</ul>
|
||||
@endpermission
|
||||
|
||||
<h2 class="pure-menu-heading">User</h2>
|
||||
<ul class="pure-menu-list">
|
||||
@if (Auth::guest())
|
||||
<li class="pure-menu-item {{ Route::currentRouteName() == 'login' ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ route('login') }}">LOGIN</a>
|
||||
</li>
|
||||
@else
|
||||
@permission('settings')
|
||||
<li class="pure-menu-item {{ Route::is('user.*') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{route('user.index') }}"><i class="fa fa-users"></i> Edit Users</a>
|
||||
</li>
|
||||
<li class="pure-menu-item {{ Route::is('role.*') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{route('role.index') }}"><i class="fa fa-key"></i> Edit Roles</a>
|
||||
</li>
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="{{ route('user.edit',['id'=>Auth::user()->id]) }}"><i class="fa fa-user"></i> EDIT</a>
|
||||
</li>
|
||||
@endpermission
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('logout') }}"><i class="fa fa-sign-out"></i>Logout</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div class="header">
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1-2"><h1>Dashboard</h1></div>
|
||||
<div class="pure-u-1-2 text-right">
|
||||
<section class="user-info">
|
||||
@if(Auth::user())
|
||||
<i class="fa fa-user"></i> <a href="#" rel="User">{{ Auth::user()->login }}</a>
|
||||
<span class="divider"></span>
|
||||
@endif
|
||||
<i class="fa fa-cog"></i> <a href="#" rel="User">Settings</a>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="breadcrumb">
|
||||
<i class="fa fa-home"></i><a href="#" rel="Dashboard">Dashboard</a>
|
||||
<i class="fa fa-angle-right"></i><a href="#" rel="Dashboard">Sales</a>
|
||||
</div>
|
||||
{{-- <div class="pure-g"> --}}
|
||||
<div class="box">
|
||||
<div class="l-box">
|
||||
@include('partials.flash')
|
||||
@yield('content')
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="pure-u-1-2 box">
|
||||
<div class="l-box">
|
||||
<div class="header">
|
||||
<h3 class="header-title">Message</h3>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
|
||||
<form class="pure-form pure-form-stacked">
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1-1">
|
||||
<label for="title">Title</label>
|
||||
<input id="title" type="text" class="pure-u-1-1">
|
||||
|
||||
<label for="post">Post Content</label>
|
||||
<textarea id="post" rows="10" class="pure-u-1-1"></textarea>
|
||||
|
||||
<hr>
|
||||
|
||||
<button class="pure-button pure-button-primary">Save</button>
|
||||
<button class="pure-button">Save in Draft</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
{{-- </div> --}}
|
||||
|
||||
{{-- <div class="pure-g">
|
||||
<div class="pure-u-1-2 box">
|
||||
<div class="l-box">
|
||||
<div class="header">
|
||||
<h3 class="header-title">Messages</h3>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<span class="msg success"><i class="fa fa-check"></i>Message sending success!</span>
|
||||
<span class="msg error"><i class="fa fa-ban"></i>Message NOT sending verify errors!</span>
|
||||
<span class="msg alert"><i class="fa fa-exclamation-triangle"></i>Your permit geolocalization?</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pure-u-1-2 box">
|
||||
<div class="l-box">
|
||||
<div class="header">
|
||||
<h3 class="header-title">Lists Content</h3>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<p>adfas</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
{{-- <div class="pure-g">
|
||||
<div class="pure-u-4-5">
|
||||
<div class="l-box">
|
||||
<div class="header">
|
||||
<h3 class="header-title">Edit Item</h3>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<p>Content</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pure-u-1-5">
|
||||
<div class="l-box">
|
||||
<div class="header">
|
||||
<h3 class="header-title">Sidebar</h3>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<p>Sidebar content</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="{{ asset('js/lib.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('div.alert').not('alert-important');//.delay(3000).slideUp(300);
|
||||
</script>
|
||||
<script type="text/javascript" src="{{ asset('assets/functions.js') }}"></script>
|
||||
@yield('scripts')
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -4,4 +4,5 @@
|
|||
{{ session('flash_message') }}
|
||||
</div>
|
||||
|
||||
|
||||
@endif
|
|
@ -65,7 +65,7 @@
|
|||
</a>
|
||||
<ul class="pure-menu-children" role="menu">
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ URL::route('oai') }}" target="_blank"> OAI-PMH 2.0</a></li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ URL::route('dataset.create1') }}">PUBLISH</a></li>
|
||||
{{-- <li class="pure-menu-item"><a class="pure-menu-link" href="{{ URL::route('dataset.create1') }}">PUBLISH</a></li> --}}
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ URL::route('home.news') }}">NEWS</a></li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('documents') }}">DATASETS</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -1,50 +1,245 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('title', 'Publish')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="title">
|
||||
<h2><i class="fa fa-upload"></i> Publish New Dataset - Step 1</h2>
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-upload"></i> Publish New Dataset
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
{{-- <h3 class="document-type">Dokumenttyp und Datei wählen</h3> --}}
|
||||
{{-- <form action="/dataset/store-step1" method="post" class="pure-form" enctype="multipart/form-data"> --}}
|
||||
{!! Form::model($dataset, ['method' => 'POST', 'route' => ['dataset.store1'], 'class' => 'pure-form']) !!}
|
||||
<div id="app" class="box-content">
|
||||
<form action={{ route('dataset.store1') }} method="post" class="pure-form" enctype="multipart/form-data">
|
||||
{{ csrf_field() }}
|
||||
|
||||
{{ csrf_field() }}
|
||||
<fieldset class="left-labels">
|
||||
<div v-if="step === 1">
|
||||
<h1>Step One</h1>
|
||||
<fieldset class="left-labels">
|
||||
<legend>Datensatztyp</legend>
|
||||
<div class="description hint">
|
||||
<p>Bitte wählen Sie einen Datensatztyp aus der Liste aus.</p></div><p></p><div class="form-item">
|
||||
<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.">
|
||||
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --', 'v-model' => 'dataset.type']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<legend>Datensatztyp</legend>
|
||||
<div class="description hint">
|
||||
<p>Bitte wählen Sie einen Datensatztyp aus der Liste aus.</p></div><p></p><div class="form-item">
|
||||
<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.">
|
||||
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --']) !!}
|
||||
<fieldset class="left-labels">
|
||||
<legend>Einräumung eines einfachen Nutzungsrechts</legend>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<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>
|
||||
</small>
|
||||
{{-- <input name="rights" value="0" type="hidden"> --}}
|
||||
<input class="form-checkbox" name="rights" id="rights" type="checkbox" v-model="dataset.rights" true-value="1" false-value="0">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
{{-- <button type="submit" class="pure-button button-small">
|
||||
<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>
|
||||
<span>Weiter zum nächsten Schritt</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="step === 2">
|
||||
<h1>Step Two</h1>
|
||||
<fieldset id="fieldset-general">
|
||||
<legend>General</legend>
|
||||
<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">
|
||||
{!! 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' => 'dataset.type']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('State', 'State..') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select(
|
||||
'State',
|
||||
array_except(Config::get('enums.server_states'),['published', 'deleted', 'temporary']),
|
||||
'',
|
||||
['placeholder' => '-- select server state --', 'v-model' => 'dataset.state']
|
||||
) !!}
|
||||
</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']) !!}
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('EmbargoDate', 'Embargo Date') !!}
|
||||
{!! Form::date('EmbargoDate', null, ['placeholder' => date('y-m-d'), 'class' => 'pure-u-23-24', 'v-model' => 'dataset.embargo_date']) !!}
|
||||
<small id="projectHelp" class="pure-form-message-inline">EmbargoDate is optional</small>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1 checkboxlist">
|
||||
<!-- checkboxes -->
|
||||
<label for="BelongsToBibliography" class="pure-checkbox">
|
||||
{{-- <input type="hidden" name="BelongsToBibliography" value="0"> --}}
|
||||
<input name="BelongsToBibliography" v-model="dataset.belongs_to_bibliography" true-value="1"
|
||||
false-value="0" type="checkbox" class="form-check-input">
|
||||
Belongs To Bibliography?
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="fieldset-titles">
|
||||
<legend>Main Title & Abstract</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']) !!}
|
||||
</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']) !!}
|
||||
</div>
|
||||
</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', 'size' => '70x6', 'v-model' => 'dataset.abstract_main.value']) }}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('AbstractLanguage', 'Abstract Language..') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select('TitleAbstract[Language]', $languages, null, ['placeholder' => '--no language--', 'v-model' => 'dataset.abstract_main.language']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="fieldset-licenses">
|
||||
<legend>Licenses</legend>
|
||||
|
||||
<div class="pure-control-group checkboxlist">
|
||||
@foreach ($licenses as $license)
|
||||
<label for={{"license". $license->id }} class="pure-checkbox">
|
||||
<input name="licenses[]" value={{ $license->id }} v-model="dataset.checkedLicenses" type="checkbox" class="form-check-input">
|
||||
{{ $license->name_long }}
|
||||
</label>
|
||||
@endforeach
|
||||
<br>
|
||||
<span>Checked licenses: @{{ dataset.checkedLicenses }}</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
<button @click.prevent="prev()" class="pure-button button-small">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
<span>Zurück</span>
|
||||
</button>
|
||||
|
||||
<button @click.prevent="next()" class="pure-button button-small">
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
<span>Review Dataset</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="left-labels">
|
||||
<legend>Einräumung eines einfachen Nutzungsrechts</legend>
|
||||
<div class="class="pure-u-1 pure-u-md-1-2 pure-div"">
|
||||
<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>
|
||||
</small>
|
||||
<input name="rights" value="0" type="hidden">
|
||||
<input class="form-checkbox" name="rights" id="rights" value="1" type="checkbox">
|
||||
<div v-if="step === 3">
|
||||
<h1>File Upload</h1>
|
||||
|
||||
<div class="dropbox">
|
||||
<input type="file" multiple name="files" :disabled="isSaving" @change="filesChange($event.target.name, $event.target.files)" class="input-file">
|
||||
<p v-if="isInitial">
|
||||
Drag your file(s) here to begin<br> or click to browse
|
||||
</p>
|
||||
<p v-if="isSaving">
|
||||
Uploading @{{ fileCount }} files...
|
||||
</p>
|
||||
</div>
|
||||
{{-- <button @click.prevent="resetDropbox()" v-bind:disabled="isInitial" class="pure-button is-warning">Reset Dropbox</button> --}}
|
||||
{{-- <ul class="list-unstyled">
|
||||
<li v-for="(item, index) in dataset.files">
|
||||
@{{ item.name }} <i class="fa fa-remove"></i><span class="remove-file" v-on:click="removeFile(index)"> Remove</span>
|
||||
</li>
|
||||
</ul> --}}
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20px;">Sorting</th>
|
||||
<th>File</th>
|
||||
<th>Label</th>
|
||||
<th style="width: 130px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in dataset.files">
|
||||
<td>
|
||||
@{{ index +1 }}
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" v-model="item.file.name"/>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" v-model="item.label"/>
|
||||
</td>
|
||||
<td>
|
||||
<button class="pure-button button-small is-warning" @click.prevent="removeFile(index)">Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button @click.prevent="prev()" class="pure-button button-small">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
<span>Zurück</span>
|
||||
</button>
|
||||
<button @click.prevent="submit()" class="pure-button button-small">
|
||||
<i class="fa fa-save"></i>
|
||||
<span>Create Dataset</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
<button type="submit" class="pure-button button-small">
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
<span>Weiter zum nächsten Schritt</span>
|
||||
</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<div v-if="errors.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">@{{ error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@include('errors._errors')
|
||||
|
||||
</form>
|
||||
{{-- <br/><br/>Debug:@{{ dataset }} --}}
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
{{-- <script type="text/javascript" src="{{ asset('js/lib.js') }}"></script> --}}
|
||||
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<!-- production version, optimized for size and speed -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
|
||||
<script type="text/javascript" src="{{ asset('js/app.js') }}"></script>
|
||||
{{-- <script type="text/javascript" src="{{ resource_path('assets\js\app.js') }}"></script> --}}
|
||||
@stop
|
||||
|
||||
|
|
57
resources/views/publish/create-step1Old.blade.php
Normal file
57
resources/views/publish/create-step1Old.blade.php
Normal file
|
@ -0,0 +1,57 @@
|
|||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('title', 'Publish')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-upload"></i> Publish New Dataset - Step 1
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div id="app" class="box-content">
|
||||
{{-- <form action={{ route('dataset.store1') }} method="post" class="pure-form" enctype="multipart/form-data"> --}}
|
||||
{!! Form::model($dataset, ['method' => 'POST', 'route' => ['dataset.store1'], 'class' => 'pure-form']) !!}
|
||||
{{ csrf_field() }}
|
||||
|
||||
<fieldset class="left-labels">
|
||||
<legend>Datensatztyp</legend>
|
||||
<div class="description hint">
|
||||
<p>Bitte wählen Sie einen Datensatztyp aus der Liste aus.</p></div><p></p><div class="form-item">
|
||||
<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.">
|
||||
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="left-labels">
|
||||
<legend>Einräumung eines einfachen Nutzungsrechts</legend>
|
||||
<div class="class="pure-u-1 pure-u-md-1-2 pure-div"">
|
||||
<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>
|
||||
</small>
|
||||
<input name="rights" value="0" type="hidden">
|
||||
<input class="form-checkbox" name="rights" id="rights" value="1" type="checkbox">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
{{-- <button type="submit" class="pure-button button-small">
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
<span>Weiter zum nächsten Schritt</span>
|
||||
</button> --}}
|
||||
<button @click.prevent="next()">Next</button>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
@include('errors._errors')
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
{{-- <script type="text/javascript" src="{{ asset('js/lib.js') }}"></script> --}}
|
||||
<script type="text/javascript" src="{{ asset('js/app.js') }}"></script>
|
||||
@stop
|
|
@ -1,14 +1,15 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('title', 'Publish')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="title">
|
||||
<h2><i class="fa fa-upload"></i> Publish New Dataset - Step 2</h2>
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-upload"></i> Publish New Dataset - Step 2
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<h3 class="document-type">Attribute eingeben</h3>
|
||||
<div class="box-content">
|
||||
{{-- <div method="post" enctype="multipart/from-data" class="pure-form"> --}}
|
||||
{!! Form::model($dataset, ['method' => 'post', 'files' => true , 'route' => ['dataset.store2'], 'class' => 'pure-form']) !!}
|
||||
|
||||
|
@ -20,6 +21,7 @@
|
|||
{!! Form::label('Type', 'Type..') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
|
@ -33,12 +35,14 @@
|
|||
<small id="projectHelp" class="pure-form-message-inline">EmbargoDate is optional</small>
|
||||
</div>
|
||||
|
||||
<!-- checkboxes -->
|
||||
<label for="BelongsToBibliography" class="pure-checkbox">
|
||||
<input type="hidden" name="BelongsToBibliography" value="0">
|
||||
<input name="BelongsToBibliography" value="1" type="checkbox" class="form-check-input">
|
||||
Belongs To Bibliography?
|
||||
</label>
|
||||
<div class="pure-u-1 pure-u-md-1 checkboxlist">
|
||||
<!-- checkboxes -->
|
||||
<label for="BelongsToBibliography" class="pure-checkbox">
|
||||
<input type="hidden" name="BelongsToBibliography" value="0">
|
||||
<input name="BelongsToBibliography" value="1" type="checkbox" class="form-check-input">
|
||||
Belongs To Bibliography?
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -61,7 +65,7 @@
|
|||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('TitleAbstract', 'Main Abstract ') !!}
|
||||
{!! Form::text('TitleAbstract[Value]', null, ['class' => 'pure-u-23-24']) !!}
|
||||
{{ Form::textarea('TitleAbstract[Value]', null, ['class' => 'pure-u-23-24', 'size' => '70x6']) }}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('language', 'Abstract Language..') !!}
|
||||
|
@ -83,8 +87,6 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
<button type="submit" class="pure-button button-small">
|
||||
|
@ -102,5 +104,6 @@
|
|||
<button type="submit" class="btn btn-danger">Remove Image</button>
|
||||
</form>
|
||||
@endif
|
||||
<div class="box-content">
|
||||
|
||||
@stop
|
|
@ -1,66 +1,71 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('title', 'Publish')
|
||||
|
||||
@section('content')
|
||||
<h1>Add New Dataset - Step 3</h1>
|
||||
<hr>
|
||||
<h3>Review Dataset Details</h3>
|
||||
<form action={{ route('dataset.store') }}} method="post" class="pure-form" >
|
||||
{{ csrf_field() }}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>Dataset Type:</td>
|
||||
<td><strong>{{ $dataset['Type'] }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Creating Corporation:</td>
|
||||
<td><strong>{{ $dataset['CreatingCorporation'] or '' }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Embargo Date:</td>
|
||||
<td><strong>{{ $dataset['EmbargoDate'] or '' }}</strong></td>
|
||||
</tr>
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-upload"></i> add New Dataset - Step 32
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<td>Main Title:</td>
|
||||
@if(isset($dataset['TitleMain']))
|
||||
<td><strong>{{ $dataset['TitleMain']['Value'] }} </strong></td>
|
||||
@endif
|
||||
</tr>
|
||||
<div class="box-content">
|
||||
|
||||
<form action={{ route('dataset.store') }} method="post" class="pure-form" >
|
||||
{{ csrf_field() }}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>Main Abstract:</td>
|
||||
@if(isset($dataset['TitleAbstract']))
|
||||
<td><strong>{{ $dataset['TitleAbstract']['Value'] }} </strong></td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Belongs To Bibliography:</td>
|
||||
<td><strong>{{ isset($dataset['BelongsToBibliography']) ? 'Yes' : 'No' }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Product Image:</td>
|
||||
<td><strong><img alt="Product Image" src="/storage/files/{{$dataset['DatasetFile']}}"/></strong></td>
|
||||
<td>Dataset Type:</td>
|
||||
<td><strong>{{ $dataset['Type'] }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Creating Corporation:</td>
|
||||
<td><strong>{{ $dataset['CreatingCorporation'] or '' }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Embargo Date:</td>
|
||||
<td><strong>{{ $dataset['EmbargoDate'] or '' }}</strong></td>
|
||||
</tr>
|
||||
|
||||
{{-- <tr>
|
||||
<td>Product Image:</td>
|
||||
<td><strong><img alt="Product Image" src="/storage/productimg/{{$product->productImg}}"/></strong></td>
|
||||
</tr> --}}
|
||||
</table>
|
||||
<div class="pure-controls">
|
||||
<a type="button" href="{{ route('dataset.create1') }}" class="pure-button button-small is-warning">Back to Step 1</a>
|
||||
<a type="button" href={{ route('dataset.create2') }} class="pure-button button-small is-warning">Back to Step 2</a>
|
||||
<button type="submit" class="pure-button button-small">
|
||||
<i class="fa fa-save"></i>
|
||||
<span>Create Product</span>
|
||||
</button>
|
||||
</div>
|
||||
<tr>
|
||||
<td>Main Title:</td>
|
||||
@if(isset($dataset['TitleMain']))
|
||||
<td><strong>{{ $dataset['TitleMain']['Value'] }} </strong></td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Main Abstract:</td>
|
||||
@if(isset($dataset['TitleAbstract']))
|
||||
<td><strong>{{ $dataset['TitleAbstract']['Value'] }} </strong></td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
</form>
|
||||
<tr>
|
||||
<td>Belongs To Bibliography:</td>
|
||||
<td><strong>{{ isset($dataset['BelongsToBibliography']) ? 'Yes' : 'No' }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Product Image:</td>
|
||||
<td><strong><img alt="Product Image" src="/storage/files/{{$dataset['DatasetFile']}}"/></strong></td>
|
||||
</tr>
|
||||
|
||||
{{-- <tr>
|
||||
<td>Product Image:</td>
|
||||
<td><strong><img alt="Product Image" src="/storage/productimg/{{$product->productImg}}"/></strong></td>
|
||||
</tr> --}}
|
||||
</table>
|
||||
<div class="pure-controls">
|
||||
<a type="button" href="{{ route('dataset.create1') }}" class="pure-button button-small is-warning">Back to Step 1</a>
|
||||
<a type="button" href={{ route('dataset.create2') }} class="pure-button button-small is-warning">Back to Step 2</a>
|
||||
<button type="submit" class="pure-button button-small">
|
||||
<i class="fa fa-save"></i>
|
||||
<span>Create Dataset</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
@include('errors._errors')
|
||||
|
||||
|
|
|
@ -2,41 +2,41 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
<h1 class="title">Documents</h1>
|
||||
<h1 class="title">Documents</h1>
|
||||
|
||||
<br><br>
|
||||
<br><br>
|
||||
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
|
||||
<thead>
|
||||
<th>id</th>
|
||||
<th>document type</th>
|
||||
<!-- <th>Category</th>
|
||||
<th>Shelf</th> -->
|
||||
<thead>
|
||||
<th>id</th>
|
||||
<th>document type</th>
|
||||
<!-- <th>Category</th>
|
||||
<th>Shelf</th> -->
|
||||
|
||||
</thead>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tbody>
|
||||
|
||||
@foreach($documents as $document)
|
||||
@foreach($documents as $document)
|
||||
|
||||
<tr>
|
||||
<td>{{ $document->id }}</td>
|
||||
<td>{{ $document->type }}</td>
|
||||
<!-- <td>
|
||||
if($book->stock > 0)
|
||||
Available
|
||||
elseif($book->stock == 0)
|
||||
-
|
||||
endif
|
||||
</td> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $document->id }}</td>
|
||||
<td>{{ $document->type }}</td>
|
||||
<!-- <td>
|
||||
if($book->stock > 0)
|
||||
Available
|
||||
elseif($book->stock == 0)
|
||||
-
|
||||
endif
|
||||
</td> -->
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<div class="pure-control-group">
|
||||
<label for="data-en-key-home_index_imprint_title" class="optional">Titel auf der Seite</label>
|
||||
<input name="data[de][key][home_index_imprint_title]" id="data-de-key-home_index_imprint_title" value="Impressum nach §5 Telemediengesetz" class="pure-input-1" type="text">
|
||||
<input name="data[de][key][home_index_imprint_title]" id="data-de-key-home_index_imprint_title" value="Impressum nach <EFBFBD>5 Telemediengesetz" class="pure-input-1" type="text">
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-archive"></i> Collections
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<h1 class="title">Collections</h1>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-3-3">
|
||||
<a href="{{ route('settings.project.add') }}" class="pure-button button-small is-primary">
|
||||
<i class="fa fa-plus-circle"></i>ADD NEW COLLECTION
|
||||
</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
|
@ -50,11 +54,11 @@
|
|||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<div class="pure-u-1">
|
||||
{{ $collections->links('vendor.pagination.default') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-3-3">
|
||||
{{ $collections->links('vendor.pagination.default') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
|
@ -118,6 +118,3 @@
|
|||
<span>{!! $submitButtonText !!}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@include('errors._errors')
|
||||
|
|
|
@ -1,96 +1,95 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa fa-database"></i> Datasets
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="title">
|
||||
<h2><i class="fa fa-archive"></i> Datasets</h2>
|
||||
<div class="pure-g box-content">
|
||||
|
||||
|
||||
<div class="sidebar-simplesearch pure-u-1">
|
||||
{!! Form::open(array('route' => 'settings.document','method' => 'GET', 'class'=>'pure-form')) !!}
|
||||
<p>
|
||||
{!! Form::text('search', null, array('class'=>'pure-u-1 pure-u-md-1-2', 'placeholder'=>'filter for the title...')) !!}
|
||||
|
||||
<div class="select pure-u-1 pure-u-md-1-2">
|
||||
{!! Form::select('state', Config::get('enums.server_states'), 'published', ['class' => 'pure-u-1']) !!}
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2">
|
||||
<button type="submit">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</p>
|
||||
<input type="hidden" name="searchtype" id="searchtype" value="simple" />
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1">
|
||||
<div class="panel-heading">Page {{ $documents->currentPage() }} of {{ $documents->lastPage() }}</div>
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>Document Type</th>
|
||||
<th>Project</th>
|
||||
<th>Titles</th>
|
||||
<th>Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($documents as $document)
|
||||
|
||||
|
||||
<div class="pure-g">
|
||||
|
||||
<div class="sidebar-simplesearch pure-u-1">
|
||||
{!! Form::open(array('route' => 'settings.document','method' => 'GET', 'class'=>'pure-form')) !!}
|
||||
<p>
|
||||
{!! Form::text('search', null, array('class'=>'pure-u-1 pure-u-md-1-2', 'placeholder'=>'filter for the title...')) !!}
|
||||
|
||||
<div class="select pure-u-1 pure-u-md-1-2">
|
||||
{!! Form::select('state', Config::get('enums.server_states'), 'published', ['class' => 'pure-u-1']) !!}
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2">
|
||||
<button type="submit">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</p>
|
||||
<input type="hidden" name="searchtype" id="searchtype" value="simple" />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1">
|
||||
<div class="panel-heading">Page {{ $documents->currentPage() }} of {{ $documents->lastPage() }}</div>
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>Document Type</th>
|
||||
<th>Project</th>
|
||||
<th>Titles</th>
|
||||
<th>Options</th>
|
||||
|
||||
<td>{{ $document->id }}</td>
|
||||
<td>{{ $document->type }}</td>
|
||||
@if($document->hasProject())
|
||||
<td>{{ $document->project->name }}</td>
|
||||
@else
|
||||
<td>--</td>
|
||||
@endif
|
||||
|
||||
<td>
|
||||
@foreach ($document->titles as $title)
|
||||
<p>title: {{ $title->value }}</p>
|
||||
@endforeach
|
||||
|
||||
</td>
|
||||
|
||||
{{-- <td>
|
||||
@foreach ($document->collections as $collection)
|
||||
<p>in collection: {{ $collection->name }}</p>
|
||||
@endforeach --}}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a class="view" href="{{ route('settings.document.show', $document->id) }}"><span> </span></a>
|
||||
<a class="edit" href="{{ route('settings.document.edit', $document->id) }}"><span> </span></a>
|
||||
<!--<a class="delete" href="{{ route('settings.book.delete', $document->id) }}"><span> </span></a>-->
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($documents as $document)
|
||||
|
||||
<tr>
|
||||
|
||||
<td>{{ $document->id }}</td>
|
||||
<td>{{ $document->type }}</td>
|
||||
@if($document->hasProject())
|
||||
<td>{{ $document->project->name }}</td>
|
||||
@else
|
||||
<td>--</td>
|
||||
@endif
|
||||
|
||||
<td>
|
||||
@foreach ($document->titles as $title)
|
||||
<p>title: {{ $title->value }}</p>
|
||||
@endforeach
|
||||
|
||||
</td>
|
||||
|
||||
{{-- <td>
|
||||
@foreach ($document->collections as $collection)
|
||||
<p>in collection: {{ $collection->name }}</p>
|
||||
@endforeach --}}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a class="view" href="{{ route('settings.document.show', $document->id) }}"><span> </span></a>
|
||||
<a class="edit" href="{{ route('settings.document.edit', $document->id) }}"><span> </span></a>
|
||||
<!--<a class="delete" href="{{ route('settings.book.delete', $document->id) }}"><span> </span></a>-->
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pure-u-1">
|
||||
{{ $documents
|
||||
->appends(Input::except('page'))
|
||||
->links('vendor.pagination.default') }}
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pure-u-1">
|
||||
{{ $documents
|
||||
->appends(Input::except('page'))
|
||||
->links('vendor.pagination.default') }}
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
|
@ -1,29 +1,26 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="pure-g">
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<span>Edit Your Dataset</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-3-3">
|
||||
<div class="content">
|
||||
<h1 class="title">Edit Your Dataset</h1>
|
||||
<div>
|
||||
<a href="{{ route('settings.document') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
{!! Form::model($document, ['method' => 'PATCH', 'route' => ['settings.document.update', $document->id], 'class' => 'pure-form', 'enctype' => 'multipart/form-data' ]) !!}
|
||||
|
||||
<div>
|
||||
<a href="{{ route('settings.document') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
{!! Form::model($document, ['method' => 'PATCH', 'route' => ['settings.document.update', $document->id], 'class' => 'pure-form', 'enctype' => 'multipart/form-data' ]) !!}
|
||||
@include('settings/document/_form', ['submitButtonText' => 'Edit Dataset', 'bookLabel' => 'Edit Dataset.'])
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
@include('errors._errors')
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-archive"></i> Detail
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div id="titlemain-wrapper">
|
||||
<div class="pure-g box-content">
|
||||
<div id="titlemain-wrapper" class="pure-u-1 pure-u-md-1-2">
|
||||
<div class="frontdoor_pagination">
|
||||
<a href="{{ route('settings.document') }}" class="pure-button">
|
||||
<a href="{{ route('settings.document') }}" class="pure-button button-small">
|
||||
<i class="fa fa-arrow-left"></i> BACK
|
||||
</a>
|
||||
</div>
|
||||
|
@ -14,7 +19,7 @@
|
|||
@endforeach
|
||||
</div>
|
||||
|
||||
<div id="result-data">
|
||||
<div id="result-data" class="pure-u-1 pure-u-md-1-2">
|
||||
<div id="abstract">
|
||||
<ul>
|
||||
@foreach ($document->abstracts as $abstract)
|
||||
|
@ -25,7 +30,5 @@
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
83
resources/views/settings/home/index.blade.php
Normal file
83
resources/views/settings/home/index.blade.php
Normal file
|
@ -0,0 +1,83 @@
|
|||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">Reports</h3>
|
||||
</div>
|
||||
<div class="pure-g box-content">
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<canvas id="myChart" width="400" height="260"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- <div class="pure-u-1-2 box">
|
||||
<div class="l-box">
|
||||
<div class="header">
|
||||
<h3 class="header-title">Message</h3>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<div class="box-content">
|
||||
<form class="pure-form pure-form-stacked">
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1-1">
|
||||
<label for="title">Title</label>
|
||||
<input id="title" type="text" class="pure-u-1-1">
|
||||
|
||||
<label for="post">Post Content</label>
|
||||
<textarea id="post" rows="10" class="pure-u-1-1"></textarea>
|
||||
|
||||
<hr>
|
||||
|
||||
<button class="pure-button pure-button-primary">Save</button>
|
||||
<button class="pure-button">Save in Draft</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.1/Chart.min.js"></script>
|
||||
<script>
|
||||
var ctx = document.getElementById("myChart");
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
|
||||
datasets: [{
|
||||
label: '# of Votes',
|
||||
data: [12, 14, 8, 2, 5, 1],
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(255, 206, 86, 0.2)',
|
||||
'rgba(75, 192, 192, 0.2)',
|
||||
'rgba(153, 102, 255, 0.2)',
|
||||
'rgba(255, 159, 64, 0.2)'
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255,99,132,1)',
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(255, 206, 86, 1)',
|
||||
'rgba(75, 192, 192, 1)',
|
||||
'rgba(153, 102, 255, 1)',
|
||||
'rgba(255, 159, 64, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero:true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -1,10 +1,10 @@
|
|||
<fieldset>
|
||||
|
||||
<legend>General</legend>
|
||||
<div class="pure-g">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('name', 'Lizenzname') !!}
|
||||
{!! Form::text('name_long', null, ['class' => 'pure-u-23-24']) !!}
|
||||
{!! Form::label('name_long', 'Lizenzname') !!}
|
||||
{!! Form::text('name_long', null, ['class' => 'pure-u-23-24', 'placeholder' => '--no language--']) !!}
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
|
@ -64,14 +64,10 @@
|
|||
<input name="pod_allowed" value="1" {{ ($license->pod_allowed == 1) ? 'checked="checked" ' : '' }} type="checkbox" class="form-check-input">
|
||||
Print on Demand
|
||||
</label>
|
||||
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
{!! Form::submit($submitButtonText, ['class' => 'pure-button button-small']) !!}
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
{!! Form::submit($submitButtonText, ['class' => 'pure-button button-small']) !!}
|
||||
</div>
|
||||
@include('errors._errors')
|
|
@ -1,28 +1,27 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="pure-g">
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Edit Your License
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1">
|
||||
<div class="content">
|
||||
<h1 class="title">Edit Your License</h1>
|
||||
|
||||
<div>
|
||||
<a href="{{ route('settings.license') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{!! Form::model($license, ['method' => 'PATCH', 'route' => ['settings.license.update', $license->id], 'class' => 'pure-form']) !!}
|
||||
|
||||
<div>
|
||||
<a href="{{ route('settings.license') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
{!! Form::model($license, ['method' => 'PATCH', 'route' => ['settings.license.update', $license->id], 'class' => 'pure-form', 'enctype' => 'multipart/form-data']) !!}
|
||||
@include('settings/license/_form', ['submitButtonText' => 'Edit License', 'daysLabel' => 'Days..', 'finesLabel' => 'Licenses..'])
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
|
@ -1,43 +1,40 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-file"></i> Licenses
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<h2><i class="fa fa-file"></i> LICENSES</h2>
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1">
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
|
||||
<thead>
|
||||
<th>Licence</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($licenses as $license)
|
||||
<tr>
|
||||
<td>{{ $license->name_long }}</td>
|
||||
|
||||
<td>
|
||||
<a class="edit" href="{{ route('settings.license.edit', $license->id) }}">
|
||||
<span>edit</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
|
||||
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
|
||||
<thead>
|
||||
<th>Licence</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($licenses as $license)
|
||||
|
||||
<tr>
|
||||
<td>{{ $license->name_long }}</td>
|
||||
|
||||
<td>
|
||||
<a class="edit" href="{{ route('settings.license.edit', $license->id) }}">
|
||||
<span>edit</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
|
@ -39,9 +39,8 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<!-- <div class="pure-controls">-->
|
||||
|
||||
{!! Form::submit($submitButtonText, ['class' => 'pure-button button-small']) !!}
|
||||
<!-- </div>-->
|
||||
</fieldset>
|
||||
|
||||
@include('errors._errors')
|
|
@ -1,27 +1,26 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Add Your Person
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<h1 class="title">Add Your Person</h1>
|
||||
<div>
|
||||
<a href="{{ route('settings.person') }}" class="pure-button button-small">
|
||||
<div class="box-content">
|
||||
<div>
|
||||
<a href="{{ route('settings.person') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
{!! Form::open(['route' => 'settings.person.post', 'class' => 'pure-form pure-form-stacked']) !!}
|
||||
|
||||
@include('settings/person/_form', ['submitButtonText' => 'Add Person', 'projectLabel' => 'Save Person.'])
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{!! Form::open(['route' => 'settings.person.post', 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
@include('settings/person/_form', ['submitButtonText' => 'Add Person', 'projectLabel' => 'Save Person.'])
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@stop
|
|
@ -1,27 +1,27 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="pure-g">
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Edit {{ $person->getFullName() }}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="content">
|
||||
<h1 class="title">Edit {{ $person->getFullName() }}</h1>
|
||||
<div>
|
||||
<a href="{{ route('settings.person') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
{!! Form::model($person, ['method' => 'PATCH', 'route' => ['settings.person.update', $person->id],'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<div>
|
||||
<a href="{{ route('settings.person') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
@include('settings/person/_form', ['submitButtonText' => 'Save Person'])
|
||||
|
||||
{!! Form::model($person, ['method' => 'PATCH', 'route' => ['settings.person.update', $person->id],'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
@include('settings/person/_form', ['submitButtonText' => 'Save Person'])
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,75 +1,68 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="pure-g">
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa fa-edit"></i> Persons Management
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="content">
|
||||
<a class="pure-button button-small is-primary" href="{{ route('settings.person.add') }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>ADD NEW Person</span>
|
||||
</a>
|
||||
<br><br>
|
||||
|
||||
<div class="title">
|
||||
<h2><i class="fa fa-pencil"></i> Persons Management</h2>
|
||||
</div>
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>ORCID</th>
|
||||
<!-- <th>Borrow</th> -->
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
<th>Document Count</th>
|
||||
<th colspan="2"><center>Options</center></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<a class="pure-button button-small is-primary" href="{{ route('settings.person.add') }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>ADD NEW Person</span>
|
||||
</a>
|
||||
<br><br>
|
||||
<tbody>
|
||||
@foreach($persons as $person)
|
||||
<tr>
|
||||
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
<td>{{ $person->last_name }}</td>
|
||||
<!-- <td>{{ date('d-M-y', $person->registered_at) }}</td>-->
|
||||
<td>{{ $person->identifier_orcid }}</td>
|
||||
<!-- <td>{{ $person->borrow }}</td> -->
|
||||
<td>
|
||||
@if($person->status == 1)
|
||||
Active
|
||||
@else
|
||||
Inactive
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($person->status == 1)
|
||||
<a href="{{ route('settings.person.down', $person->id) }}" class="pure-button button-small is-warning">Deactivate</a>
|
||||
@else
|
||||
<a href="{{ route('settings.person.up', $person->id) }}" class="pure-button button-small is-success">Activate</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $person->documents->count() }}</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('settings.person.edit', $person->id) }}"><span> </span></a>
|
||||
<a class="delete" href="{{ route('settings.person.delete', $person->id) }}"><span> </span></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>ORCID</th>
|
||||
<!-- <th>Borrow</th> -->
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
<th>Document Count</th>
|
||||
<th colspan="2"><center>Options</center></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($persons as $person)
|
||||
|
||||
<tr>
|
||||
|
||||
<td>{{ $person->last_name }}</td>
|
||||
<!-- <td>{{ date('d-M-y', $person->registered_at) }}</td>-->
|
||||
<td>{{ $person->identifier_orcid }}</td>
|
||||
<!-- <td>{{ $person->borrow }}</td> -->
|
||||
<td>
|
||||
@if($person->status == 1)
|
||||
Active
|
||||
@else
|
||||
Inactive
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($person->status == 1)
|
||||
<a href="{{ route('settings.person.down', $person->id) }}" class="pure-button button-small is-warning">Deactivate</a>
|
||||
@else
|
||||
<a href="{{ route('settings.person.up', $person->id) }}" class="pure-button button-small is-success">Activate</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $person->documents->count() }}</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('settings.person.edit', $person->id) }}"><span> </span></a>
|
||||
<a class="delete" href="{{ route('settings.person.delete', $person->id) }}"><span> </span></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
|
@ -9,10 +9,7 @@
|
|||
{{ Form::text('label', null, ['class' => 'form-control']) }}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<!-- <div class="pure-controls">-->
|
||||
{{ Form::submit($submitButtonText, ['class' => 'pure-button button-small']) }}
|
||||
<!--</div>-->
|
||||
{{ Form::submit($submitButtonText, ['class' => 'pure-button button-small']) }}
|
||||
</fieldset>
|
||||
|
||||
@include('errors._errors')
|
|
@ -1,27 +1,21 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Add Your Project
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<h1 class="title">Add Your Project</h1>
|
||||
<div>
|
||||
<a href="{{ route('settings.project') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
{!! Form::open(['route' => 'settings.project.post', 'class' => 'pure-form pure-form-stacked']) !!}
|
||||
|
||||
<div class="box-content">
|
||||
<a href="{{ route('settings.project') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
<div>
|
||||
{!! Form::open(['route' => 'settings.project.post', 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
@include('settings/project/_form', ['submitButtonText' => 'Save Project', 'projectLabel' => 'Save Project.'])
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@stop
|
|
@ -1,44 +1,41 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="pure-g">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="content">
|
||||
<div class="title">
|
||||
<h1>Project</h1>
|
||||
</div>
|
||||
<a href="{{ route('settings.project.add') }}" class="pure-button button-small is-primary">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>ADD NEW Project</span>
|
||||
</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Project</th>
|
||||
<th>Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($projects as $project)
|
||||
<tr>
|
||||
<td>{{ $project->name }}</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('settings.project.edit', $project->id) }}"><span></span></a>
|
||||
<a class="delete" href="{{ route('settings.project.delete', $project->id) }}"><span></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-tasks"></i>
|
||||
<span>Projects<span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<a href="{{ route('settings.project.add') }}" class="pure-button button-small is-primary">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>ADD NEW Project</span>
|
||||
</a>
|
||||
<br><br>
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Project</th>
|
||||
<th>Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($projects as $project)
|
||||
<tr>
|
||||
<td>{{ $project->name }}</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('settings.project.edit', $project->id) }}"><span></span></a>
|
||||
<a class="delete" href="{{ route('settings.project.delete', $project->id) }}"><span></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
|
@ -1,29 +1,24 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<span>Edit Your Project</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g">
|
||||
|
||||
<div class="pure-g box-content">
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="content">
|
||||
|
||||
<h1 class="title">Edit Your Project</h1>
|
||||
<div>
|
||||
<a href="{{ route('settings.project') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
{!! Form::model($project, ['method' => 'PATCH', 'route' => ['settings.project.update', $project->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
@include('settings/project/_form', ['submitButtonText' => 'Save Project', 'projectLabel' => 'Edit Project.'])
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="{{ route('settings.project') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
{!! Form::model($project, ['method' => 'PATCH', 'route' => ['settings.project.update', $project->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
@include('settings/project/_form', ['submitButtonText' => 'Save Project', 'projectLabel' => 'Edit Project.'])
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,57 +1,54 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<h2 class="title">Create New Role</h2>
|
||||
<div>
|
||||
<a href="{{ route('role.index') }}" class="pure-button button-small">
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Create New Role
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<div>
|
||||
<a href="{{ route('role.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::open(['route' => 'user.store', 'method'=>'POST', 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
{!! Form::open(['route' => 'role.store', 'method'=>'POST', 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="pure-control-group">
|
||||
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
@if($errors->has('name'))
|
||||
<div class="pure-control-group @if ($errors->has('name')) field-validation-error @endif">
|
||||
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
{{-- @if($errors->has('name'))
|
||||
<p class="field-validation-error">
|
||||
{{ $errors->first('name') }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
@endif --}}
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('display_name')) field-validation-error @endif">
|
||||
{!! Form::label('display_name', 'Display Label:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('display_name', null, array('placeholder' => 'Display Label','class' => 'form-control')) !!}
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('description')) field-validation-error @endif">
|
||||
{!! Form::label('description', 'Description:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('description', null, array('placeholder' => 'Description for the role','class' => 'form-control')) !!}
|
||||
</div>
|
||||
|
||||
|
||||
<h5><b>Assign Permissions</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
<!-- <label for="Roles">Assign Roles</label>-->
|
||||
<h5><b>Assign Permissions</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
@foreach ($permissions as $permission)
|
||||
<label for={{"permission". $permission->id }} class="pure-checkbox">
|
||||
<input name="permissions[]" value={{ $permission->id }} type="checkbox" class="form-check-input">
|
||||
{{ $permission->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
||||
@foreach ($permissions as $permission)
|
||||
|
||||
<label for={{"permission". $permission->id }} class="pure-checkbox">
|
||||
<input name="permissions[]" value={{ $permission->id }} type="checkbox" class="form-check-input">
|
||||
{{ $permission->name }}
|
||||
</label>
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 text-center">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
<button type="submit" class="pure-button button-small">Submit</button>
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@endsection
|
|
@ -1,71 +1,70 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<span>Edit role {{ $role->name }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="content">
|
||||
<h1 class="title">Edit {{ $role->login }}</h1>
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div>
|
||||
<a href="{{ route('role.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div>
|
||||
<a href="{{ route('role.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</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>
|
||||
{!! Form::model($role, ['method' => 'PATCH','route' => ['role.update', $role->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<fieldset>
|
||||
<div class="pure-control-group @if ($errors->has('name')) field-validation-error @endif">
|
||||
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('display_name')) field-validation-error @endif">
|
||||
{!! Form::label('display_name', 'Display Label:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('display_name', null, array('placeholder' => 'Display Label','class' => 'form-control')) !!}
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('description')) field-validation-error @endif">
|
||||
{!! Form::label('description', 'Description:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('description', null, array('placeholder' => 'Description for the role','class' => 'form-control')) !!}
|
||||
</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
|
||||
<h5><b>Assign Permissions</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
@foreach ($permissions as $permission)
|
||||
<label for={{"permission". $permission->id }} class="pure-checkbox">
|
||||
<input name="permissions[]" value={{ $permission->id }} {{ (in_array($permission->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input">
|
||||
{{ $permission->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
{!! Form::model($role, ['method' => 'PATCH','route' => ['role.update', $role->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<fieldset>
|
||||
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
|
||||
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
|
||||
<h5><b>Assign Permissions</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
<!-- <label for="Roles">Assign Permissions</label>-->
|
||||
|
||||
|
||||
@foreach ($permissions as $permission)
|
||||
|
||||
<label for={{"permission". $permission->id }} class="pure-checkbox">
|
||||
<input name="permissions[]" value={{ $permission->id }} {{ (in_array($permission->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input">
|
||||
{{ $permission->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
<button type="submit" class="pure-button pure-button-primary">Save</button>
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
<button type="submit" class="pure-button button-small">Save</button>
|
||||
</fieldset>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-3">
|
||||
<div class="sidebar">
|
||||
@foreach ($role->permissions as $permission)
|
||||
@foreach ($role->perms as $permission)
|
||||
<p>permission: {{ $permission->name }}</p>
|
||||
@endforeach
|
||||
</div>
|
||||
|
|
|
@ -1,23 +1,21 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-key"></i>
|
||||
<span>Roles Management <span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="title">
|
||||
<h2><i class="fa fa-key"></i> Roles Management
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<a class="pure-button button-small is-primary" href="{{ route('role.create') }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>Create New Role</span>
|
||||
</a>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="pure-table roles">
|
||||
<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('role.create') }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>Create New Role</span>
|
||||
</a>
|
||||
<br>
|
||||
<table class="pure-table pure-table-horizontal roles">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Role</th>
|
||||
|
@ -31,21 +29,20 @@
|
|||
<tr>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>
|
||||
@foreach ($role->permissions()->pluck('name') as $permission)
|
||||
@foreach ($role->perms()->pluck('name') as $permission)
|
||||
<label class="badge badge-success">{{ $permission }}</label>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('role.edit', $role->id) }}"> Edit Role</a>
|
||||
<a class="edit" href="{{ route('role.edit', $role->id) }}"> Edit Role</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
|
@ -1,20 +1,13 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<h2 class="title">Create New User</h2>
|
||||
<div>
|
||||
<a href="{{ route('user.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Create New User
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@if (count($errors) > 0)
|
||||
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
|
@ -25,69 +18,50 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
{!! Form::open(['route' => 'user.store', 'method'=>'POST', 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
|
||||
<label>Login:</label>
|
||||
{!! Form::text('login', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
<div class="box-content">
|
||||
<div>
|
||||
<a href="{{ route('user.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
{!! Form::open(['route' => 'user.store', 'method'=>'POST', 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('email')) field-validation-error @endif">
|
||||
<label>Email:</label>
|
||||
{!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Password:</label>
|
||||
{!! Form::password('password', array('placeholder' => 'Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Confirm Password:</label>
|
||||
{!! Form::password('password_confirmation', array('placeholder' => 'Confirm Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<h5><b>Assign Roles</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
<!-- <label for="Roles">Assign Roles</label>-->
|
||||
|
||||
|
||||
@foreach ($roles as $role)
|
||||
|
||||
<label for={{"role". $role->id }} class="pure-checkbox">
|
||||
<input name="roles[]" value={{ $role->id }} type="checkbox" class="form-check-input">
|
||||
{{ $role->name }}
|
||||
</label>
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<div class="form-group">
|
||||
<strong>Role:</strong>
|
||||
{!! Form::select('roles[]', $roles,[], array('class' => 'form-control','multiple')) !!}
|
||||
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
|
||||
<label>Login:</label>
|
||||
{!! Form::text('login', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 text-center">
|
||||
<div class="pure-control-group @if ($errors->has('email')) field-validation-error @endif">
|
||||
<label>Email:</label>
|
||||
{!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Password:</label>
|
||||
{!! Form::password('password', array('placeholder' => 'Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Confirm Password:</label>
|
||||
{!! Form::password('password_confirmation', array('placeholder' => 'Confirm Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<h5><b>Assign Roles</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
@foreach ($roles as $role)
|
||||
<label for={{"role". $role->id }} class="pure-checkbox">
|
||||
<input name="roles[]" value={{ $role->id }} type="checkbox" class="form-check-input">
|
||||
{{ $role->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<button type="submit" class="pure-button button-small">Submit</button>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@endsection
|
|
@ -1,12 +1,15 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<span>Edit {{ $user->login }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g">
|
||||
|
||||
<div class="pure-g box-content">
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="content">
|
||||
<h1 class="title">Edit {{ $user->login }}</h1>
|
||||
|
||||
<div>
|
||||
<a href="{{ route('user.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
|
@ -26,58 +29,55 @@
|
|||
@endif
|
||||
|
||||
<div>
|
||||
{!! Form::model($user, ['method' => 'PATCH','route' => ['user.update', $user->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
{!! Form::model($user, ['method' => 'PATCH','route' => ['user.update', $user->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
<fieldset>
|
||||
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
|
||||
<label>Login:</label>
|
||||
{!! Form::text('login', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
|
||||
<label>Login:</label>
|
||||
{!! Form::text('login', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('email')) field-validation-error @endif">
|
||||
<label>Email:</label>
|
||||
{!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('email')) field-validation-error @endif">
|
||||
<label>Email:</label>
|
||||
{!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Password:</label>
|
||||
{!! Form::password('password', array('placeholder' => 'Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Password:</label>
|
||||
{!! Form::password('password', array('placeholder' => 'Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Confirm Password:</label>
|
||||
{!! Form::password('password_confirmation', array('placeholder' => 'Confirm Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Confirm Password:</label>
|
||||
{!! Form::password('password_confirmation', array('placeholder' => 'Confirm Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<h5><b>Assign Roles</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
<!-- <label for="Roles">Assign Roles</label>-->
|
||||
<h5><b>Assign Roles</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
<!-- <label for="Roles">Assign Roles</label>-->
|
||||
|
||||
|
||||
@foreach ($roles as $role)
|
||||
@foreach ($roles as $role)
|
||||
|
||||
<label for={{"role". $role->id }} class="pure-checkbox">
|
||||
<input name="roles[]" value={{ $role->id }} {{ (in_array($role->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input">
|
||||
{{ $role->name }}
|
||||
</label>
|
||||
<label for={{"role". $role->id }} class="pure-checkbox">
|
||||
<input name="roles[]" value={{ $role->id }} {{ (in_array($role->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input">
|
||||
{{ $role->name }}
|
||||
</label>
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<button type="submit" class="pure-button pure-button-primary">Save</button>
|
||||
<button type="submit" class="pure-button button-small">Save</button>
|
||||
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-3">
|
||||
|
|
|
@ -1,67 +1,63 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="pure-g">
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-users"></i>
|
||||
<span> Users Management</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="content">
|
||||
|
||||
<div class="title">
|
||||
<h2><i class="fa fa-users"></i> Users Management</h2>
|
||||
</div>
|
||||
|
||||
<a class="pure-button button-small is-primary" href="{{ route('user.create') }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>Create New User</span>
|
||||
</a>
|
||||
<br><br>
|
||||
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<table class="pure-table users">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Roles</th>
|
||||
<th width="280px">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($users as $key => $user)
|
||||
<tr>
|
||||
<td>{{ ++$i }}</td>
|
||||
<td>{{ $user->login }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>
|
||||
|
||||
@if(!empty($user->getRoleNames()))
|
||||
@foreach($user->getRoleNames() as $roleName)
|
||||
<label class="badge badge-success">{{ $roleName }}</label>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('user.edit',$user->id) }}"> Edit</a>
|
||||
<span> </span>
|
||||
<a class="delete" href="{{ route('user.destroy', $user->id) }}"><span> Delete</span></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
{!! $users->render() !!}
|
||||
<a class="pure-button button-small is-primary" href="{{ route('user.create') }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>Create New User</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>No</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Roles</th>
|
||||
<th width="280px">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($users as $key => $user)
|
||||
<tr>
|
||||
<td>{{ ++$i }}</td>
|
||||
<td>{{ $user->login }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>
|
||||
@if(!empty($user->roles))
|
||||
@foreach($user->roles as $role)
|
||||
<label class="badge badge-success">{{ $role->name }}</label>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('user.edit',$user->id) }}"> Edit</a>
|
||||
<span> </span>
|
||||
<a class="delete" href="{{ route('user.destroy', $user->id) }}"><span> Delete</span></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{!! $users->render() !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
286
routes/web.php
286
routes/web.php
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
use App\Document;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
|
@ -11,253 +10,264 @@ use Illuminate\Support\Facades\Route;
|
|||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
*/
|
||||
//Auth::routes();
|
||||
//Route::get('/home', 'HomeController@index')->name('home');
|
||||
|
||||
|
||||
Route::get('/oai', ['as' => 'oai', 'uses' => 'Oai\RequestController@index']);
|
||||
|
||||
Route::get('/dataset/create-step1', ['as' => 'dataset.create1', 'uses' => 'Publish\IndexController@createStep1']);
|
||||
Route::post('/dataset/store-step1', ['as' => 'dataset.store1', 'uses' => 'Publish\IndexController@storeStep1']);
|
||||
Route::group(['middleware' => ['permission:review'], 'prefix' => 'publish'], function () {
|
||||
Route::get('/dataset/create-step1', ['as' => 'dataset.create1', 'uses' => 'Publish\IndexController@createStep1']);
|
||||
Route::post('/dataset/store-step1', ['as' => 'dataset.store1', 'uses' => 'Publish\IndexController@storeStep1']);
|
||||
|
||||
Route::get('/dataset/create-step2', ['as' => 'dataset.create2', 'uses' => 'Publish\IndexController@createStep2']);
|
||||
Route::post('/dataset/store-step2', ['as' => 'dataset.store2', 'uses' => 'Publish\IndexController@storeStep2']);
|
||||
Route::get('/dataset/create-step2', ['as' => 'dataset.create2', 'uses' => 'Publish\IndexController@createStep2']);
|
||||
Route::post('/dataset/store-step2', ['as' => 'dataset.store2', 'uses' => 'Publish\IndexController@storeStep2']);
|
||||
|
||||
Route::get('/dataset/create-step3', ['as' => 'dataset.create3', 'uses' => 'Publish\IndexController@createStep3']);
|
||||
Route::post('/dataset/store', ['as' => 'dataset.store', 'uses' => 'Publish\IndexController@store']);
|
||||
Route::get('/dataset/create-step3', ['as' => 'dataset.create3', 'uses' => 'Publish\IndexController@createStep3']);
|
||||
Route::post('/dataset/store', ['as' => 'dataset.store', 'uses' => 'Publish\IndexController@store']);
|
||||
});
|
||||
|
||||
//=================================================setting users====================================================
|
||||
Route::group(['middleware' => ['perm:settings']], function () {
|
||||
Route::get('settings/', [
|
||||
'as' => 'settings.home.index', 'uses' => 'Settings\HomeController@index',
|
||||
]);
|
||||
|
||||
Route::group(['middleware' => ['permission:settings']], function () {
|
||||
//Route::resource('users','UserController');
|
||||
Route::get('settings/user', [
|
||||
'as' => 'user.index', 'uses' => 'Settings\UserController@index'
|
||||
'as' => 'user.index', 'uses' => 'Settings\UserController@index',
|
||||
]);
|
||||
Route::get('settings/user/create', [
|
||||
'as' => 'user.create', 'uses' => 'Settings\UserController@create'
|
||||
'as' => 'user.create', 'uses' => 'Settings\UserController@create',
|
||||
]);
|
||||
Route::post('settings/user/store', [
|
||||
'as' => 'user.store', 'uses' => 'Settings\UserController@store'
|
||||
'as' => 'user.store', 'uses' => 'Settings\UserController@store',
|
||||
]);
|
||||
Route::get('settings/user/edit/{id}', [
|
||||
'as' => 'user.edit', 'uses' => 'Settings\UserController@edit'
|
||||
'as' => 'user.edit', 'uses' => 'Settings\UserController@edit',
|
||||
]);
|
||||
Route::patch('settings/user/update/{id}', [
|
||||
'as' => 'user.update', 'uses' => 'Settings\UserController@update'
|
||||
'as' => 'user.update', 'uses' => 'Settings\UserController@update',
|
||||
]);
|
||||
Route::get('settings/user/destroy/{id}', [
|
||||
'as' => 'user.destroy', 'uses' => 'Settings\UserController@destroy'
|
||||
'as' => 'user.destroy', 'uses' => 'Settings\UserController@destroy',
|
||||
]);
|
||||
|
||||
//Route::resource('users','RoleController');
|
||||
//Route::resource('users','RoleController');
|
||||
Route::get('settings/role', [
|
||||
'as' => 'role.index', 'uses' => 'Settings\RoleController@index'
|
||||
'as' => 'role.index', 'uses' => 'Settings\RoleController@index',
|
||||
]);
|
||||
Route::get('settings/role/create', [
|
||||
'as' => 'role.create', 'uses' => 'Settings\RoleController@create'
|
||||
'as' => 'role.create', 'uses' => 'Settings\RoleController@create',
|
||||
]);
|
||||
Route::post('settings/role/store', [
|
||||
'as' => 'role.store', 'uses' => 'Settings\RoleController@store',
|
||||
]);
|
||||
|
||||
Route::get('settings/role/edit/{id}', [
|
||||
'as' => 'role.edit', 'uses' => 'Settings\RoleController@edit'
|
||||
'as' => 'role.edit', 'uses' => 'Settings\RoleController@edit',
|
||||
]);
|
||||
Route::patch('settings/role/update/{id}', [
|
||||
'as' => 'role.update', 'uses' => 'Settings\RoleController@update'
|
||||
'as' => 'role.update', 'uses' => 'Settings\RoleController@update',
|
||||
]);
|
||||
|
||||
//=============================================================================================================
|
||||
//=================================================setting dataset=============================================
|
||||
Route::get('settings/document', [
|
||||
'as' => 'settings.document', 'uses' => 'Settings\DatasetController@index',
|
||||
]);
|
||||
Route::get('settings/document/{id}', [
|
||||
'as' => 'settings.document.show', 'uses' => 'Settings\DatasetController@show',
|
||||
]);
|
||||
Route::get('settings/document/edit/{id}', [
|
||||
'as' => 'settings.document.edit', 'uses' => 'Settings\DatasetController@edit',
|
||||
]);
|
||||
Route::patch('settings/document/update/{id}', [
|
||||
'as' => 'settings.document.update', 'uses' => 'Settings\DatasetController@update',
|
||||
]);
|
||||
//=================================================setting collection=============================================
|
||||
Route::get('/settings/collection', [
|
||||
'as' => 'settings.collection', 'uses' => 'Settings\CollectionController@index',
|
||||
]);
|
||||
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/delete/{id}', [
|
||||
'as' => 'settings.collection.delete', 'uses' => 'Settings\CollectionController@delete',
|
||||
]);
|
||||
//==================================================================================================================
|
||||
//=================================================setting project==================================================
|
||||
Route::get('/settings/project', [
|
||||
'as' => 'settings.project', 'uses' => 'Settings\CategoryController@index',
|
||||
]);
|
||||
Route::get('/settings/project/add', [
|
||||
'as' => 'settings.project.add', 'uses' => 'Settings\CategoryController@add',
|
||||
]);
|
||||
Route::post('settings/project/add', [
|
||||
'as' => 'settings.project.post', 'uses' => 'Settings\CategoryController@store',
|
||||
]);
|
||||
Route::get('settings/project/edit/{id}', [
|
||||
'as' => 'settings.project.edit', 'uses' => 'Settings\CategoryController@edit',
|
||||
]);
|
||||
Route::patch('settings/project/edit/{id}', [
|
||||
'as' => 'settings.project.update', 'uses' => 'Settings\CategoryController@update',
|
||||
]);
|
||||
Route::get('settings/project/delete/{id}', [
|
||||
'as' => 'settings.project.delete', 'uses' => 'Settings\CategoryController@delete',
|
||||
]);
|
||||
//===================================================================================================
|
||||
//=================================================setting person====================================
|
||||
Route::get('/settings/person', [
|
||||
'as' => 'settings.person', 'uses' => 'Settings\PersonController@index',
|
||||
]);
|
||||
Route::get('/settings/person/add', [
|
||||
'as' => 'settings.person.add', 'uses' => 'Settings\PersonController@add',
|
||||
]);
|
||||
Route::post('settings/person/add', [
|
||||
'as' => 'settings.person.post', 'uses' => 'Settings\PersonController@store',
|
||||
]);
|
||||
Route::get('settings/person/edit/{id}', [
|
||||
'as' => 'settings.person.edit', 'uses' => 'Settings\PersonController@edit',
|
||||
]);
|
||||
Route::patch('settings/person/edit/{id}', [
|
||||
'as' => 'settings.person.update', 'uses' => 'Settings\PersonController@update',
|
||||
]);
|
||||
Route::get('settings/person/delete/{id}', [
|
||||
'as' => 'settings.person.delete', 'uses' => 'Settings\PersonController@delete',
|
||||
]);
|
||||
Route::get('settings/person/down/{id}', [
|
||||
'as' => 'settings.person.down', 'uses' => 'Settings\PersonController@down',
|
||||
]);
|
||||
Route::get('settings/person/up/{id}', [
|
||||
'as' => 'settings.person.up', 'uses' => 'Settings\PersonController@up',
|
||||
]);
|
||||
//=======================================================================================================
|
||||
//=================================================setting license=======================================
|
||||
Route::get('/settings/license', [
|
||||
'as' => 'settings.license', 'uses' => 'Settings\LicenseController@index',
|
||||
]);
|
||||
Route::get('settings/license/edit/{id}', [
|
||||
'as' => 'settings.license.edit', 'uses' => 'Settings\LicenseController@edit',
|
||||
]);
|
||||
Route::patch('settings/license/update/{id}', [
|
||||
'as' => 'settings.license.update', 'uses' => 'Settings\LicenseController@update',
|
||||
]);
|
||||
});
|
||||
|
||||
//=================================================home====================================================
|
||||
Route::get('/', [
|
||||
'as' => 'home.index', 'uses' => 'HomeController@index'
|
||||
'as' => 'home.index', 'uses' => 'HomeController@index',
|
||||
]);
|
||||
Route::get('/contact', [
|
||||
'as' => 'home.contact', 'uses' => 'HomeController@contact'
|
||||
'as' => 'home.contact', 'uses' => 'HomeController@contact',
|
||||
]);
|
||||
Route::get('/imprint', [
|
||||
'as' => 'home.imprint', 'uses' => 'HomeController@imprint'
|
||||
'as' => 'home.imprint', 'uses' => 'HomeController@imprint',
|
||||
]);
|
||||
Route::get('/about', [
|
||||
'as' => 'home.about', 'uses' => 'HomeController@about'
|
||||
'as' => 'home.about', 'uses' => 'HomeController@about',
|
||||
]);
|
||||
Route::get('/news', [
|
||||
'as' => 'home.news', 'uses' => 'HomeController@news'
|
||||
'as' => 'home.news', 'uses' => 'HomeController@news',
|
||||
]);
|
||||
Route::get('/dataset', [
|
||||
'as' => 'documents', 'uses' => 'PagesController@documents'
|
||||
'as' => 'documents', 'uses' => 'PagesController@documents',
|
||||
]);
|
||||
Route::get('/dataset/{id}', [
|
||||
'as' => 'document.show', 'uses' => 'PagesController@show'
|
||||
'as' => 'document.show', 'uses' => 'PagesController@show',
|
||||
]);
|
||||
//=================================================Crawlers====================================================
|
||||
Route::get('sitelinks', [
|
||||
'as' => 'sitelinks.index', 'uses' => 'SitelinkController@index'
|
||||
'as' => 'sitelinks.index', 'uses' => 'SitelinkController@index',
|
||||
]);
|
||||
Route::get('sitelinks/list/{year}', 'SitelinkController@list')->name('sitelinks.list');
|
||||
//=================================================solr search====================================================
|
||||
Route::get('/index', [
|
||||
'as' => 'search.index', 'uses' => 'SearchController@index'
|
||||
'as' => 'search.index', 'uses' => 'SearchController@index',
|
||||
]);
|
||||
Route::post('/queries', [
|
||||
'as' => 'queries', 'uses' => 'SearchController@search'
|
||||
'as' => 'queries', 'uses' => 'SearchController@search',
|
||||
]);
|
||||
Route::get('/queries/', [
|
||||
'as' => 'queries1', 'uses' => 'SearchController@search'
|
||||
'as' => 'queries1', 'uses' => 'SearchController@search',
|
||||
]);
|
||||
Route::get('/ping', 'SearchController@ping');
|
||||
//=================================================borrow====================================================
|
||||
Route::get('borrow', [
|
||||
'as' => 'borrow.borrow', 'uses' => 'BorrowController@index'
|
||||
'as' => 'borrow.borrow', 'uses' => 'BorrowController@index',
|
||||
]);
|
||||
Route::post('borrow.post', [
|
||||
'as' => 'borrow.post', 'uses' => 'BorrowController@store'
|
||||
'as' => 'borrow.post', 'uses' => 'BorrowController@store',
|
||||
]);
|
||||
Route::get('laporan', [
|
||||
'as' => 'borrow.report', 'uses' => 'BorrowController@report'
|
||||
'as' => 'borrow.report', 'uses' => 'BorrowController@report',
|
||||
]);
|
||||
Route::get('pengembalian/{id}', [
|
||||
'as' => 'borrow.pengembalian', 'uses' => 'BorrowController@pengembalian'
|
||||
'as' => 'borrow.pengembalian', 'uses' => 'BorrowController@pengembalian',
|
||||
]);
|
||||
Route::get('perpanjang/{id}', [
|
||||
'as' => 'borrow.perpanjang', 'uses' => 'BorrowController@perpanjang'
|
||||
'as' => 'borrow.perpanjang', 'uses' => 'BorrowController@perpanjang',
|
||||
]);
|
||||
Route::get('history', [
|
||||
'as' => 'borrow.history', 'uses' => 'BorrowController@histori'
|
||||
]);
|
||||
//=================================================setting collection=============================================
|
||||
Route::get('/settings/collection', [
|
||||
'as' => 'settings.collection', 'uses' => 'CollectionController@index'
|
||||
]);
|
||||
Route::get('settings/collection/edit/{id}', [
|
||||
'as' => 'settings.collection.edit', 'uses' => 'CollectionController@edit'
|
||||
]);
|
||||
Route::patch('settings/collection/edit/{id}', [
|
||||
'as' => 'settings.collection.update', 'uses' => 'CollectionController@update'
|
||||
]);
|
||||
Route::get('settings/collection/delete/{id}', [
|
||||
'as' => 'settings.collection.delete', 'uses' => 'CollectionController@delete'
|
||||
]);
|
||||
//==========================================================================================================================
|
||||
//=================================================setting project====================================================
|
||||
Route::get('/settings/project', [
|
||||
'as' => 'settings.project', 'uses' => 'Settings\CategoryController@index'
|
||||
]);
|
||||
Route::get('/settings/project/add', [
|
||||
'as' => 'settings.project.add', 'uses' => 'Settings\CategoryController@add'
|
||||
]);
|
||||
Route::post('settings/project/add', [
|
||||
'as' => 'settings.project.post', 'uses' => 'Settings\CategoryController@store'
|
||||
]);
|
||||
Route::get('settings/project/edit/{id}', [
|
||||
'as' => 'settings.project.edit', 'uses' => 'Settings\CategoryController@edit'
|
||||
]);
|
||||
Route::patch('settings/project/edit/{id}', [
|
||||
'as' => 'settings.project.update', 'uses' => 'Settings\CategoryController@update'
|
||||
]);
|
||||
Route::get('settings/project/delete/{id}', [
|
||||
'as' => 'settings.project.delete', 'uses' => 'Settings\CategoryController@delete'
|
||||
'as' => 'borrow.history', 'uses' => 'BorrowController@histori',
|
||||
]);
|
||||
|
||||
//==================================================================================================================
|
||||
//=================================================setting shelf====================================================
|
||||
Route::get('/settings/shelf', [
|
||||
'as' => 'settings.shelf', 'uses' => 'ShelfController@index'
|
||||
'as' => 'settings.shelf', 'uses' => 'ShelfController@index',
|
||||
]);
|
||||
Route::get('/settings/shelf/add', [
|
||||
'as' => 'settings.shelf.add', 'uses' => 'ShelfController@add'
|
||||
'as' => 'settings.shelf.add', 'uses' => 'ShelfController@add',
|
||||
]);
|
||||
Route::post('settings/shelf/add', [
|
||||
'as' => 'settings.shelf.post', 'uses' => 'ShelfController@store'
|
||||
'as' => 'settings.shelf.post', 'uses' => 'ShelfController@store',
|
||||
]);
|
||||
Route::get('settings/shelf/edit/{id}', [
|
||||
'as' => 'settings.shelf.edit', 'uses' => 'ShelfController@edit'
|
||||
'as' => 'settings.shelf.edit', 'uses' => 'ShelfController@edit',
|
||||
]);
|
||||
Route::patch('settings/shelf/edit/{id}', [
|
||||
'as' => 'settings.shelf.update', 'uses' => 'ShelfController@update'
|
||||
'as' => 'settings.shelf.update', 'uses' => 'ShelfController@update',
|
||||
]);
|
||||
Route::get('settings/shelf/delete/{id}', [
|
||||
'as' => 'settings.shelf.delete', 'uses' => 'ShelfController@delete'
|
||||
]);
|
||||
//=======================================================================================================
|
||||
//=================================================setting license=======================================
|
||||
Route::get('/settings/license', [
|
||||
'as' => 'settings.license', 'uses' => 'Settings\LicenseController@index'
|
||||
]);
|
||||
Route::get('settings/license/edit/{id}', [
|
||||
'as' => 'settings.license.edit', 'uses' => 'Settings\LicenseController@edit'
|
||||
]);
|
||||
Route::patch('settings/license/edit/{id}', [
|
||||
'as' => 'settings.license.update', 'uses' => 'Settings\LicenseController@update'
|
||||
'as' => 'settings.shelf.delete', 'uses' => 'ShelfController@delete',
|
||||
]);
|
||||
|
||||
//=========================================================================================================
|
||||
//=================================================setting periode=========================================
|
||||
Route::get('/settings/periode', [
|
||||
'as' => 'settings.periode', 'uses' => 'PeriodeController@index'
|
||||
'as' => 'settings.periode', 'uses' => 'PeriodeController@index',
|
||||
]);
|
||||
Route::get('settings/periode/edit/{id}', [
|
||||
'as' => 'settings.periode.edit', 'uses' => 'PeriodeController@edit'
|
||||
'as' => 'settings.periode.edit', 'uses' => 'PeriodeController@edit',
|
||||
]);
|
||||
Route::patch('settings/periode/edit/{id}', [
|
||||
'as' => 'settings.periode.update', 'uses' => 'PeriodeController@update'
|
||||
]);
|
||||
//===================================================================================================
|
||||
//=================================================setting person====================================
|
||||
Route::get('/settings/person', [
|
||||
'as' => 'settings.person', 'uses' => 'Settings\PersonController@index'
|
||||
]);
|
||||
Route::get('/settings/person/add', [
|
||||
'as' => 'settings.person.add', 'uses' => 'Settings\PersonController@add'
|
||||
]);
|
||||
Route::post('settings/person/add', [
|
||||
'as' => 'settings.person.post', 'uses' => 'Settings\PersonController@store'
|
||||
]);
|
||||
Route::get('settings/person/edit/{id}', [
|
||||
'as' => 'settings.person.edit', 'uses' => 'Settings\PersonController@edit'
|
||||
]);
|
||||
Route::patch('settings/person/edit/{id}', [
|
||||
'as' => 'settings.person.update', 'uses' => 'Settings\PersonController@update'
|
||||
]);
|
||||
Route::get('settings/person/delete/{id}', [
|
||||
'as' => 'settings.person.delete', 'uses' => 'Settings\PersonController@delete'
|
||||
]);
|
||||
Route::get('settings/person/down/{id}', [
|
||||
'as' => 'settings.person.down', 'uses' => 'Settings\PersonController@down'
|
||||
]);
|
||||
Route::get('settings/person/up/{id}', [
|
||||
'as' => 'settings.person.up', 'uses' => 'Settings\PersonController@up'
|
||||
'as' => 'settings.periode.update', 'uses' => 'PeriodeController@update',
|
||||
]);
|
||||
|
||||
//=============================================================================================================
|
||||
//=================================================setting book================================================
|
||||
Route::get('/settings/book', [
|
||||
'as' => 'settings.book', 'uses' => 'BookController@index'
|
||||
'as' => 'settings.book', 'uses' => 'BookController@index',
|
||||
]);
|
||||
Route::get('/settings/book/add', [
|
||||
'as' => 'settings.book.add', 'uses' => 'BookController@add'
|
||||
'as' => 'settings.book.add', 'uses' => 'BookController@add',
|
||||
]);
|
||||
Route::post('settings/book/add', [
|
||||
'as' => 'settings.book.post', 'uses' => 'BookController@store'
|
||||
'as' => 'settings.book.post', 'uses' => 'BookController@store',
|
||||
]);
|
||||
Route::get('settings/book/edit/{id}', [
|
||||
'as' => 'settings.book.edit', 'uses' => 'BookController@edit'
|
||||
'as' => 'settings.book.edit', 'uses' => 'BookController@edit',
|
||||
]);
|
||||
Route::patch('settings/book/edit/{id}', [
|
||||
'as' => 'settings.book.update', 'uses' => 'BookController@update'
|
||||
'as' => 'settings.book.update', 'uses' => 'BookController@update',
|
||||
]);
|
||||
Route::get('settings/book/delete/{id}', [
|
||||
'as' => 'settings.book.delete', 'uses' => 'BookController@delete'
|
||||
]);
|
||||
//=============================================================================================================
|
||||
//=================================================setting dataset=============================================
|
||||
Route::get('settings/document', [
|
||||
'as' => 'settings.document', 'uses' => 'Settings\DatasetController@index'
|
||||
]);
|
||||
Route::get('settings/document/{id}', [
|
||||
'as' => 'settings.document.show', 'uses' => 'Settings\DatasetController@show'
|
||||
]);
|
||||
Route::get('settings/document/edit/{id}', [
|
||||
'as' => 'settings.document.edit', 'uses' => 'Settings\DatasetController@edit'
|
||||
]);
|
||||
Route::patch('settings/document/update/{id}', [
|
||||
'as' => 'settings.document.update', 'uses' => 'Settings\DatasetController@update'
|
||||
'as' => 'settings.book.delete', 'uses' => 'BookController@delete',
|
||||
]);
|
||||
|
||||
//===============================================================================================================
|
||||
// Route::controllers([
|
||||
// 'auth' => 'Auth\AuthController',
|
||||
|
|
|
@ -12,10 +12,11 @@ let mix = require('laravel-mix');
|
|||
*/
|
||||
// mix.setPublicPath('../');
|
||||
|
||||
mix.js('resources/assets/js/lib.js', 'public/js')
|
||||
.sass('resources/assets/sass/app1.scss', 'public/css')
|
||||
.options({
|
||||
//publicPath: '../'
|
||||
processCssUrls: false
|
||||
});
|
||||
mix.copy('node_modules/bootstrap-sass/assets/fonts/bootstrap', 'public/fonts/bootstrap');
|
||||
// .sass('resources/assets/sass/app1.scss', 'public/css')
|
||||
|
||||
mix.js('resources/assets/js/app.js', 'public/js');
|
||||
// .options({
|
||||
// //publicPath: '../'
|
||||
// processCssUrls: false
|
||||
// });
|
||||
// mix.copy('node_modules/bootstrap-sass/assets/fonts/bootstrap', 'public/fonts/bootstrap');
|
||||
|
|
Loading…
Reference in New Issue
Block a user