Unverified Commit 0a7fc6c8 authored by Nicolas Widart's avatar Nicolas Widart Committed by GitHub

Merge pull request #658 from mikemand/feature/fixes-cs-and-updates

Fixes, CS and updates
parents bc5ec9ad 4bc4f037
<?php <?php
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| The prefix that'll be used for the administration | The prefix that'll be used for the administration
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
*/ */
'admin-prefix' => 'backend', 'admin-prefix' => 'backend',
/* /*
...@@ -32,18 +32,18 @@ return [ ...@@ -32,18 +32,18 @@ return [
*/ */
'skin' => 'skin-blue', 'skin' => 'skin-blue',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| WYSIWYG Backend Editor | WYSIWYG Backend Editor
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Define which editor you would like to use for the backend wysiwygs. | Define which editor you would like to use for the backend wysiwygs.
| These classes are event handlers, listening to EditorIsRendering | These classes are event handlers, listening to EditorIsRendering
| you can define your own handlers and use them here | you can define your own handlers and use them here
| Options: | Options:
| - \Modules\Core\Events\Handlers\LoadCkEditor::class | - \Modules\Core\Events\Handlers\LoadCkEditor::class
| - \Modules\Core\Events\Handlers\LoadSimpleMde::class | - \Modules\Core\Events\Handlers\LoadSimpleMde::class
*/ */
'wysiwyg-handler' => \Modules\Core\Events\Handlers\LoadCkEditor::class, 'wysiwyg-handler' => \Modules\Core\Events\Handlers\LoadCkEditor::class,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Custom CKeditor configuration file | Custom CKeditor configuration file
...@@ -63,22 +63,22 @@ return [ ...@@ -63,22 +63,22 @@ return [
| Backend and Frontend routes. | Backend and Frontend routes.
*/ */
'middleware' => [ 'middleware' => [
'backend' => [ 'backend' => [
'auth.admin', 'auth.admin',
], ],
'frontend' => [ 'frontend' => [
], ],
'api' => [ 'api' => [
'api', 'api',
], ],
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Define which assets will be available through the asset manager | Define which assets will be available through the asset manager
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| These assets are registered on the asset manager | These assets are registered on the asset manager
*/ */
'admin-assets' => [ 'admin-assets' => [
// Css // Css
'bootstrap.css' => ['theme' => 'vendor/bootstrap/dist/css/bootstrap.min.css'], 'bootstrap.css' => ['theme' => 'vendor/bootstrap/dist/css/bootstrap.min.css'],
...@@ -178,5 +178,5 @@ return [ ...@@ -178,5 +178,5 @@ return [
| Check if asgard was installed | Check if asgard was installed
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
*/ */
'is_installed' => env('INSTALLED', false) 'is_installed' => env('INSTALLED', false),
]; ];
...@@ -25,8 +25,8 @@ return [ ...@@ -25,8 +25,8 @@ return [
| Add relations that will be dynamically added to the Page entity | Add relations that will be dynamically added to the Page entity
*/ */
'relations' => [ 'relations' => [
// 'extension' => function ($self) { // 'extension' => function (): \Illuminate\Database\Eloquent\Relations\BelongsTo {
// return $self->belongsTo(PageExtension::class, 'id', 'page_id')->first(); // return $this->belongsTo(PageExtension::class, 'id', 'page_id')->first();
// } // }
], ],
/* /*
......
...@@ -79,14 +79,14 @@ return [ ...@@ -79,14 +79,14 @@ return [
'casts' => [ 'casts' => [
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Dynamic relations | Dynamic relations
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Add relations that will be dynamically added to the User entity | Add relations that will be dynamically added to the User entity
*/ */
'relations' => [ 'relations' => [
// 'extension' => function ($self) { // 'extension' => function (): \Illuminate\Database\Eloquent\Relations\BelongsTo {
// return $self->belongsTo(UserExtension::class, 'user_id', 'id')->first(); // return $this->belongsTo(UserExtension::class, 'user_id', 'id')->first();
// } // }
], ],
/* /*
......
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="{{ locale() }}">
<head> <head>
<base src="{{ URL::asset('/') }}" /> <meta charset="UTF-8">
<meta charset="UTF-8"> <title>
<title> @section('title')
@section('title') @setting('core::site-name') | Admin
@setting('core::site-name') | Admin @show
</title>
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="user-api-token" content="{{ $currentUser->getFirstApiKey() }}">
<meta name="current-locale" content="{{ locale() }}">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
<base href="{{ url('/') }}">
<link rel="canonical" href="{{ request()->url() }}">
@foreach($cssFiles as $css)
<link media="all" type="text/css" rel="stylesheet" href="{{ asset($css) }}">
@endforeach
<link media="all" type="text/css" rel="stylesheet" href="{{ mix('css/app.css') }}">
{!! Theme::script('vendor/jquery/jquery.min.js') !!}
@include('partials.asgard-globals')
@section('styles')
@show @show
</title> @stack('css-stack')
<meta id="token" name="token" value="{{ csrf_token() }}" /> @stack('translation-stack')
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="user-api-token" content="{{ $currentUser->getFirstApiKey() }}">
<meta name="current-locale" content="{{ locale() }}">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
@foreach($cssFiles as $css)
<link media="all" type="text/css" rel="stylesheet" href="{{ URL::asset($css) }}">
@endforeach
<link media="all" type="text/css" rel="stylesheet" href="{{ mix('css/app.css') }}">
{!! Theme::script('vendor/jquery/jquery.min.js') !!}
@include('partials.asgard-globals')
@section('styles')
@show
@stack('css-stack')
@stack('translation-stack')
<script> <script>
$.ajaxSetup({ $.ajaxSetup({
headers: { 'Authorization': 'Bearer {{ $currentUser->getFirstApiKey() }}' } headers: { 'Authorization': 'Bearer {{ $currentUser->getFirstApiKey() }}' }
}); });
var AuthorizationHeaderValue = 'Bearer {{ $currentUser->getFirstApiKey() }}'; var AuthorizationHeaderValue = 'Bearer {{ $currentUser->getFirstApiKey() }}';
</script> </script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]--> <![endif]-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
@routes @routes
</head> </head>
<body class="{{ config('asgard.core.core.skin', 'skin-blue') }} sidebar-mini" style="padding-bottom: 0 !important;"> <body class="{{ config('asgard.core.core.skin', 'skin-blue') }} sidebar-mini" style="padding-bottom: 0 !important;">
<div class="wrapper" id="app"> <div class="wrapper" id="app">
<header class="main-header"> <header class="main-header">
<a href="{{ route('dashboard.index') }}" class="logo"> <a href="{{ route('dashboard.index') }}" class="logo">
<span class="logo-mini"> <span class="logo-mini">
@setting('core::site-name-mini') @setting('core::site-name-mini')
</span> </span>
<span class="logo-lg"> <span class="logo-lg">
@setting('core::site-name') @setting('core::site-name')
</span> </span>
</a> </a>
@include('partials.top-nav') @include('partials.top-nav')
</header> </header>
@include('partials.sidebar-nav') @include('partials.sidebar-nav')
<aside class="content-wrapper"> <aside class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
@yield('content-header') @yield('content-header')
</section> </section>
<!-- Main content --> <!-- Main content -->
<section class="content"> <section class="content">
@include('partials.notifications') @include('partials.notifications')
@yield('content') @yield('content')
<router-view></router-view> <router-view></router-view>
</section><!-- /.content --> </section><!-- /.content -->
</aside><!-- /.right-side --> </aside><!-- /.right-side -->
@include('partials.footer') @include('partials.footer')
@include('partials.right-sidebar') @include('partials.right-sidebar')
</div><!-- ./wrapper --> </div><!-- ./wrapper -->
@foreach($jsFiles as $js) @foreach($jsFiles as $js)
<script src="{{ URL::asset($js) }}" type="text/javascript"></script> <script src="{{ asset($js) }}" type="text/javascript"></script>
@endforeach @endforeach
<script> <script>
window.AsgardCMS = { window.AsgardCMS = {
translations: {!! $staticTranslations !!}, translations: {!! $staticTranslations !!},
locales: {!! json_encode(LaravelLocalization::getSupportedLocales()) !!}, locales: {!! json_encode(LaravelLocalization::getSupportedLocales()) !!},
currentLocale: '{{ locale() }}', currentLocale: '{{ locale() }}',
editor: '{{ $activeEditor }}', editor: '{{ $activeEditor }}',
ckeditorCustomConfig: '{{ config('asgard.core.core.ckeditor-config-file-path', '') }}', ckeditorCustomConfig: '{{ config('asgard.core.core.ckeditor-config-file-path', '') }}',
adminPrefix: '{{ config('asgard.core.core.admin-prefix') }}', adminPrefix: '{{ config('asgard.core.core.admin-prefix') }}',
hideDefaultLocaleInURL: '{{ config('laravellocalization.hideDefaultLocaleInURL') }}', hideDefaultLocaleInURL: '{{ config('laravellocalization.hideDefaultLocaleInURL') }}',
filesystem: '{{ config('asgard.media.config.filesystem') }}' filesystem: '{{ config('asgard.media.config.filesystem') }}'
}; };
</script> </script>
<script src="{{ mix('js/manifest.js') }}"></script> <script src="{{ mix('js/manifest.js') }}"></script>
<script src="{{ mix('js/vendor.js') }}"></script> <script src="{{ mix('js/vendor.js') }}"></script>
<script src="{{ mix('js/app.js') }}"></script> <script src="{{ mix('js/app.js') }}"></script>
<?php if (is_module_enabled('Notification')): ?> @if(is_module_enabled('Notification'))
<script src="https://js.pusher.com/4.1.0/pusher.min.js" integrity="sha384-e9MoFh6Cw/uluf+NZ6MJwfJ1Dm7UOvJf9oTBxxCYDyStJeeAF0q53ztnEbLLDSQP" crossorigin="anonymous"></script> <script src="https://js.pusher.com/4.1.0/pusher.min.js" integrity="sha384-e9MoFh6Cw/uluf+NZ6MJwfJ1Dm7UOvJf9oTBxxCYDyStJeeAF0q53ztnEbLLDSQP" crossorigin="anonymous"></script>
<script src="{{ Module::asset('notification:js/pusherNotifications.js') }}"></script> <script src="{{ Module::asset('notification:js/pusherNotifications.js') }}"></script>
<script> <script>
$('.notifications-list').pusherNotifications({ $('.notifications-list').pusherNotifications({
pusherKey: '{{ config('broadcasting.connections.pusher.key') }}', pusherKey: '{{ config('broadcasting.connections.pusher.key') }}',
pusherCluster: '{{ config('broadcasting.connections.pusher.options.cluster') }}', pusherCluster: '{{ config('broadcasting.connections.pusher.options.cluster') }}',
pusherEncrypted: {{ config('broadcasting.connections.pusher.options.encrypted') }}, pusherEncrypted: {{ config('broadcasting.connections.pusher.options.encrypted') }},
loggedInUserId: {{ $currentUser->id }}, loggedInUserId: {{ $currentUser->id }}
}); });
</script> </script>
<?php endif; ?> @endif
<?php if (config('asgard.core.core.ckeditor-config-file-path') !== ''): ?> @if(config('asgard.core.core.ckeditor-config-file-path') !== '')
<script> <script>
$('.ckeditor').each(function() { $('.ckeditor').each(function () {
CKEDITOR.replace($(this).attr('name'), { CKEDITOR.replace($(this).attr('name'), {
customConfig: '{{ config('asgard.core.core.ckeditor-config-file-path') }}' customConfig: '{{ config('asgard.core.core.ckeditor-config-file-path') }}'
}); });
}); });
</script> </script>
<?php endif; ?> @endif
@section('scripts') @section('scripts')
@show @show
@stack('js-stack') @stack('js-stack')
</body> </body>
</html> </html>
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Carbon;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {
...@@ -18,7 +18,7 @@ class AppServiceProvider extends ServiceProvider ...@@ -18,7 +18,7 @@ class AppServiceProvider extends ServiceProvider
Schema::defaultStringLength(191); Schema::defaultStringLength(191);
Carbon::setLocale(config('app.locale')); Carbon::setLocale(config('app.locale'));
Carbon::serializeUsing(function ($carbon) { Carbon::serializeUsing(function (Carbon $carbon) {
return $carbon->format('d/m/y H:i:s'); return $carbon->format('d/m/y H:i:s');
}); });
} }
......
<?php <?php
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| The prefix that'll be used for the administration | The prefix that'll be used for the administration
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
*/ */
'admin-prefix' => 'backend', 'admin-prefix' => 'backend',
/* /*
...@@ -32,18 +32,18 @@ return [ ...@@ -32,18 +32,18 @@ return [
*/ */
'skin' => 'skin-blue', 'skin' => 'skin-blue',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| WYSIWYG Backend Editor | WYSIWYG Backend Editor
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Define which editor you would like to use for the backend wysiwygs. | Define which editor you would like to use for the backend wysiwygs.
| These classes are event handlers, listening to EditorIsRendering | These classes are event handlers, listening to EditorIsRendering
| you can define your own handlers and use them here | you can define your own handlers and use them here
| Options: | Options:
| - \Modules\Core\Events\Handlers\LoadCkEditor::class | - \Modules\Core\Events\Handlers\LoadCkEditor::class
| - \Modules\Core\Events\Handlers\LoadSimpleMde::class | - \Modules\Core\Events\Handlers\LoadSimpleMde::class
*/ */
'wysiwyg-handler' => \Modules\Core\Events\Handlers\LoadCkEditor::class, 'wysiwyg-handler' => \Modules\Core\Events\Handlers\LoadCkEditor::class,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Custom CKeditor configuration file | Custom CKeditor configuration file
...@@ -63,22 +63,22 @@ return [ ...@@ -63,22 +63,22 @@ return [
| Backend and Frontend routes. | Backend and Frontend routes.
*/ */
'middleware' => [ 'middleware' => [
'backend' => [ 'backend' => [
'auth.admin', 'auth.admin',
], ],
'frontend' => [ 'frontend' => [
], ],
'api' => [ 'api' => [
'api', 'api',
], ],
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Define which assets will be available through the asset manager | Define which assets will be available through the asset manager
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| These assets are registered on the asset manager | These assets are registered on the asset manager
*/ */
'admin-assets' => [ 'admin-assets' => [
// Css // Css
'bootstrap.css' => ['theme' => 'vendor/bootstrap/dist/css/bootstrap.min.css'], 'bootstrap.css' => ['theme' => 'vendor/bootstrap/dist/css/bootstrap.min.css'],
...@@ -178,5 +178,5 @@ return [ ...@@ -178,5 +178,5 @@ return [
| Check if asgard was installed | Check if asgard was installed
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
*/ */
'is_installed' => env('INSTALLED', false) 'is_installed' => env('INSTALLED', false),
]; ];
<?php
return [
'welcome-title' => [
'description' => 'dashboard::dashboard.welcome-title',
'view' => 'text',
'translatable' => true,
'default' => 'Welcome on your backend!',
],
'welcome-description' => [
'description' => 'dashboard::dashboard.welcome-description',
'view' => 'textarea',
'translatable' => true,
'default' => 'Did you know you can access the documentation by pressing F1?',
],
'welcome-enabled' => [
'description' => 'dashboard::dashboard.welcome-enabled',
'view' => 'checkbox',
'translatable' => false,
'default' => '1',
],
];
...@@ -25,8 +25,8 @@ return [ ...@@ -25,8 +25,8 @@ return [
| Add relations that will be dynamically added to the Page entity | Add relations that will be dynamically added to the Page entity
*/ */
'relations' => [ 'relations' => [
// 'extension' => function ($self) { // 'extension' => function (): \Illuminate\Database\Eloquent\Relations\BelongsTo {
// return $self->belongsTo(PageExtension::class, 'id', 'page_id')->first(); // return $this->belongsTo(PageExtension::class, 'id', 'page_id')->first();
// } // }
], ],
/* /*
......
...@@ -79,14 +79,14 @@ return [ ...@@ -79,14 +79,14 @@ return [
'casts' => [ 'casts' => [
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Dynamic relations | Dynamic relations
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Add relations that will be dynamically added to the User entity | Add relations that will be dynamically added to the User entity
*/ */
'relations' => [ 'relations' => [
// 'extension' => function ($self) { // 'extension' => function (): \Illuminate\Database\Eloquent\Relations\BelongsTo {
// return $self->belongsTo(UserExtension::class, 'user_id', 'id')->first(); // return $this->belongsTo(UserExtension::class, 'user_id', 'id')->first();
// } // }
], ],
/* /*
......
...@@ -21,7 +21,6 @@ Vue.use(VueEvents); ...@@ -21,7 +21,6 @@ Vue.use(VueEvents);
Vue.use(VueSimplemde); Vue.use(VueSimplemde);
require('./mixins'); require('./mixins');
Vue.component('ckeditor', require('../../../Modules/Core/Assets/js/components/CkEditor.vue')); Vue.component('ckeditor', require('../../../Modules/Core/Assets/js/components/CkEditor.vue'));
Vue.component('DeleteButton', require('../../../Modules/Core/Assets/js/components/DeleteComponent.vue')); Vue.component('DeleteButton', require('../../../Modules/Core/Assets/js/components/DeleteComponent.vue'));
Vue.component('EditButton', require('../../../Modules/Core/Assets/js/components/EditButtonComponent.vue')); Vue.component('EditButton', require('../../../Modules/Core/Assets/js/components/EditButtonComponent.vue'));
...@@ -29,9 +28,8 @@ Vue.component('TagsInput', require('../../../Modules/Tag/Assets/js/components/Ta ...@@ -29,9 +28,8 @@ Vue.component('TagsInput', require('../../../Modules/Tag/Assets/js/components/Ta
Vue.component('SingleMedia', require('../../../Modules/Media/Assets/js/components/SingleMedia.vue')); Vue.component('SingleMedia', require('../../../Modules/Media/Assets/js/components/SingleMedia.vue'));
Vue.component('MediaManager', require('../../../Modules/Media/Assets/js/components/MediaManager.vue')); Vue.component('MediaManager', require('../../../Modules/Media/Assets/js/components/MediaManager.vue'));
const currentLocale = window.AsgardCMS.currentLocale,
const currentLocale = window.AsgardCMS.currentLocale; adminPrefix = window.AsgardCMS.adminPrefix;
const adminPrefix = window.AsgardCMS.adminPrefix;
function makeBaseUrl() { function makeBaseUrl() {
if (window.AsgardCMS.hideDefaultLocaleInURL == 1) { if (window.AsgardCMS.hideDefaultLocaleInURL == 1) {
......
...@@ -24,17 +24,17 @@ ...@@ -24,17 +24,17 @@
<p>@setting('dashboard::welcome-description')</p> <p>@setting('dashboard::welcome-description')</p>
</div> </div>
@if (setting('core::site-name') === '') @if (setting('core::site-name') === '')
<div class="box-footer"> <div class="box-footer">
<a class="btn btn-primary btn-flat" href="{{ route('dashboard.module.settings', 'core') }}"> <a class="btn btn-primary btn-flat" href="{{ route('dashboard.module.settings', 'core') }}">
<i class="fa fa-cog"></i> {{ trans('dashboard::dashboard.configure your website') }} <i class="fa fa-cog"></i> {{ trans('dashboard::dashboard.configure your website') }}
</a> </a>
<a class="btn btn-default btn-flat" href="{{ route('admin.page.page.index') }}"> <a class="btn btn-default btn-flat" href="{{ route('admin.page.page.index') }}">
{{ trans('dashboard::dashboard.add pages') }} {{ trans('dashboard::dashboard.add pages') }}
</a> </a>
<a class="btn btn-default btn-flat" href="{{ route('admin.menu.menu.index') }}"> <a class="btn btn-default btn-flat" href="{{ route('admin.menu.menu.index') }}">
{{ trans('dashboard::dashboard.add menus') }} {{ trans('dashboard::dashboard.add menus') }}
</a> </a>
</div> </div>
@endif @endif
</div> </div>
@endif @endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment