From: Vincent Vanwaelscappel Date: Tue, 26 Feb 2019 16:13:44 +0000 (+0100) Subject: wip #2562 @4 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b5dbfedd4b569a8b2075b95f449574d01c6392bf;p=pmi.git wip #2562 @4 --- diff --git a/.env.production b/.env.production index f0f42e1..7e23397 100644 --- a/.env.production +++ b/.env.production @@ -14,7 +14,7 @@ DB_USERNAME=pmi DB_PASSWORD=ZJMcD6nAc3xnLjLVKZ2iWi69 BROADCAST_DRIVER=log -CACHE_DRIVER=redis +CACHE_DRIVER=file QUEUE_CONNECTION=sync SESSION_DRIVER=redis SESSION_LIFETIME=120 diff --git a/composer.json b/composer.json index 76e1431..6b5a4e1 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ ], "license": "proprietary", "require": { + "backpack/langfilemanager": "^1.0", "cubist/cms-front": "dev-master", "cubist/gtag": "dev-master", "cubist/laravel-backpack-bundle": "dev-master" diff --git a/composer.lock b/composer.lock index 3345eac..772499d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7e2c66d6444a70f5099e77ad765596e3", + "content-hash": "dbf70e7986c2379ed74858012f9a5fc0", "packages": [ { "name": "almasaeed2010/adminlte", @@ -253,6 +253,82 @@ ], "time": "2019-01-24T10:09:55+00:00" }, + { + "name": "backpack/langfilemanager", + "version": "1.0.25", + "source": { + "type": "git", + "url": "https://github.com/Laravel-Backpack/LangFileManager.git", + "reference": "9923207c184ac4c2ba9c4b49290eb1e87c9e981e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Laravel-Backpack/LangFileManager/zipball/9923207c184ac4c2ba9c4b49290eb1e87c9e981e", + "reference": "9923207c184ac4c2ba9c4b49290eb1e87c9e981e", + "shasum": "" + }, + "require": { + "backpack/crud": "^3.0.6", + "illuminate/support": "~5.1", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "scrutinizer/ocular": "~1.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Backpack\\LangFileManager\\LangFileManagerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Backpack\\LangFileManager\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alin Ghitu", + "email": "alin@updivision.com", + "role": "Lead Developer" + }, + { + "name": "Cristian Tabacitu", + "email": "hello@tabacitu.ro", + "homepage": "http://www.tabacitu.ro", + "role": "Contributor" + } + ], + "description": "An interface to edit language files, for Laravel Backpack.", + "homepage": "https://github.com/laravel-backpack/langfilemanager", + "keywords": [ + "admin panel", + "backpack", + "dick", + "dick admin", + "dick translationmanager", + "dickadmin", + "lang file manager", + "lang files", + "language", + "laravel", + "laravel backpack", + "tabacitu", + "translationmanager", + "updivision" + ], + "time": "2018-03-05T12:30:19+00:00" + }, { "name": "backpack/logmanager", "version": "2.3.24", diff --git a/config/auth.php b/config/auth.php index 7817501..8d5b185 100644 --- a/config/auth.php +++ b/config/auth.php @@ -14,7 +14,7 @@ return [ */ 'defaults' => [ - 'guard' => 'web', + 'guard' => 'admin', 'passwords' => 'users', ], diff --git a/config/backpack/base.php b/config/backpack/base.php index c8b8f4d..f508e7c 100644 --- a/config/backpack/base.php +++ b/config/backpack/base.php @@ -95,7 +95,7 @@ return [ 'middleware_class' => [ App\Http\Middleware\CheckIfAdmin::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, - // \Backpack\Base\app\Http\Middleware\UseBackpackAuthGuardInsteadOfDefaultAuthGuard::class, + Backpack\Base\app\Http\Middleware\UseBackpackAuthGuardInsteadOfDefaultAuthGuard::class, ], // Alias for that middleware diff --git a/config/backpack/langfilemanager.php b/config/backpack/langfilemanager.php new file mode 100644 index 0000000..005661b --- /dev/null +++ b/config/backpack/langfilemanager.php @@ -0,0 +1,10 @@ + ['pagination', 'reminders', 'validation', 'log', 'crud'], + +]; diff --git a/config/permission.php b/config/permission.php new file mode 100644 index 0000000..c675dce --- /dev/null +++ b/config/permission.php @@ -0,0 +1,127 @@ + [ + + /* + * When using the "HasPermissions" 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, + + ], + + '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', + + /* + * When using the "HasPermissions" 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 "HasPermissions" 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', + + /* + * 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', + ], + + 'column_names' => [ + + /* + * Change this if you want to name the related model primary key other than + * `model_id`. + * + * For example, this would be nice if your primary keys are all UUIDs. In + * that case, name this `model_uuid`. + */ + 'model_morph_key' => 'model_id', + ], + + /* + * 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, + + 'cache' => [ + + /* + * By default all permissions will be cached for 24 hours unless a permission or + * role is updated. Then the cache will be flushed immediately. + */ + + 'expiration_time' => 60 * 24, + + /* + * The key to use when tagging and prefixing entries in the cache. + */ + + 'key' => 'spatie.permission.cache', + + /* + * When checking for a permission against a model by passing a Permission + * instance to the check, this key determines what attribute on the + * Permissions model is used to cache against. + * + * Ideally, this should match your preferred way of checking permissions, eg: + * `$user->can('view-posts')` would be 'name'. + */ + + 'model_key' => 'name', + + /* + * You may optionally indicate a specific cache driver to use for permission and + * role caching using any of the `store` drivers listed in the cache.php config + * file. Using 'default' here means to use the `default` set in cache.php. + */ + 'store' => 'default', + ], +]; diff --git a/resources/views/vendor/backpack/base/auth/account/change_password.blade.php b/resources/views/vendor/backpack/base/auth/account/change_password.blade.php new file mode 100644 index 0000000..526aaf4 --- /dev/null +++ b/resources/views/vendor/backpack/base/auth/account/change_password.blade.php @@ -0,0 +1,111 @@ +@extends('backpack::layout') + +@section('after_styles') + +@endsection + +@section('header') +
+ +

+ {{ trans('backpack::base.my_account') }} +

+ + + +
+@endsection + +@section('content') +
+
+ @include('backpack::auth.account.sidemenu') +
+
+ +
+ + {!! csrf_field() !!} + +
+ +
+ + @if (session('success')) +
+ {{ session('success') }} +
+ @endif + + @if ($errors->count()) +
+
    + @foreach ($errors->all() as $e) +
  • {{ $e }}
  • + @endforeach +
+
+ @endif + +
+ @php + $label = trans('backpack::base.old_password'); + $field = 'old_password'; + @endphp + + +
+ +
+ @php + $label = trans('backpack::base.new_password'); + $field = 'new_password'; + @endphp + + +
+ +
+ @php + $label = trans('backpack::base.confirm_password'); + $field = 'confirm_password'; + @endphp + + +
+ +
+ + + {{ trans('backpack::base.cancel') }} + +
+ +
+ +
+ +
+ +
+
+@endsection diff --git a/resources/views/vendor/backpack/base/auth/account/sidemenu.blade.php b/resources/views/vendor/backpack/base/auth/account/sidemenu.blade.php new file mode 100644 index 0000000..200ae73 --- /dev/null +++ b/resources/views/vendor/backpack/base/auth/account/sidemenu.blade.php @@ -0,0 +1,22 @@ +
+
+ +

{{ backpack_auth()->user()->name }}

+
+ + +
diff --git a/resources/views/vendor/backpack/base/auth/account/update_info.blade.php b/resources/views/vendor/backpack/base/auth/account/update_info.blade.php new file mode 100644 index 0000000..14f9ea2 --- /dev/null +++ b/resources/views/vendor/backpack/base/auth/account/update_info.blade.php @@ -0,0 +1,99 @@ +@extends('backpack::layout') + +@section('after_styles') + +@endsection + +@section('header') +
+ +

+ {{ trans('backpack::base.my_account') }} +

+ + + +
+@endsection + +@section('content') +
+
+ @include('backpack::auth.account.sidemenu') +
+
+ +
+ + {!! csrf_field() !!} + +
+ +
+ + @if (session('success')) +
+ {{ session('success') }} +
+ @endif + + @if ($errors->count()) +
+
    + @foreach ($errors->all() as $e) +
  • {{ $e }}
  • + @endforeach +
+
+ @endif + +
+ @php + $label = trans('backpack::base.name'); + $field = 'name'; + @endphp + + +
+ +
+ @php + $label = config('backpack.base.authentication_column_name'); + $field = backpack_authentication_column(); + @endphp + + +
+ +
+ + {{ trans('backpack::base.cancel') }} +
+ +
+
+ +
+ +
+
+@endsection diff --git a/resources/views/vendor/backpack/base/auth/emails/password.blade.php b/resources/views/vendor/backpack/base/auth/emails/password.blade.php new file mode 100644 index 0000000..c167c7f --- /dev/null +++ b/resources/views/vendor/backpack/base/auth/emails/password.blade.php @@ -0,0 +1 @@ +{{ trans('backpack::base.click_here_to_reset') }}: {{ $link }} diff --git a/resources/views/vendor/backpack/base/auth/login.blade.php b/resources/views/vendor/backpack/base/auth/login.blade.php new file mode 100644 index 0000000..4caebb4 --- /dev/null +++ b/resources/views/vendor/backpack/base/auth/login.blade.php @@ -0,0 +1,68 @@ +@extends('backpack::layout_guest') + +@section('content') +
+
+

{{ trans('backpack::base.login') }}

+
+
+
+ {!! csrf_field() !!} + +
+ + +
+ + + @if ($errors->has($username)) + + {{ $errors->first($username) }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ @if (backpack_users_have_email()) + + @endif + @if (config('backpack.base.registration_open')) + + @endif +
+
+@endsection diff --git a/resources/views/vendor/backpack/base/auth/passwords/email.blade.php b/resources/views/vendor/backpack/base/auth/passwords/email.blade.php new file mode 100644 index 0000000..47270cc --- /dev/null +++ b/resources/views/vendor/backpack/base/auth/passwords/email.blade.php @@ -0,0 +1,64 @@ +@extends('backpack::layout_guest') + + +@section('content') +
+
+

{{ trans('backpack::base.reset_password') }}

+ + + +
+ {{ trans('backpack::base.login') }} + + @if (config('backpack.base.registration_open')) + / {{ trans('backpack::base.register') }} + @endif +
+
+
+@endsection diff --git a/resources/views/vendor/backpack/base/auth/passwords/reset.blade.php b/resources/views/vendor/backpack/base/auth/passwords/reset.blade.php new file mode 100644 index 0000000..96cba5e --- /dev/null +++ b/resources/views/vendor/backpack/base/auth/passwords/reset.blade.php @@ -0,0 +1,83 @@ +@extends('backpack::layout_guest') + +@section('content') +
+
+

{{ trans('backpack::base.reset_password') }}

+ + +
+
+@endsection diff --git a/resources/views/vendor/backpack/base/auth/register.blade.php b/resources/views/vendor/backpack/base/auth/register.blade.php new file mode 100644 index 0000000..534d69e --- /dev/null +++ b/resources/views/vendor/backpack/base/auth/register.blade.php @@ -0,0 +1,84 @@ +@extends('backpack::layout_guest') + +@section('content') +
+
+

{{ trans('backpack::base.register') }}

+
+
+
+ {!! csrf_field() !!} + +
+ + +
+ + + @if ($errors->has('name')) + + {{ $errors->first('name') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has(backpack_authentication_column())) + + {{ $errors->first(backpack_authentication_column()) }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password_confirmation')) + + {{ $errors->first('password_confirmation') }} + + @endif +
+
+ +
+
+ +
+
+
+
+
+ @if (backpack_users_have_email()) + + @endif + +
+
+@endsection diff --git a/resources/views/vendor/backpack/base/dashboard.blade.php b/resources/views/vendor/backpack/base/dashboard.blade.php new file mode 100644 index 0000000..5f175ce --- /dev/null +++ b/resources/views/vendor/backpack/base/dashboard.blade.php @@ -0,0 +1,32 @@ +@extends('backpack::layout') + +@section('header') +
+

+ {{ trans('backpack::base.dashboard') }} + {{ trans('backpack::base.first_page_you_see') }} +

+ +
+@endsection + + +@section('content') +
+
+
+
+
{{ trans('backpack::base.login_status') }}
+
+ +
{{ trans('backpack::base.logged_in') }}
+
+ Permissions: {{ backpack_user()->getAllPermissions()}}
+
Roles: {{ backpack_user()->getRoleNames()->implode('name',', ') }}
+
+
+
+@endsection diff --git a/resources/views/vendor/backpack/base/inc/alerts.blade.php b/resources/views/vendor/backpack/base/inc/alerts.blade.php new file mode 100644 index 0000000..023e791 --- /dev/null +++ b/resources/views/vendor/backpack/base/inc/alerts.blade.php @@ -0,0 +1,25 @@ + + +{{-- Bootstrap Notifications using Prologue Alerts --}} + \ No newline at end of file diff --git a/resources/views/vendor/backpack/base/inc/footer.blade.php b/resources/views/vendor/backpack/base/inc/footer.blade.php new file mode 100644 index 0000000..e175539 --- /dev/null +++ b/resources/views/vendor/backpack/base/inc/footer.blade.php @@ -0,0 +1,8 @@ +@if (config('backpack.base.show_powered_by')) + +@endif +@if (config('backpack.base.developer_link') && config('backpack.base.developer_name')) + {{ trans('backpack::base.handcrafted_by') }} {{ config('backpack.base.developer_name') }}. +@endif diff --git a/resources/views/vendor/backpack/base/inc/head.blade.php b/resources/views/vendor/backpack/base/inc/head.blade.php new file mode 100644 index 0000000..a521692 --- /dev/null +++ b/resources/views/vendor/backpack/base/inc/head.blade.php @@ -0,0 +1,50 @@ + + + +@if (config('backpack.base.meta_robots_content')) + +@endif + +{{-- Encrypted CSRF token for Laravel, in order for Ajax requests to work --}} + + + + {{ isset($title) ? $title.' :: '.config('backpack.base.project_name').' Admin' : config('backpack.base.project_name').' Admin' }} + + +@yield('before_styles') +@stack('before_styles') + + + + + + + + + + + + + + + + + + +@if (config('backpack.base.overlays') && count(config('backpack.base.overlays'))) + @foreach (config('backpack.base.overlays') as $overlay) + + @endforeach +@endif + + +@yield('after_styles') +@stack('after_styles') + + + + \ No newline at end of file diff --git a/resources/views/vendor/backpack/base/inc/main_header.blade.php b/resources/views/vendor/backpack/base/inc/main_header.blade.php new file mode 100644 index 0000000..c7a12ab --- /dev/null +++ b/resources/views/vendor/backpack/base/inc/main_header.blade.php @@ -0,0 +1,21 @@ +
+ + + + +
\ No newline at end of file diff --git a/resources/views/vendor/backpack/base/inc/menu.blade.php b/resources/views/vendor/backpack/base/inc/menu.blade.php new file mode 100644 index 0000000..865adcf --- /dev/null +++ b/resources/views/vendor/backpack/base/inc/menu.blade.php @@ -0,0 +1,39 @@ + + + + diff --git a/resources/views/vendor/backpack/base/inc/scripts.blade.php b/resources/views/vendor/backpack/base/inc/scripts.blade.php new file mode 100644 index 0000000..470bfd3 --- /dev/null +++ b/resources/views/vendor/backpack/base/inc/scripts.blade.php @@ -0,0 +1,31 @@ + + +{{-- + --}} + + + + + +{{-- --}} + + + + \ No newline at end of file diff --git a/resources/views/vendor/backpack/base/inc/sidebar.blade.php b/resources/views/vendor/backpack/base/inc/sidebar.blade.php new file mode 100644 index 0000000..3f68429 --- /dev/null +++ b/resources/views/vendor/backpack/base/inc/sidebar.blade.php @@ -0,0 +1,24 @@ +@if (backpack_auth()->check()) + + +@endif diff --git a/resources/views/vendor/backpack/base/inc/sidebar_content.blade.php b/resources/views/vendor/backpack/base/inc/sidebar_content.blade.php index daa8a5d..0dc47db 100644 --- a/resources/views/vendor/backpack/base/inc/sidebar_content.blade.php +++ b/resources/views/vendor/backpack/base/inc/sidebar_content.blade.php @@ -1,24 +1,34 @@ -
  • {{ trans('backpack::base.dashboard') }}
  • +
  • + {{ trans('backpack::base.dashboard') }}
  • +
  • Edition
  • Menu
  • Pages
  • -
  • - News - -
  • -
  • {{ trans('backpack::crud.file_manager') }}
  • +{{--
  • --}} +{{-- News --}} +{{----}} +{{--
  • --}} +
  • + {{ trans('backpack::crud.file_manager') }}
  • +
  • Translate
  • Settings
  • -
  • - Users, Roles, Permissions - -
  • -
  • Backups
  • -
  • Logs
  • +@can('backpack_maintenance') +
  • Administration
  • +
  • Languages
  • +
  • + Users, Roles, Permissions + +
  • +
  • Maintenance
  • +
  • Backups
  • +
  • Logs
  • +@endcan diff --git a/resources/views/vendor/backpack/base/inc/sidebar_user_panel.blade.php b/resources/views/vendor/backpack/base/inc/sidebar_user_panel.blade.php new file mode 100644 index 0000000..006e6e1 --- /dev/null +++ b/resources/views/vendor/backpack/base/inc/sidebar_user_panel.blade.php @@ -0,0 +1,9 @@ +
    + + User Image + + +
    diff --git a/resources/views/vendor/backpack/base/layout.blade.php b/resources/views/vendor/backpack/base/layout.blade.php new file mode 100644 index 0000000..8993eb7 --- /dev/null +++ b/resources/views/vendor/backpack/base/layout.blade.php @@ -0,0 +1,90 @@ + + + + @include('backpack::inc.head') + + + + +
    + + @include('backpack::inc.main_header') + + + + @include('backpack::inc.sidebar') + + + + +
    + + @yield('header') + + +
    + + @yield('content') + +
    + +
    + + +
    + @include('backpack::inc.footer') +
    +
    + + + + @yield('before_scripts') + @stack('before_scripts') + + @include('backpack::inc.scripts') + @include('backpack::inc.alerts') + + @yield('after_scripts') + @stack('after_scripts') + + + + + {{-- --}} + + diff --git a/resources/views/vendor/backpack/base/layout_guest.blade.php b/resources/views/vendor/backpack/base/layout_guest.blade.php new file mode 100644 index 0000000..b5d74fa --- /dev/null +++ b/resources/views/vendor/backpack/base/layout_guest.blade.php @@ -0,0 +1,44 @@ + + + + @include('backpack::inc.head') + + + +
    + +
    + + + @yield('header') + + +
    + + @yield('content') + +
    + +
    + + +
    + @include('backpack::inc.footer') +
    +
    + + + + @yield('before_scripts') + @stack('before_scripts') + + @include('backpack::inc.scripts') + @include('backpack::inc.alerts') + + @yield('after_scripts') + @stack('after_scripts') + + + {{-- --}} + + diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php deleted file mode 100644 index 082731e..0000000 --- a/resources/views/welcome.blade.php +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - Laravel - - - - - - - - -
    - @if (Route::has('login')) - - @endif - -
    -
    - Laravel -
    - - -
    -
    - -