add publish module

This commit is contained in:
Arno Kaimbacher 2018-08-29 17:18:15 +02:00
parent 100f6db9a6
commit ffbbc04206
93 changed files with 8150 additions and 10228 deletions

View File

@ -2,9 +2,9 @@
namespace App; namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Library\Xml\DatasetExtension; use App\Library\Xml\DatasetExtension;
use phpDocumentor\Reflection\Types\Null_; use Illuminate\Database\Eloquent\Model;
use App\Models\Title;
class Dataset extends Model class Dataset extends Model
{ {
@ -13,16 +13,17 @@ class Dataset extends Model
//public $timestamps = false; //default true //public $timestamps = false; //default true
// customize the names of the columns used to store the timestamps: // 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 UPDATED_AT = 'server_date_modified';
const PUBLISHED_AT = 'server_date_published'; const PUBLISHED_AT = 'server_date_published';
protected $fillable = [ protected $fillable = [
'type', 'type',
'publication_state', 'server_state',
'thesis_year_accepted', 'creating_corporation',
'project_id', 'project_id',
'embargo_date' 'embargo_date',
'belongs_to_bibliography'
]; ];
/** /**
* The attributes that should be mutated to dates. * The attributes that should be mutated to dates.
@ -32,17 +33,19 @@ class Dataset extends Model
protected $dates = [ protected $dates = [
'server_date_created', 'server_date_created',
'server_date_modified', 'server_date_modified',
'server_date_published' 'server_date_published',
]; ];
//protected $dateFormat = 'Y-m-d'; //protected $dateFormat = 'Y-m-d';
public function __construct(array $attributes = array()) public function __construct(array $attributes = array())
{ {
parent::__construct($attributes); parent::__construct($attributes);
// $this->_init(); // $this->_init();
} }
/**
* Get the project that the product belongs to.
*/
public function project() public function project()
{ {
return $this->belongsTo(\App\Project::class, 'project_id', 'id'); return $this->belongsTo(\App\Project::class, 'project_id', 'id');
@ -82,7 +85,7 @@ class Dataset extends Model
* *
* @return void * @return void
*/ */
public function addAuthor(\App\User $user) : void public function addAuthor(\App\User $user): void
{ {
$this->persons()->save($user, ['role' => 'author']); $this->persons()->save($user, ['role' => 'author']);
} }
@ -102,16 +105,22 @@ class Dataset extends Model
#endregion #endregion
#region title table: #region title table:
public function titlesAbstracts()
{
return $this->hasMany(Title::class, 'document_id', 'id');
}
public function titles() public function titles()
{ {
return $this->hasMany(\App\Title::class, 'document_id', 'id') return $this->hasMany(Title::class, 'document_id', 'id')
->where('type', 'main'); ->where('type', 'main');
} }
// public function addTitle(\App\Title $title) public function addMainTitle(Title $title)
// { {
// $this->persons()->save($title, ['type' => 'main']); $title->type = 'main';
// } $this->titlesAbstracts()->save($title);
// $this->titles()->save($title, ['type' => 'main']);
}
/** /**
* Relation abstracts * Relation abstracts
@ -120,15 +129,17 @@ class Dataset extends Model
*/ */
public function abstracts() public function abstracts()
{ {
return $this->hasMany(\App\Title::class, 'document_id', 'id') return $this->hasMany(Title::class, 'document_id', 'id')
->where('type', 'abstract'); ->where('type', 'abstract');
} }
// public function addAbstract (\App\Title $title) public function addMainAbstract(Title $title)
// { {
// $this->persons()->save($title, ['type' => 'abstract']); $title->type = 'abstract';
// } $this->titlesAbstracts()->save($title);
// $this->abstracts()->save($title, ['type' => 'abstract']);
}
#endregion #endregion title table
public function licenses() public function licenses()
{ {
@ -137,7 +148,7 @@ class Dataset extends Model
public function files() 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'); return $this->hasOne(\App\XmlCache::class, 'document_id', 'id');
} }
public function scopeOrderByType($query) public function scopeOrderByType($query)
{ {
return $query->orderBy('type'); return $query->orderBy('type');

View File

@ -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');
}
}

View File

@ -26,7 +26,7 @@ class LoginController extends Controller
* *
* @var string * @var string
*/ */
protected $redirectTo = '/'; protected $redirectTo = '/settings';
/** /**
* Create a new controller instance. * Create a new controller instance.
@ -46,6 +46,6 @@ class LoginController extends Controller
$request->session()->regenerate(); $request->session()->regenerate();
return redirect('/'); return redirect('/settings');
} }
} }

View File

@ -2,10 +2,19 @@
//https://www.5balloons.info/multi-page-step-form-in-laravel-with-validation/ //https://www.5balloons.info/multi-page-step-form-in-laravel-with-validation/
namespace App\Http\Controllers\Publish; namespace App\Http\Controllers\Publish;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Dataset; 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\DB;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
class IndexController extends Controller class IndexController extends Controller
{ {
@ -26,8 +35,17 @@ class IndexController extends Controller
*/ */
public function createStep1(Request $request) public function createStep1(Request $request)
{ {
$dataset = $request->session()->get('dataset'); #$dataset = $request->session()->get('dataset');
return view('publish.create-step1', compact('dataset', $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, [ $validatedData = $this->validate($request, [
'Type' => 'required|min:4', 'Type' => 'required|min:4',
'rights' => 'required|boolean|in:1' 'rights' => 'required|boolean|in:1',
]); ]);
// $validatedData = $request->validate([ // $validatedData = $request->validate([
// 'name' => 'required|unique:products', // 'name' => 'required|unique:products',
@ -100,7 +118,7 @@ class IndexController extends Controller
"TitleMain.Value" => 'required|min:5|max:255', "TitleMain.Value" => 'required|min:5|max:255',
"TitleMain.Language" => 'required|min:3', "TitleMain.Language" => 'required|min:3',
"TitleAbstract.Value" => 'required|min:5|max:255', "TitleAbstract.Value" => 'required|min:5|max:255',
"TitleAbstract.Language" => 'required|min:3' "TitleAbstract.Language" => 'required|min:3',
]); ]);
$optionalData = $request->all(); $optionalData = $request->all();
@ -124,7 +142,7 @@ class IndexController extends Controller
if (!isset($dataset['DatasetFile'])) { if (!isset($dataset['DatasetFile'])) {
$this->validate($request, [ $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 //update session variable
@ -165,11 +183,151 @@ class IndexController extends Controller
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response * @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) public function store(Request $request)
{ {
$dataset = $request->session()->get('dataset'); $data = $request->all();
// $product->save(); // $validatedData = $this->validate($request, [
// return redirect('/dataset'); // '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);
}
} }
/** /**

View File

@ -1,13 +1,12 @@
<?php <?php
namespace App\Http\Controllers\Settings; namespace App\Http\Controllers\Settings;
use App\Http\Requests;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Project;
use App\Http\Requests\ProjectRequest; use App\Http\Requests\ProjectRequest;
use Illuminate\View\View; use App\Project;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
class CategoryController extends Controller class CategoryController extends Controller
{ {
@ -17,7 +16,7 @@ class CategoryController extends Controller
$this->middleware('auth'); $this->middleware('auth');
} }
public function index() : View public function index(): View
{ {
$projects = Project::get(); $projects = Project::get();
return view('settings.project.category', compact('projects')); return view('settings.project.category', compact('projects'));
@ -28,12 +27,12 @@ class CategoryController extends Controller
* *
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function add() : View public function add(): View
{ {
return view('settings.project.add'); return view('settings.project.add');
} }
public function store(ProjectRequest $request) : RedirectResponse public function store(ProjectRequest $request): RedirectResponse
{ {
$input = $request->all(); $input = $request->all();
Project::create($input); Project::create($input);
@ -47,7 +46,7 @@ class CategoryController extends Controller
* @param int $id * @param int $id
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function edit($id) : View public function edit($id): View
{ {
$project = Project::findOrFail($id); $project = Project::findOrFail($id);
return view('settings.project.edit', compact('project')); return view('settings.project.edit', compact('project'));
@ -60,7 +59,7 @@ class CategoryController extends Controller
* @param int $id * @param int $id
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function update($id, ProjectRequest $request) : RedirectResponse public function update($id, ProjectRequest $request): RedirectResponse
{ {
$project = Project::findOrFail($id); $project = Project::findOrFail($id);
$input = $request->all(); $input = $request->all();
@ -75,7 +74,7 @@ class CategoryController extends Controller
* @param int $id * @param int $id
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function delete($id) : RedirectResponse public function delete($id): RedirectResponse
{ {
$project = Project::with('documents')->findOrFail($id); $project = Project::with('documents')->findOrFail($id);
if ($project->documents->count() > 0) { if ($project->documents->count() > 0) {

View File

@ -1,5 +1,5 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Settings;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Requests; use App\Http\Requests;
@ -25,7 +25,7 @@ class CollectionController extends Controller
//$collections = Collection::get(); //$collections = Collection::get();
$collections = Collection::with('documents') $collections = Collection::with('documents')
->paginate(8); //get(); ->paginate(8); //get();
return view('rdr.settings.collection.collection', compact('collections')); return view('settings.collection.collection', compact('collections'));
} }
/** /**

View File

@ -5,7 +5,7 @@ use App\Http\Controllers\Controller;
use App\Dataset; use App\Dataset;
use App\Project; use App\Project;
use App\License; use App\License;
use App\Title; use App\Models\Title;
use App\Http\Requests\DocumentRequest; use App\Http\Requests\DocumentRequest;
use Illuminate\View\View; use Illuminate\View\View;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
@ -27,7 +27,14 @@ class DatasetController extends Controller
//$registers = array(); //$registers = array();
$filter = $request->input('search'); $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(); $data = $request->all();
@ -131,7 +138,10 @@ class DatasetController extends Controller
// for($jahr = 1990; $jahr <= $nowYear; $jahr++){ // for($jahr = 1990; $jahr <= $nowYear; $jahr++){
// $years[$jahr] = $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 //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 public function update(DocumentRequest $request, $id) : RedirectResponse
{ {
$document = Dataset::findOrFail($id); $dataset = Dataset::findOrFail($id);
//$input = $request->all(); //$input = $request->all();
$input = $request->except('licenses', 'titles'); $input = $request->except('licenses', 'titles');
$document->update($input); $dataset->update($input);
// $document->type = $input['type']; // $dataset->type = $input['type'];
// $document->thesis_year_accepted = $input['thesis_year_accepted']; // $dataset->thesis_year_accepted = $input['thesis_year_accepted'];
// $document->project_id = $input['project_id']; // $dataset->project_id = $input['project_id'];
// $document->save(); // $dataset->save();
$licenses = $request->input('licenses'); $licenses = $request->input('licenses');
//$licenses = $input['licenses']; //$licenses = $input['licenses'];
$document->licenses()->sync($licenses); $dataset->licenses()->sync($licenses);
//save the titles: //save the titles:
$titles = $request->input('titles'); $titles = $request->input('titles');

View 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');
}
}

View File

@ -35,8 +35,20 @@ class LicenseController extends Controller
return view('settings.license.edit', compact('license', 'languages')); 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); $license = License::findOrFail($id);
$input = $request->all(); $input = $request->all();
$license->update($input); $license->update($input);

View File

@ -73,7 +73,7 @@ class PersonController extends Controller
* @param int $id * @param int $id
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function update($id, PersonRequest $request) public function update(PersonRequest $request, $id)
{ {
$person = Person::findOrFail($id); $person = Person::findOrFail($id);
$input = $request->all(); $input = $request->all();

View File

@ -1,8 +1,8 @@
<?php <?php
namespace App\Http\Controllers\Settings; namespace App\Http\Controllers\Settings;
use App\Role; use App\Models\Role;
use App\Permission; use App\Models\Permission;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
@ -38,7 +38,28 @@ class RoleController extends Controller
*/ */
public function store(Request $request) 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'); $permissions = Permission::all('id', 'name');
//$userRoles = $user->roles->pluck('name','name')->all(); //$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')); return view('settings.role.edit', compact('role', 'permissions', 'checkeds'));
} }
@ -78,7 +99,9 @@ class RoleController extends Controller
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
$this->validate(request(), [ $this->validate(request(), [
'name' => 'required' 'name' => 'required',
'display_name' => 'max:255',
'description' => 'max:255'
]); ]);
$role = Role::findOrFail($id); $role = Role::findOrFail($id);
$role->update($request->except('permissions')); $role->update($request->except('permissions'));
@ -86,9 +109,9 @@ class RoleController extends Controller
$permissions = $request->input('permissions') ? $request->input('permissions') : []; $permissions = $request->input('permissions') ? $request->input('permissions') : [];
//$role->syncPermissions($permissions); //$role->syncPermissions($permissions);
if (isset($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 { } 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') return redirect()->route('role.index')

View File

@ -1,15 +1,18 @@
<?php <?php
namespace App\Http\Controllers\Settings; namespace App\Http\Controllers\Settings;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Role;
use App\User; use App\User;
//use Spatie\Permission\Models\Role; use Illuminate\Http\Request;
use App\Role;
use Illuminate\Support\Facades\Gate;
class UserController extends Controller class UserController extends Controller
{ {
// public function __construct()
// {
// $this->middleware('permission:settings');
// }
/** /**
* Display a listing of the resource. * Display a listing of the resource.
* *
@ -22,7 +25,9 @@ class UserController extends Controller
// return abort(401, 'Unauthorized action.'); // 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')) return view('settings.user.user', compact('users'))
->with('i', ($request->input('page', 1) - 1) * 5); ->with('i', ($request->input('page', 1) - 1) * 5);
} }
@ -56,7 +61,7 @@ class UserController extends Controller
$this->validate($request, [ $this->validate($request, [
'login' => 'required', 'login' => 'required',
'email' => 'required|email|unique:accounts', 'email' => 'required|email|unique:accounts',
'password' => 'required|min:6|confirmed' 'password' => 'required|min:6|confirmed',
//'roles' => 'required' //'roles' => 'required'
]); ]);
@ -65,13 +70,12 @@ class UserController extends Controller
$input['password'] = bcrypt($input['password']); $input['password'] = bcrypt($input['password']);
$user = User::create($input); $user = User::create($input);
$roles = $request['roles']; //Retrieving roles
$roles = $request['roles']; //Retrieving the roles field
//Checking if a role was selected //Checking if a role was selected
if (isset($roles)) { if (isset($roles)) {
foreach ($roles as $role) { foreach ($roles as $role) {
$role_r = Role::where('id', '=', $role)->firstOrFail(); $role_r = Role::where('id', '=', $role)->firstOrFail();
$user->assignRole($role_r); //Assigning role to user $user->attachRole($role_r); //Assigning role to user
} }
} }
@ -122,7 +126,7 @@ class UserController extends Controller
$this->validate(request(), [ $this->validate(request(), [
'login' => 'required', 'login' => 'required',
'email' => 'required|email|unique:accounts,email,' . $id, 'email' => 'required|email|unique:accounts,email,' . $id,
'password' => 'required|min:6|confirmed' 'password' => 'required|min:6|confirmed',
]); ]);
$user = User::findOrFail($id); $user = User::findOrFail($id);
@ -139,7 +143,7 @@ class UserController extends Controller
$roles = $request['roles']; //Retreive all roles $roles = $request['roles']; //Retreive all roles
if (isset($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 { } else {
$user->roles()->detach(); //If no role is selected remove exisiting role associated to a user $user->roles()->detach(); //If no role is selected remove exisiting role associated to a user
} }

View File

@ -56,8 +56,12 @@ class Kernel extends HttpKernel
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::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,
]; ];
} }

View File

@ -25,6 +25,7 @@ class DocumentRequest extends Request
{ {
return [ return [
'type' => 'required|min:5', 'type' => 'required|min:5',
'server_state' => 'required',
// 'author' => 'required|min:4', // 'author' => 'required|min:4',
// 'stock' => 'required|integer', // 'stock' => 'required|integer',
// 'year' => 'required|integer|min:4' // 'year' => 'required|integer|min:4'

View File

@ -47,7 +47,7 @@ trait DatasetExtension
'fetch' => 'eager' 'fetch' => 'eager'
), ),
'File' => array( 'File' => array(
'model' => 'App\File', 'model' => 'App\Models\File',
'relation' => 'files', 'relation' => 'files',
'fetch' => 'eager' 'fetch' => 'eager'
), ),

69
app/Models/File.php Normal file
View 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
View 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
View File

@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Zizaco\Entrust\EntrustPermission;
class Permission extends EntrustPermission
{
//
}

15
app/Models/Role.php Normal file
View 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'];
}

View File

@ -1,5 +1,5 @@
<?php <?php
namespace App; namespace App\Models;
//use App\Library\Xml\DatasetExtension; //use App\Library\Xml\DatasetExtension;

View File

@ -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();
}
}

View File

@ -1,4 +1,5 @@
<?php namespace App; <?php
namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;

View File

@ -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
View 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);
}
}

View 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);
}
}

View File

@ -2,21 +2,20 @@
namespace App; namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Authenticatable; use Illuminate\Notifications\Notifiable;
use Illuminate\Auth\Passwords\CanResetPassword; use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Foundation\Auth\Access\Authorizable; use Zizaco\Entrust\Traits\EntrustUserTrait;
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\Support\Facades\Hash; 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. * 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() //public function roles()
//{ //{
// return $this->belongsToMany(\App\Role::class, 'link_accounts_roles', 'account_id', 'role_id'); // return $this->belongsToMany(\App\Role::class, 'link_accounts_roles', 'account_id', 'role_id');

View File

@ -27,18 +27,18 @@ $app = new Illuminate\Foundation\Application(
*/ */
$app->singleton( $app->singleton(
'Illuminate\Contracts\Http\Kernel', Illuminate\Contracts\Http\Kernel::class,
'App\Http\Kernel' App\Http\Kernel::class
); );
$app->singleton( $app->singleton(
'Illuminate\Contracts\Console\Kernel', Illuminate\Contracts\Console\Kernel::class,
'App\Console\Kernel' App\Console\Kernel::class
); );
$app->singleton( $app->singleton(
'Illuminate\Contracts\Debug\ExceptionHandler', Illuminate\Contracts\Debug\ExceptionHandler::class,
'App\Exceptions\Handler' App\Exceptions\Handler::class
); );
/* /*

View File

@ -14,7 +14,7 @@
"laravel/tinker": "~1.0", "laravel/tinker": "~1.0",
"laravelcollective/html": "^5.5.0", "laravelcollective/html": "^5.5.0",
"solarium/solarium": "^3.8", "solarium/solarium": "^3.8",
"spatie/laravel-permission": "^2.12" "zizaco/entrust": "^1.9"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~6.0", "phpunit/phpunit": "~6.0",

475
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@ return [
| |
*/ */
'debug' => env('APP_DEBUG', false), 'debug' => env('APP_DEBUG', true),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -178,7 +178,7 @@ return [
// List off others providers... // List off others providers...
App\Providers\SolariumServiceProvider::class, App\Providers\SolariumServiceProvider::class,
Spatie\Permission\PermissionServiceProvider::class, Zizaco\Entrust\EntrustServiceProvider::class,
], ],

132
config/entrust.php Normal file
View 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',
];

View File

@ -6,7 +6,7 @@ return [
"accepted" => "accepted", "accepted" => "accepted",
'submitted' => 'submitted', 'submitted' => 'submitted',
'published' => 'published', 'published' => 'published',
'updated' => 'updated' 'updated' => 'updated',
], ],
'server_states' => [ 'server_states' => [
"audited" => "audited", "audited" => "audited",
@ -15,6 +15,10 @@ return [
'inprogress' => 'inprogress', 'inprogress' => 'inprogress',
'unpublished' => 'unpublished', 'unpublished' => 'unpublished',
'deleted' => 'deleted', 'deleted' => 'deleted',
'temporary' => 'temporary' 'temporary' => 'temporary',
] ],
'filetypes_allowed' => [
"pdf", "txt", "html", "htm", "png", "jpeg",
],
'max_filesize' => '2048',
]; ];

View File

@ -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,
];

View File

@ -58,7 +58,7 @@ return [
| |
*/ */
'files' => storage_path().'/framework/sessions', 'files' => storage_path() . '/framework/sessions',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@ return [
'paths' => [ 'paths' => [
// realpath(base_path('resources/views')) // realpath(base_path('resources/views'))
resource_path('views') resource_path('views'),
], ],
/* /*
@ -29,6 +29,6 @@ return [
| |
*/ */
'compiled' => realpath(storage_path().'/framework/views'), 'compiled' => realpath(storage_path() . '/framework/views'),
]; ];

10283
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,20 @@
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"test": "echo \"Error\"",
"dev": "npm run development", "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", "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", "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": { "devDependencies": {
"cross-env": "^5.1", "axios": "^0.18",
"axios": "^0.17",
"bootstrap-sass": "^3.3.7", "bootstrap-sass": "^3.3.7",
"cross-env": "^5.1",
"jquery": "^3.2", "jquery": "^3.2",
"laravel-mix": "^1.0", "laravel-mix": "^2.1.14",
"lodash": "^4.17.4", "lodash": "^4.17.10",
"vue": "^2.5.7" "vue": "^2.5.7"
} },
"dependencies": {}
} }

View 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
View 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
View 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

File diff suppressed because one or more lines are too long

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

File diff suppressed because it is too large Load Diff

230
public/js/app.js Normal file
View 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",
// }
// });

View File

@ -1,4 +1,3 @@
{ {
"/js/lib.js": "/js/lib.js", "/js/app.js": "/js/app.js"
"/css/app1.css": "/css/app1.css"
} }

218
resources/assets/js/app.js Normal file
View 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",
// }
// });

View File

@ -18,7 +18,7 @@ return [
'measurementdata' => 'Measurement Data', 'measurementdata' => 'Measurement Data',
'models' => 'Models', 'models' => 'Models',
'rawdata' => 'Raw Data', 'rawdata' => 'Raw Data',
'supplementarydata' => 'Supplementary Data' 'supplementarydata' => 'Supplementary Data',
//'diplom' => 'Diploma Thesis', //'diplom' => 'Diploma Thesis',
//'doctoralthesis' => 'Doctoral Thesis', //'doctoralthesis' => 'Doctoral Thesis',
//'coursematerial' => 'Course Material', //'coursematerial' => 'Course Material',

View File

@ -44,4 +44,3 @@ return [
'default_auth_index' => 'Login', 'default_auth_index' => 'Login',
'auth_pagetitle' => 'User Login', 'auth_pagetitle' => 'User Login',
]; ];
?>

View File

@ -1,17 +1,15 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="pure-g"> <div class="pure-g box-content">
<div class="pure-u-1 pure-u-md-2-3"> <div class="pure-u-1 pure-u-md-2-3">
<div class="content">
<h1>Login</h1> <h1>Login</h1>
<div class="panel-body">
<div class="panel-body">
@if (count($errors) > 0) @if (count($errors) > 0)
<div class="alert alert-danger"> <div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br> <strong>Whoops!</strong> There were some problems with your input.<br><br>
@ -22,7 +20,6 @@
</ul> </ul>
</div> </div>
@endif @endif
<form class="pure-form pure-form-stacked" role="form" method="POST" action="{{ url('/login') }}"> <form class="pure-form pure-form-stacked" role="form" method="POST" action="{{ url('/login') }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}"> <input type="hidden" name="_token" value="{{ csrf_token() }}">
@ -45,10 +42,9 @@
<a class="btn btn-link" href="{{ url('/password/email') }}">Forgot Your Password?</a> <a class="btn btn-link" href="{{ url('/password/email') }}">Forgot Your Password?</a>
</div> </div>
</form> </form>
</div>
</div> </div>
</div>
</div>
</div> </div>

View File

@ -1,9 +1,9 @@
{{-- \resources\views\errors\401.blade.php --}} {{-- \resources\views\errors\403.blade.php --}}
@extends('layouts.app') @extends('layouts.app')
@section('content') @section('content')
<div class='col-lg-4 col-lg-offset-4'> <div class='col-lg-4 col-lg-offset-4'>
<h1><center>401<br> <h1><center>403<br>
ACCESS DENIED</center></h1> ACCESS DENIED</center></h1>
<h2>{{ $exception->getMessage() }}</h2> <h2>{{ $exception->getMessage() }}</h2>
</div> </div>

View File

@ -13,8 +13,8 @@
<link rel="shortcut icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"> <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" type="text/css" href="{{ asset('css/bootstrap.min.css') }}"> --}}
<link rel='stylesheet' href="{{ asset('css/pure.css') }}" /> <link rel='stylesheet' href="{{ asset('css/pure-min.css') }}" />
<link rel='stylesheet' href="{{ asset('css/grids-responsive.css') }}" /> <link rel='stylesheet' href="{{ asset('css/grids-responsive-min.css') }}" />
<!--<link href="{{ asset('css/app1.css') }}" rel="stylesheet" />--> <!--<link href="{{ asset('css/app1.css') }}" rel="stylesheet" />-->
<!--<link rel='stylesheet' href="{{ asset('css/page.css') }}" />--> <!--<link rel='stylesheet' href="{{ asset('css/page.css') }}" />-->
<link rel='stylesheet' href="{{ asset('css/styles.css') }}" /> <link rel='stylesheet' href="{{ asset('css/styles.css') }}" />

View File

@ -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">
&nbsp;
</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>

View 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>

View File

@ -4,4 +4,5 @@
{{ session('flash_message') }} {{ session('flash_message') }}
</div> </div>
@endif @endif

View File

@ -65,7 +65,7 @@
</a> </a>
<ul class="pure-menu-children" role="menu"> <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('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="{{ URL::route('home.news') }}">NEWS</a></li>
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('documents') }}">DATASETS</a></li> <li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('documents') }}">DATASETS</a></li>
</ul> </ul>

View File

@ -1,50 +1,245 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('title', 'Publish') @section('title', 'Publish')
@section('content') @section('content')
<div class="header">
<div class="title"> <h3 class="header-title">
<h2><i class="fa fa-upload"></i> Publish New Dataset - Step 1</h2> <i class="fa fa-upload"></i> Publish New Dataset
</h3>
</div> </div>
{{-- <h3 class="document-type">Dokumenttyp und Datei wählen</h3> --}} <div id="app" class="box-content">
{{-- <form action="/dataset/store-step1" method="post" class="pure-form" enctype="multipart/form-data"> --}} <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() }} {{ csrf_field() }}
<fieldset class="left-labels">
<div v-if="step === 1">
<h1>Step One</h1>
<fieldset class="left-labels">
<legend>Datensatztyp</legend> <legend>Datensatztyp</legend>
<div class="description hint"> <div class="description hint">
<p>Bitte wählen Sie einen Datensatztyp aus der Liste aus.</p></div><p></p><div class="form-item"> <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> <label for="documentType">Datensatztyp<span class="required" title="Dieses Feld muss ausgefüllt werden."> *</span></label>
<div class="select" style="width:300px" title="Bitte wählen Sie einen Datensatztyp aus der Liste aus."> <div class="select" style="width:300px" title="Bitte wählen Sie einen Datensatztyp aus der Liste aus.">
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --']) !!} {!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --', 'v-model' => 'dataset.type']) !!}
</div> </div>
</div> </div>
</fieldset> </fieldset>
<fieldset class="left-labels"> <fieldset class="left-labels">
<legend>Einräumung eines einfachen Nutzungsrechts</legend> <legend>Einräumung eines einfachen Nutzungsrechts</legend>
<div class="class="pure-u-1 pure-u-md-1-2 pure-div""> <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. <small for="rights" class="pure-form-message-inline">Ich habe diese rechtlichen Hinweise gelesen und bin damit einverstanden.
<span class="required" title="Dieses Feld muss ausgefüllt werden.">*</span> <span class="required" title="Dieses Feld muss ausgefüllt werden.">*</span>
</small> </small>
<input name="rights" value="0" type="hidden"> {{-- <input name="rights" value="0" type="hidden"> --}}
<input class="form-checkbox" name="rights" id="rights" value="1" type="checkbox"> <input class="form-checkbox" name="rights" id="rights" type="checkbox" v-model="dataset.rights" true-value="1" false-value="0">
</div> </div>
</fieldset> </fieldset>
<br /> <br />
<div class="pure-controls"> <div class="pure-controls">
<button type="submit" class="pure-button button-small"> {{-- <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> <i class="fa fa-arrow-right"></i>
<span>Weiter zum nächsten Schritt</span> <span>Weiter zum nächsten Schritt</span>
</button> </button>
</div> </div>
{!! Form::close() !!} </div>
@include('errors._errors') <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>
<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>
<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>
</form>
{{-- <br/><br/>Debug:@{{ dataset }} --}}
</div>
@stop @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

View 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

View File

@ -1,14 +1,15 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('title', 'Publish') @section('title', 'Publish')
@section('content') @section('content')
<div class="header">
<div class="title"> <h3 class="header-title">
<h2><i class="fa fa-upload"></i> Publish New Dataset - Step 2</h2> <i class="fa fa-upload"></i> Publish New Dataset - Step 2
</h3>
</div> </div>
<h3 class="document-type">Attribute eingeben</h3> <div class="box-content">
{{-- <div method="post" enctype="multipart/from-data" class="pure-form"> --}} {{-- <div method="post" enctype="multipart/from-data" class="pure-form"> --}}
{!! Form::model($dataset, ['method' => 'post', 'files' => true , 'route' => ['dataset.store2'], 'class' => 'pure-form']) !!} {!! Form::model($dataset, ['method' => 'post', 'files' => true , 'route' => ['dataset.store2'], 'class' => 'pure-form']) !!}
@ -21,6 +22,7 @@
<div class="select pure-u-23-24"> <div class="select pure-u-23-24">
{!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --']) !!} {!! Form::select('Type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --']) !!}
</div> </div>
</div>
<div class="pure-u-1 pure-u-md-1-2 pure-div"> <div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('CreatingCorporation', 'Creating Corporation') !!} {!! Form::label('CreatingCorporation', 'Creating Corporation') !!}
@ -33,12 +35,14 @@
<small id="projectHelp" class="pure-form-message-inline">EmbargoDate is optional</small> <small id="projectHelp" class="pure-form-message-inline">EmbargoDate is optional</small>
</div> </div>
<div class="pure-u-1 pure-u-md-1 checkboxlist">
<!-- checkboxes --> <!-- checkboxes -->
<label for="BelongsToBibliography" class="pure-checkbox"> <label for="BelongsToBibliography" class="pure-checkbox">
<input type="hidden" name="BelongsToBibliography" value="0"> <input type="hidden" name="BelongsToBibliography" value="0">
<input name="BelongsToBibliography" value="1" type="checkbox" class="form-check-input"> <input name="BelongsToBibliography" value="1" type="checkbox" class="form-check-input">
Belongs To Bibliography? Belongs To Bibliography?
</label> </label>
</div>
</div> </div>
</fieldset> </fieldset>
@ -61,7 +65,7 @@
<div class="pure-u-1 pure-u-md-1-2 pure-div"> <div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('TitleAbstract', 'Main Abstract ') !!} {!! Form::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>
<div class="pure-u-1 pure-u-md-1-2 pure-div"> <div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('language', 'Abstract Language..') !!} {!! Form::label('language', 'Abstract Language..') !!}
@ -83,8 +87,6 @@
</div> </div>
</fieldset> </fieldset>
<br /> <br />
<div class="pure-controls"> <div class="pure-controls">
<button type="submit" class="pure-button button-small"> <button type="submit" class="pure-button button-small">
@ -102,5 +104,6 @@
<button type="submit" class="btn btn-danger">Remove Image</button> <button type="submit" class="btn btn-danger">Remove Image</button>
</form> </form>
@endif @endif
<div class="box-content">
@stop @stop

View File

@ -1,12 +1,17 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('title', 'Publish') @section('title', 'Publish')
@section('content') @section('content')
<h1>Add New Dataset - Step 3</h1> <div class="header">
<hr> <h3 class="header-title">
<h3>Review Dataset Details</h3> <i class="fa fa-upload"></i> add New Dataset - Step 32
<form action={{ route('dataset.store') }}} method="post" class="pure-form" > </h3>
</div>
<div class="box-content">
<form action={{ route('dataset.store') }} method="post" class="pure-form" >
{{ csrf_field() }} {{ csrf_field() }}
<table class="table"> <table class="table">
<tr> <tr>
@ -55,12 +60,12 @@
<a type="button" href={{ route('dataset.create2') }} class="pure-button button-small is-warning">Back to Step 2</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"> <button type="submit" class="pure-button button-small">
<i class="fa fa-save"></i> <i class="fa fa-save"></i>
<span>Create Product</span> <span>Create Dataset</span>
</button> </button>
</div> </div>
</form>
</div>
</form>
@include('errors._errors') @include('errors._errors')

View File

@ -16,7 +16,7 @@
<div class="pure-control-group"> <div class="pure-control-group">
<label for="data-en-key-home_index_imprint_title" class="optional">Titel auf der Seite</label> <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> </div>
</fieldset> </fieldset>

View File

@ -1,15 +1,19 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @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"> <a href="{{ route('settings.project.add') }}" class="pure-button button-small is-primary">
<i class="fa fa-plus-circle"></i>ADD NEW COLLECTION <i class="fa fa-plus-circle"></i>ADD NEW COLLECTION
</a> </a>
<br><br> <br><br>
<table class="pure-table pure-table-horizontal"> <table class="pure-table pure-table-horizontal">
@ -50,11 +54,11 @@
</tbody> </tbody>
</table> </table>
</div>
<div class="pure-u-1"> <div class="pure-u-1 pure-u-md-3-3">
{{ $collections->links('vendor.pagination.default') }} {{ $collections->links('vendor.pagination.default') }}
</div> </div>
</div> </div>
@stop @stop

View File

@ -118,6 +118,3 @@
<span>{!! $submitButtonText !!}</span> <span>{!! $submitButtonText !!}</span>
</button> </button>
</div> </div>
@include('errors._errors')

View File

@ -1,16 +1,16 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="header">
<h3 class="header-title">
<i class="fa fa fa-database"></i> Datasets
</h3>
</div>
<div class="title"> <div class="pure-g box-content">
<h2><i class="fa fa-archive"></i> Datasets</h2>
</div>
<div class="pure-g">
<div class="sidebar-simplesearch pure-u-1"> <div class="sidebar-simplesearch pure-u-1">
{!! Form::open(array('route' => 'settings.document','method' => 'GET', 'class'=>'pure-form')) !!} {!! Form::open(array('route' => 'settings.document','method' => 'GET', 'class'=>'pure-form')) !!}
<p> <p>
@ -27,7 +27,6 @@
</div> </div>
</p> </p>
<input type="hidden" name="searchtype" id="searchtype" value="simple" /> <input type="hidden" name="searchtype" id="searchtype" value="simple" />
</div> </div>
<div class="pure-u-1"> <div class="pure-u-1">
@ -91,6 +90,6 @@
{!! Form::close() !!} {!! Form::close() !!}
</div> </div>
@stop @stop

View File

@ -1,29 +1,26 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @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="pure-u-1 pure-u-md-3-3">
<div class="content">
<h1 class="title">Edit Your Dataset</h1>
<div> <div>
<a href="{{ route('settings.document') }}" class="pure-button button-small"> <a href="{{ route('settings.document') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
<span>BACK</span> <span>BACK</span>
</a> </a>
</div> </div>
<div> <div>
{!! Form::model($document, ['method' => 'PATCH', 'route' => ['settings.document.update', $document->id], 'class' => 'pure-form', 'enctype' => 'multipart/form-data' ]) !!} {!! 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.']) @include('settings/document/_form', ['submitButtonText' => 'Edit Dataset', 'bookLabel' => 'Edit Dataset.'])
@include('errors._errors')
{!! Form::close() !!} {!! Form::close() !!}
</div>
</div> </div>
</div> </div>

View File

@ -1,11 +1,16 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="header">
<h3 class="header-title">
<i class="fa fa-archive"></i> Detail
</h3>
</div>
<div> <div class="pure-g box-content">
<div id="titlemain-wrapper"> <div id="titlemain-wrapper" class="pure-u-1 pure-u-md-1-2">
<div class="frontdoor_pagination"> <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 <i class="fa fa-arrow-left"></i> BACK
</a> </a>
</div> </div>
@ -14,7 +19,7 @@
@endforeach @endforeach
</div> </div>
<div id="result-data"> <div id="result-data" class="pure-u-1 pure-u-md-1-2">
<div id="abstract"> <div id="abstract">
<ul> <ul>
@foreach ($document->abstracts as $abstract) @foreach ($document->abstracts as $abstract)
@ -25,7 +30,5 @@
</div> </div>
</div> </div>
@stop @stop

View 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

View File

@ -1,10 +1,10 @@
<fieldset> <fieldset>
<legend>General</legend>
<div class="pure-g"> <div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2 pure-div"> <div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('name', 'Lizenzname') !!} {!! Form::label('name_long', 'Lizenzname') !!}
{!! Form::text('name_long', null, ['class' => 'pure-u-23-24']) !!} {!! Form::text('name_long', null, ['class' => 'pure-u-23-24', 'placeholder' => '--no language--']) !!}
</div> </div>
<div class="pure-u-1 pure-u-md-1-2 pure-div"> <div class="pure-u-1 pure-u-md-1-2 pure-div">
@ -64,14 +64,10 @@
<input name="pod_allowed" value="1" {{ ($license->pod_allowed == 1) ? 'checked="checked" ' : '' }} type="checkbox" class="form-check-input"> <input name="pod_allowed" value="1" {{ ($license->pod_allowed == 1) ? 'checked="checked" ' : '' }} type="checkbox" class="form-check-input">
Print on Demand Print on Demand
</label> </label>
<br />
<div class="pure-controls">
{!! Form::submit($submitButtonText, ['class' => 'pure-button button-small']) !!}
</div>
</fieldset> </fieldset>
<br />
<div class="pure-controls">
{!! Form::submit($submitButtonText, ['class' => 'pure-button button-small']) !!}
</div>
@include('errors._errors') @include('errors._errors')

View File

@ -1,28 +1,27 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @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="pure-u-1 pure-u-md-1">
<div class="content">
<h1 class="title">Edit Your License</h1>
<div> <div>
<a href="{{ route('settings.license') }}" class="pure-button button-small"> <a href="{{ route('settings.license') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
<span>BACK</span> <span>BACK</span>
</a> </a>
</div> </div>
<div> <div>
{!! Form::model($license, ['method' => 'PATCH', 'route' => ['settings.license.update', $license->id], 'class' => 'pure-form']) !!} {!! 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..']) @include('settings/license/_form', ['submitButtonText' => 'Edit License', 'daysLabel' => 'Days..', 'finesLabel' => 'Licenses..'])
{!! Form::close() !!} {!! Form::close() !!}
</div> </div>
</div>
</div>
</div>
</div> </div>
@stop @stop

View File

@ -1,14 +1,15 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="header">
<h3 class="header-title">
<i class="fa fa-file"></i> Licenses
</h3>
</div>
<div class="title"> <div class="pure-g box-content">
<h2><i class="fa fa-file"></i> LICENSES</h2>
</div>
<div class="col-md-8">
<div class="pure-u-1">
<table class="pure-table pure-table-horizontal"> <table class="pure-table pure-table-horizontal">
<thead> <thead>
@ -19,7 +20,6 @@
<tbody> <tbody>
@foreach($licenses as $license) @foreach($licenses as $license)
<tr> <tr>
<td>{{ $license->name_long }}</td> <td>{{ $license->name_long }}</td>
@ -29,15 +29,12 @@
</a> </a>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
@stop @stop

View File

@ -39,9 +39,8 @@
</label> </label>
</div> </div>
<!-- <div class="pure-controls">-->
{!! Form::submit($submitButtonText, ['class' => 'pure-button button-small']) !!} {!! Form::submit($submitButtonText, ['class' => 'pure-button button-small']) !!}
<!-- </div>-->
</fieldset> </fieldset>
@include('errors._errors') @include('errors._errors')

View File

@ -1,9 +1,14 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="header">
<h3 class="header-title">
Add Your Person
</h3>
</div>
<h1 class="title">Add Your Person</h1> <div class="box-content">
<div> <div>
<a href="{{ route('settings.person') }}" class="pure-button button-small"> <a href="{{ route('settings.person') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
@ -11,17 +16,11 @@
</a> </a>
</div> </div>
<div class="col-md-4"> <div>
{!! Form::open(['route' => 'settings.person.post', 'class' => 'pure-form pure-form-aligned']) !!}
{!! Form::open(['route' => 'settings.person.post', 'class' => 'pure-form pure-form-stacked']) !!}
@include('settings/person/_form', ['submitButtonText' => 'Add Person', 'projectLabel' => 'Save Person.']) @include('settings/person/_form', ['submitButtonText' => 'Add Person', 'projectLabel' => 'Save Person.'])
{!! Form::close() !!} {!! Form::close() !!}
</div> </div>
</div>
@stop @stop

View File

@ -1,12 +1,15 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @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="pure-u-1 pure-u-md-2-3">
<div class="content">
<h1 class="title">Edit {{ $person->getFullName() }}</h1>
<div> <div>
<a href="{{ route('settings.person') }}" class="pure-button button-small"> <a href="{{ route('settings.person') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
@ -14,14 +17,11 @@
</a> </a>
</div> </div>
<div> <div>
{!! Form::model($person, ['method' => 'PATCH', 'route' => ['settings.person.update', $person->id],'class' => 'pure-form pure-form-aligned']) !!} {!! Form::model($person, ['method' => 'PATCH', 'route' => ['settings.person.update', $person->id],'class' => 'pure-form pure-form-aligned']) !!}
@include('settings/person/_form', ['submitButtonText' => 'Save Person']) @include('settings/person/_form', ['submitButtonText' => 'Save Person'])
{!! Form::close() !!} {!! Form::close() !!}
</div>
</div> </div>
</div> </div>

View File

@ -1,15 +1,15 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @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="pure-u-1 pure-u-md-2-3">
<div class="content">
<div class="title">
<h2><i class="fa fa-pencil"></i> Persons Management</h2>
</div>
<a class="pure-button button-small is-primary" href="{{ route('settings.person.add') }}"> <a class="pure-button button-small is-primary" href="{{ route('settings.person.add') }}">
<i class="fa fa-plus-circle"></i> <i class="fa fa-plus-circle"></i>
<span>ADD NEW Person</span> <span>ADD NEW Person</span>
@ -17,7 +17,6 @@
<br><br> <br><br>
<table class="pure-table pure-table-horizontal"> <table class="pure-table pure-table-horizontal">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@ -31,9 +30,7 @@
</thead> </thead>
<tbody> <tbody>
@foreach($persons as $person) @foreach($persons as $person)
<tr> <tr>
<td>{{ $person->last_name }}</td> <td>{{ $person->last_name }}</td>
@ -60,16 +57,12 @@
<a class="delete" href="{{ route('settings.person.delete', $person->id) }}"><span>&nbsp;</span></a> <a class="delete" href="{{ route('settings.person.delete', $person->id) }}"><span>&nbsp;</span></a>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div> </div>
@stop @stop

View File

@ -9,10 +9,7 @@
{{ Form::text('label', null, ['class' => 'form-control']) }} {{ Form::text('label', null, ['class' => 'form-control']) }}
<em>*</em> <em>*</em>
</div> </div>
<!-- <div class="pure-controls">-->
{{ Form::submit($submitButtonText, ['class' => 'pure-button button-small']) }} {{ Form::submit($submitButtonText, ['class' => 'pure-button button-small']) }}
<!--</div>-->
</fieldset> </fieldset>
@include('errors._errors') @include('errors._errors')

View File

@ -1,27 +1,21 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="header">
<h3 class="header-title">
Add Your Project
</h3>
</div>
<div class="box-content">
<h1 class="title">Add Your Project</h1>
<div>
<a href="{{ route('settings.project') }}" class="pure-button button-small"> <a href="{{ route('settings.project') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
<span>BACK</span> <span>BACK</span>
</a> </a>
</div> <div>
{!! Form::open(['route' => 'settings.project.post', 'class' => 'pure-form pure-form-aligned']) !!}
<div class="col-md-4">
{!! Form::open(['route' => 'settings.project.post', 'class' => 'pure-form pure-form-stacked']) !!}
@include('settings/project/_form', ['submitButtonText' => 'Save Project', 'projectLabel' => 'Save Project.']) @include('settings/project/_form', ['submitButtonText' => 'Save Project', 'projectLabel' => 'Save Project.'])
{!! Form::close() !!} {!! Form::close() !!}
</div> </div>
</div>
@stop @stop

View File

@ -1,29 +1,28 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="pure-g"> <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"> <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"> <a href="{{ route('settings.project.add') }}" class="pure-button button-small is-primary">
<i class="fa fa-plus-circle"></i> <i class="fa fa-plus-circle"></i>
<span>ADD NEW Project</span> <span>ADD NEW Project</span>
</a> </a>
<br><br> <br><br>
<table class="pure-table pure-table-horizontal"> <table class="pure-table pure-table-horizontal">
<thead> <thead>
<tr> <tr>
<th>Project</th> <th>Project</th>
<th>Options</th> <th>Options</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach($projects as $project) @foreach($projects as $project)
<tr> <tr>
@ -35,10 +34,8 @@
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</div>
</div>
@stop @stop

View File

@ -1,13 +1,14 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @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="pure-u-1 pure-u-md-2-3">
<div class="content">
<h1 class="title">Edit Your Project</h1>
<div> <div>
<a href="{{ route('settings.project') }}" class="pure-button button-small"> <a href="{{ route('settings.project') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
@ -15,15 +16,9 @@
</a> </a>
</div> </div>
<div> <div>
{!! Form::model($project, ['method' => 'PATCH', 'route' => ['settings.project.update', $project->id], 'class' => 'pure-form pure-form-aligned']) !!} {!! 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.']) @include('settings/project/_form', ['submitButtonText' => 'Save Project', 'projectLabel' => 'Edit Project.'])
{!! Form::close() !!} {!! Form::close() !!}
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,10 +1,12 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="header">
<h3 class="header-title">
<h2 class="title">Create New Role</h2> Create New Role
</h3>
</div>
<div class="box-content">
<div> <div>
<a href="{{ route('role.index') }}" class="pure-button button-small"> <a href="{{ route('role.index') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
@ -12,46 +14,41 @@
</a> </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 @if ($errors->has('name')) field-validation-error @endif">
<div class="pure-control-group">
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!} {!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!} {!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
<em>*</em> <em>*</em>
@if($errors->has('name')) {{-- @if($errors->has('name'))
<p class="field-validation-error"> <p class="field-validation-error">
{{ $errors->first('name') }} {{ $errors->first('name') }}
</p> </p>
@endif @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> </div>
<h5><b>Assign Permissions</b></h5> <h5><b>Assign Permissions</b></h5>
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif"> <div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
<!-- <label for="Roles">Assign Roles</label>-->
@foreach ($permissions as $permission) @foreach ($permissions as $permission)
<label for={{"permission". $permission->id }} class="pure-checkbox"> <label for={{"permission". $permission->id }} class="pure-checkbox">
<input name="permissions[]" value={{ $permission->id }} type="checkbox" class="form-check-input"> <input name="permissions[]" value={{ $permission->id }} type="checkbox" class="form-check-input">
{{ $permission->name }} {{ $permission->name }}
</label> </label>
@endforeach @endforeach
</div> </div>
<button type="submit" class="pure-button button-small">Submit</button>
<div class="col-xs-12 col-sm-12 col-md-12 text-center"> {!! Form::close() !!}
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div> </div>
{!! Form::close() !!}
@endsection @endsection

View File

@ -1,12 +1,15 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="header">
<h3 class="header-title">
<span>Edit role {{ $role->name }}</span>
</h3>
</div>
<div class="pure-g box-content">
<div class="pure-g">
<div class="pure-u-1 pure-u-md-2-3"> <div class="pure-u-1 pure-u-md-2-3">
<div class="content">
<h1 class="title">Edit {{ $role->login }}</h1>
<div> <div>
<a href="{{ route('role.index') }}" class="pure-button button-small"> <a href="{{ route('role.index') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
@ -26,46 +29,42 @@
@endif @endif
<div> <div>
{!! Form::model($role, ['method' => 'PATCH','route' => ['role.update', $role->id], 'class' => 'pure-form pure-form-aligned']) !!} {!! Form::model($role, ['method' => 'PATCH','route' => ['role.update', $role->id], 'class' => 'pure-form pure-form-aligned']) !!}
<fieldset> <fieldset>
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif"> <div class="pure-control-group @if ($errors->has('name')) field-validation-error @endif">
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!} {!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!} {!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
<em>*</em> <em>*</em>
</div> </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> <h5><b>Assign Permissions</b></h5>
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif"> <div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
<!-- <label for="Roles">Assign Permissions</label>-->
@foreach ($permissions as $permission) @foreach ($permissions as $permission)
<label for={{"permission". $permission->id }} class="pure-checkbox"> <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"> <input name="permissions[]" value={{ $permission->id }} {{ (in_array($permission->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input">
{{ $permission->name }} {{ $permission->name }}
</label> </label>
@endforeach @endforeach
</div> </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() !!} {!! Form::close() !!}
</div>
</div> </div>
</div> </div>
<div class="pure-u-1 pure-u-md-1-3"> <div class="pure-u-1 pure-u-md-1-3">
<div class="sidebar"> <div class="sidebar">
@foreach ($role->permissions as $permission) @foreach ($role->perms as $permission)
<p>permission: {{ $permission->name }}</p> <p>permission: {{ $permission->name }}</p>
@endforeach @endforeach
</div> </div>

View File

@ -1,23 +1,21 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="pure-g"> <div class="header">
<div class="pure-u-1 pure-u-md-2-3"> <h3 class="header-title">
<i class="fa fa-key"></i>
<div class="content"> <span>Roles Management <span>
<div class="title"> </h3>
<h2><i class="fa fa-key"></i> Roles Management </div>
</h2>
</div>
<div class="pure-g box-content">
<div class="pure-u-1 pure-u-md-2-3">
<a class="pure-button button-small is-primary" href="{{ route('role.create') }}"> <a class="pure-button button-small is-primary" href="{{ route('role.create') }}">
<i class="fa fa-plus-circle"></i> <i class="fa fa-plus-circle"></i>
<span>Create New Role</span> <span>Create New Role</span>
</a> </a>
<br>
<table class="pure-table pure-table-horizontal roles">
<div class="table-responsive">
<table class="pure-table roles">
<thead> <thead>
<tr> <tr>
<th>Role</th> <th>Role</th>
@ -31,7 +29,7 @@
<tr> <tr>
<td>{{ $role->name }}</td> <td>{{ $role->name }}</td>
<td> <td>
@foreach ($role->permissions()->pluck('name') as $permission) @foreach ($role->perms()->pluck('name') as $permission)
<label class="badge badge-success">{{ $permission }}</label> <label class="badge badge-success">{{ $permission }}</label>
@endforeach @endforeach
</td> </td>
@ -43,9 +41,8 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</div>
</div> </div>
@stop @stop

View File

@ -1,20 +1,13 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @section('content')
<div class="header">
<h3 class="header-title">
<h2 class="title">Create New User</h2> Create New User
<div> </h3>
<a href="{{ route('user.index') }}" class="pure-button button-small"> </div>
<i class="fa fa-chevron-left"></i>
<span>BACK</span>
</a>
</div>
@if (count($errors) > 0) @if (count($errors) > 0)
<div class="alert alert-danger"> <div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br> <strong>Whoops!</strong> There were some problems with your input.<br><br>
<ul> <ul>
@ -25,12 +18,14 @@
</div> </div>
@endif @endif
<div class="box-content">
{!! Form::open(['route' => 'user.store', 'method'=>'POST', 'class' => 'pure-form pure-form-aligned']) !!} <div>
<a href="{{ route('user.index') }}" class="pure-button button-small">
<div class="row"> <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('login')) field-validation-error @endif"> <div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
<label>Login:</label> <label>Login:</label>
@ -42,7 +37,7 @@
<label>Email:</label> <label>Email:</label>
{!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!} {!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
<em>*</em> <em>*</em>
</div> </div>
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif"> <div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
<label>Password:</label> <label>Password:</label>
@ -58,36 +53,15 @@
<h5><b>Assign Roles</b></h5> <h5><b>Assign Roles</b></h5>
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif"> <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"> <label for={{"role". $role->id }} class="pure-checkbox">
<input name="roles[]" value={{ $role->id }} type="checkbox" class="form-check-input"> <input name="roles[]" value={{ $role->id }} type="checkbox" class="form-check-input">
{{ $role->name }} {{ $role->name }}
</label> </label>
@endforeach @endforeach
</div> </div>
<!-- <button type="submit" class="pure-button button-small">Submit</button>
<div class="col-xs-12 col-sm-12 col-md-12"> {!! Form::close() !!}
<div class="form-group">
<strong>Role:</strong>
{!! Form::select('roles[]', $roles,[], array('class' => 'form-control','multiple')) !!}
</div>
</div>-->
<div class="col-xs-12 col-sm-12 col-md-12 text-center">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div> </div>
{!! Form::close() !!}
@endsection @endsection

View File

@ -1,12 +1,15 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @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="pure-u-1 pure-u-md-2-3">
<div class="content">
<h1 class="title">Edit {{ $user->login }}</h1>
<div> <div>
<a href="{{ route('user.index') }}" class="pure-button button-small"> <a href="{{ route('user.index') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
@ -26,7 +29,6 @@
@endif @endif
<div> <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> <fieldset>
@ -69,14 +71,12 @@
@endforeach @endforeach
</div> </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() !!} {!! Form::close() !!}
</div>
</div> </div>
</div> </div>

View File

@ -1,15 +1,16 @@
@extends('layouts.app') @extends('layouts.settings.layout')
@section('content') @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="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') }}"> <a class="pure-button button-small is-primary" href="{{ route('user.create') }}">
<i class="fa fa-plus-circle"></i> <i class="fa fa-plus-circle"></i>
<span>Create New User</span> <span>Create New User</span>
@ -17,13 +18,12 @@
<br><br> <br><br>
@if ($message = Session::get('success')) @if ($message = Session::get('success'))
<div class="alert alert-success"> <div class="alert summary-success">
<p>{{ $message }}</p> <p>{{ $message }}</p>
</div> </div>
@endif @endif
<table class="pure-table users"> <table class="pure-table users">
<thead> <thead>
<tr> <tr>
<th>No</th> <th>No</th>
@ -33,7 +33,6 @@
<th width="280px">Action</th> <th width="280px">Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach ($users as $key => $user) @foreach ($users as $key => $user)
<tr> <tr>
@ -41,10 +40,9 @@
<td>{{ $user->login }}</td> <td>{{ $user->login }}</td>
<td>{{ $user->email }}</td> <td>{{ $user->email }}</td>
<td> <td>
@if(!empty($user->roles))
@if(!empty($user->getRoleNames())) @foreach($user->roles as $role)
@foreach($user->getRoleNames() as $roleName) <label class="badge badge-success">{{ $role->name }}</label>
<label class="badge badge-success">{{ $roleName }}</label>
@endforeach @endforeach
@endif @endif
</td> </td>
@ -56,12 +54,10 @@
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
{!! $users->render() !!} {!! $users->render() !!}
</div>
</div>
</div>
</div> </div>
@stop @stop

View File

@ -1,5 +1,4 @@
<?php <?php
use App\Document;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
/* /*
@ -11,253 +10,264 @@ use Illuminate\Support\Facades\Route;
| routes are loaded by the RouteServiceProvider within a group which | routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great! | contains the "web" middleware group. Now create something great!
| |
*/ */
//Auth::routes(); //Auth::routes();
//Route::get('/home', 'HomeController@index')->name('home'); //Route::get('/home', 'HomeController@index')->name('home');
Route::get('/oai', ['as' => 'oai', 'uses' => 'Oai\RequestController@index']); Route::get('/oai', ['as' => 'oai', 'uses' => 'Oai\RequestController@index']);
Route::get('/dataset/create-step1', ['as' => 'dataset.create1', 'uses' => 'Publish\IndexController@createStep1']); Route::group(['middleware' => ['permission:review'], 'prefix' => 'publish'], function () {
Route::post('/dataset/store-step1', ['as' => 'dataset.store1', 'uses' => 'Publish\IndexController@storeStep1']); 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::get('/dataset/create-step2', ['as' => 'dataset.create2', 'uses' => 'Publish\IndexController@createStep2']);
Route::post('/dataset/store-step2', ['as' => 'dataset.store2', 'uses' => 'Publish\IndexController@storeStep2']); 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::get('/dataset/create-step3', ['as' => 'dataset.create3', 'uses' => 'Publish\IndexController@createStep3']);
Route::post('/dataset/store', ['as' => 'dataset.store', 'uses' => 'Publish\IndexController@store']); Route::post('/dataset/store', ['as' => 'dataset.store', 'uses' => 'Publish\IndexController@store']);
});
//=================================================setting users==================================================== //=================================================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::resource('users','UserController');
Route::get('settings/user', [ Route::get('settings/user', [
'as' => 'user.index', 'uses' => 'Settings\UserController@index' 'as' => 'user.index', 'uses' => 'Settings\UserController@index',
]); ]);
Route::get('settings/user/create', [ Route::get('settings/user/create', [
'as' => 'user.create', 'uses' => 'Settings\UserController@create' 'as' => 'user.create', 'uses' => 'Settings\UserController@create',
]); ]);
Route::post('settings/user/store', [ 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}', [ 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}', [ 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}', [ 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', [ Route::get('settings/role', [
'as' => 'role.index', 'uses' => 'Settings\RoleController@index' 'as' => 'role.index', 'uses' => 'Settings\RoleController@index',
]); ]);
Route::get('settings/role/create', [ 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}', [ 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}', [ 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==================================================== //=================================================home====================================================
Route::get('/', [ Route::get('/', [
'as' => 'home.index', 'uses' => 'HomeController@index' 'as' => 'home.index', 'uses' => 'HomeController@index',
]); ]);
Route::get('/contact', [ Route::get('/contact', [
'as' => 'home.contact', 'uses' => 'HomeController@contact' 'as' => 'home.contact', 'uses' => 'HomeController@contact',
]); ]);
Route::get('/imprint', [ Route::get('/imprint', [
'as' => 'home.imprint', 'uses' => 'HomeController@imprint' 'as' => 'home.imprint', 'uses' => 'HomeController@imprint',
]); ]);
Route::get('/about', [ Route::get('/about', [
'as' => 'home.about', 'uses' => 'HomeController@about' 'as' => 'home.about', 'uses' => 'HomeController@about',
]); ]);
Route::get('/news', [ Route::get('/news', [
'as' => 'home.news', 'uses' => 'HomeController@news' 'as' => 'home.news', 'uses' => 'HomeController@news',
]); ]);
Route::get('/dataset', [ Route::get('/dataset', [
'as' => 'documents', 'uses' => 'PagesController@documents' 'as' => 'documents', 'uses' => 'PagesController@documents',
]); ]);
Route::get('/dataset/{id}', [ Route::get('/dataset/{id}', [
'as' => 'document.show', 'uses' => 'PagesController@show' 'as' => 'document.show', 'uses' => 'PagesController@show',
]); ]);
//=================================================Crawlers==================================================== //=================================================Crawlers====================================================
Route::get('sitelinks', [ 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'); Route::get('sitelinks/list/{year}', 'SitelinkController@list')->name('sitelinks.list');
//=================================================solr search==================================================== //=================================================solr search====================================================
Route::get('/index', [ Route::get('/index', [
'as' => 'search.index', 'uses' => 'SearchController@index' 'as' => 'search.index', 'uses' => 'SearchController@index',
]); ]);
Route::post('/queries', [ Route::post('/queries', [
'as' => 'queries', 'uses' => 'SearchController@search' 'as' => 'queries', 'uses' => 'SearchController@search',
]); ]);
Route::get('/queries/', [ Route::get('/queries/', [
'as' => 'queries1', 'uses' => 'SearchController@search' 'as' => 'queries1', 'uses' => 'SearchController@search',
]); ]);
Route::get('/ping', 'SearchController@ping'); Route::get('/ping', 'SearchController@ping');
//=================================================borrow==================================================== //=================================================borrow====================================================
Route::get('borrow', [ Route::get('borrow', [
'as' => 'borrow.borrow', 'uses' => 'BorrowController@index' 'as' => 'borrow.borrow', 'uses' => 'BorrowController@index',
]); ]);
Route::post('borrow.post', [ Route::post('borrow.post', [
'as' => 'borrow.post', 'uses' => 'BorrowController@store' 'as' => 'borrow.post', 'uses' => 'BorrowController@store',
]); ]);
Route::get('laporan', [ Route::get('laporan', [
'as' => 'borrow.report', 'uses' => 'BorrowController@report' 'as' => 'borrow.report', 'uses' => 'BorrowController@report',
]); ]);
Route::get('pengembalian/{id}', [ Route::get('pengembalian/{id}', [
'as' => 'borrow.pengembalian', 'uses' => 'BorrowController@pengembalian' 'as' => 'borrow.pengembalian', 'uses' => 'BorrowController@pengembalian',
]); ]);
Route::get('perpanjang/{id}', [ Route::get('perpanjang/{id}', [
'as' => 'borrow.perpanjang', 'uses' => 'BorrowController@perpanjang' 'as' => 'borrow.perpanjang', 'uses' => 'BorrowController@perpanjang',
]); ]);
Route::get('history', [ Route::get('history', [
'as' => 'borrow.history', 'uses' => 'BorrowController@histori' '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'
]); ]);
//================================================================================================================== //==================================================================================================================
//=================================================setting shelf==================================================== //=================================================setting shelf====================================================
Route::get('/settings/shelf', [ Route::get('/settings/shelf', [
'as' => 'settings.shelf', 'uses' => 'ShelfController@index' 'as' => 'settings.shelf', 'uses' => 'ShelfController@index',
]); ]);
Route::get('/settings/shelf/add', [ Route::get('/settings/shelf/add', [
'as' => 'settings.shelf.add', 'uses' => 'ShelfController@add' 'as' => 'settings.shelf.add', 'uses' => 'ShelfController@add',
]); ]);
Route::post('settings/shelf/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}', [ 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}', [ 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}', [ Route::get('settings/shelf/delete/{id}', [
'as' => 'settings.shelf.delete', 'uses' => 'ShelfController@delete' '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'
]); ]);
//========================================================================================================= //=========================================================================================================
//=================================================setting periode========================================= //=================================================setting periode=========================================
Route::get('/settings/periode', [ Route::get('/settings/periode', [
'as' => 'settings.periode', 'uses' => 'PeriodeController@index' 'as' => 'settings.periode', 'uses' => 'PeriodeController@index',
]); ]);
Route::get('settings/periode/edit/{id}', [ 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}', [ Route::patch('settings/periode/edit/{id}', [
'as' => 'settings.periode.update', 'uses' => 'PeriodeController@update' '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'
]); ]);
//============================================================================================================= //=============================================================================================================
//=================================================setting book================================================ //=================================================setting book================================================
Route::get('/settings/book', [ Route::get('/settings/book', [
'as' => 'settings.book', 'uses' => 'BookController@index' 'as' => 'settings.book', 'uses' => 'BookController@index',
]); ]);
Route::get('/settings/book/add', [ Route::get('/settings/book/add', [
'as' => 'settings.book.add', 'uses' => 'BookController@add' 'as' => 'settings.book.add', 'uses' => 'BookController@add',
]); ]);
Route::post('settings/book/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}', [ 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}', [ 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}', [ Route::get('settings/book/delete/{id}', [
'as' => 'settings.book.delete', 'uses' => 'BookController@delete' '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'
]); ]);
//=============================================================================================================== //===============================================================================================================
// Route::controllers([ // Route::controllers([
// 'auth' => 'Auth\AuthController', // 'auth' => 'Auth\AuthController',

View File

@ -12,10 +12,11 @@ let mix = require('laravel-mix');
*/ */
// mix.setPublicPath('../'); // mix.setPublicPath('../');
mix.js('resources/assets/js/lib.js', 'public/js') // .sass('resources/assets/sass/app1.scss', 'public/css')
.sass('resources/assets/sass/app1.scss', 'public/css')
.options({ mix.js('resources/assets/js/app.js', 'public/js');
//publicPath: '../' // .options({
processCssUrls: false // //publicPath: '../'
}); // processCssUrls: false
mix.copy('node_modules/bootstrap-sass/assets/fonts/bootstrap', 'public/fonts/bootstrap'); // });
// mix.copy('node_modules/bootstrap-sass/assets/fonts/bootstrap', 'public/fonts/bootstrap');