Compare commits
8
Commits
module_profiler
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1ca6e4cfb | ||
|
|
c69bd9bcf7 | ||
|
|
271e7f5170 | ||
|
|
1ecef555ef | ||
|
|
4ef5e3e3cd | ||
|
|
1388383bb6 | ||
|
|
f1ff45cfb1 | ||
|
|
6d723f026d |
@@ -3,7 +3,6 @@
|
|||||||
namespace App\CMS\Handlers;
|
namespace App\CMS\Handlers;
|
||||||
|
|
||||||
use App\CMS\Contracts\Modules\BaseModuleHandler;
|
use App\CMS\Contracts\Modules\BaseModuleHandler;
|
||||||
use App\CMS\Enumerations\TemplatePathsHumanReadableRootOnly;
|
|
||||||
use App\CMS\Enumerations\WidgetTypes;
|
use App\CMS\Enumerations\WidgetTypes;
|
||||||
use App\CMS\Repositories\Module;
|
use App\CMS\Repositories\Module;
|
||||||
use App\Models\ActionLog\ActionLog;
|
use App\Models\ActionLog\ActionLog;
|
||||||
@@ -14,6 +13,7 @@ use App\Models\Templates\Template;
|
|||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Models\Widgets\Widget;
|
use App\Models\Widgets\Widget;
|
||||||
use App\Models\Widgets\WidgetArea;
|
use App\Models\Widgets\WidgetArea;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
abstract class BaseHandler implements BaseModuleHandler
|
abstract class BaseHandler implements BaseModuleHandler
|
||||||
{
|
{
|
||||||
@@ -125,6 +125,26 @@ abstract class BaseHandler implements BaseModuleHandler
|
|||||||
}, 10000, ['icon' => 'fa fa-fw fa-gears']);
|
}, 10000, ['icon' => 'fa fa-fw fa-gears']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
\Menu::create('topMenu', function ($menu) use ($user) {
|
||||||
|
if (count(LaravelLocalization::getSupportedLocales()) > 1) {
|
||||||
|
$menu->dropdown(trans(LaravelLocalization::getCurrentLocaleName()), function ($menu) use ($user) {
|
||||||
|
foreach (LaravelLocalization::getSupportedLocales() as $localeCode => $properties) {
|
||||||
|
$menu->url(LaravelLocalization::getLocalizedURL($localeCode), $properties['native']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user->can('manage', Content::class)) {
|
||||||
|
$menu->route('page.index', '', [], 10, [
|
||||||
|
'icon' => 'fa fa-fw fa-globe',
|
||||||
|
'title' => trans('common.goToWeb'),
|
||||||
|
'target' => '_blank',
|
||||||
|
'data-toggle' => 'tooltip',
|
||||||
|
'data-placement' => 'left'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// create menu with user profile
|
// create menu with user profile
|
||||||
\Menu::create('profileMenu', function ($menu) use ($user) {
|
\Menu::create('profileMenu', function ($menu) use ($user) {
|
||||||
$menu->route('users.detail', trans('admin/userManagement.profile'), ['user' => $user], 10, ['icon' => 'fa fa-fw fa-user icon']);
|
$menu->route('users.detail', trans('admin/userManagement.profile'), ['user' => $user], 10, ['icon' => 'fa fa-fw fa-user icon']);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ trait Nullable {
|
|||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function nullableDate($date) {
|
public function nullableDate($date) {
|
||||||
return empty($date) ? null : Carbon::parse($date)->toDateTimeString();
|
return empty($date) ? null : Carbon::createFromFormat(config('app.date_format'), $date)->toDateTimeString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,83 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\CMS\MenuPresenters;
|
|
||||||
|
|
||||||
use Nwidart\Menus\MenuItem;
|
|
||||||
use Nwidart\Menus\Presenters\Presenter;
|
|
||||||
|
|
||||||
class FoundationDrilldownMenuPresenter extends Presenter
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getOpenTagWrapper()
|
|
||||||
{
|
|
||||||
return PHP_EOL . '<ul class="vertical menu" data-drilldown>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getCloseTagWrapper()
|
|
||||||
{
|
|
||||||
return PHP_EOL . '</ul>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getMenuWithoutDropdownWrapper($item)
|
|
||||||
{
|
|
||||||
return '<li' . $this->getActiveState($item) . '><a href="' . $item->getUrl() . '">' . $item->getIcon() . ' ' . $item->title . '</a></li>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getActiveState(MenuItem $item)
|
|
||||||
{
|
|
||||||
$active = ' class="active"';
|
|
||||||
|
|
||||||
if (empty($item->getChilds())) {
|
|
||||||
// for direct menu input return if page is active
|
|
||||||
return \Request::is($item->getRequest()) ? $active : null;
|
|
||||||
} else {
|
|
||||||
// on nested menu inputs loop over children and in case any of them is active, mark active also root level
|
|
||||||
foreach ($item->getChilds() as $child) {
|
|
||||||
if ($this->getActiveState($child)) {
|
|
||||||
return $active;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getDividerWrapper()
|
|
||||||
{
|
|
||||||
return '<li class="divider"></li>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getMultiLevelDropdownWrapper($item)
|
|
||||||
{
|
|
||||||
return $this->getMenuWithDropDownWrapper($item);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getMenuWithDropDownWrapper($item)
|
|
||||||
{
|
|
||||||
$active = $this->getActiveState($item);
|
|
||||||
|
|
||||||
return '<li>
|
|
||||||
<a ' . $active . ' href="#">' . $item->getIcon() . ' ' . $item->title . '</a>
|
|
||||||
<ul class="vertical menu">
|
|
||||||
' . $this->getChildMenuItems($item) . '
|
|
||||||
</ul>
|
|
||||||
</li>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\CMS\MenuPresenters;
|
|
||||||
|
|
||||||
use Nwidart\Menus\Presenters\Presenter;
|
|
||||||
|
|
||||||
class FoundationDropdownMenuPresenter extends Presenter
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getOpenTagWrapper()
|
|
||||||
{
|
|
||||||
return PHP_EOL . '<ul class="vertical dropdown menu" data-dropdown-menu>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getCloseTagWrapper()
|
|
||||||
{
|
|
||||||
return PHP_EOL . '</ul>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getMenuWithoutDropdownWrapper($item)
|
|
||||||
{
|
|
||||||
$link = '<a href="' . $item->getUrl() . '">' . $item->getIcon() . ' ' . $item->title . '</a>';
|
|
||||||
return '<li' . $this->getActiveState($item) . '>' . $link . '</li>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getActiveState($item)
|
|
||||||
{
|
|
||||||
return \Request::is($item->getRequest()) || $item->hasActiveOnChild ? ' class="active"' : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getDividerWrapper()
|
|
||||||
{
|
|
||||||
return '<li class="divider"></li>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc }
|
|
||||||
*/
|
|
||||||
public function getMenuWithDropDownWrapper($item)
|
|
||||||
{
|
|
||||||
return '<li>
|
|
||||||
<a href="#">' . $item->getIcon() . ' ' . $item->title . '</a>
|
|
||||||
<ul class="vertical menu">
|
|
||||||
' . $this->getChildMenuItems($item) . '
|
|
||||||
</ul>
|
|
||||||
</li>' . PHP_EOL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace App\CMS\MenuPresenters;
|
|
||||||
|
|
||||||
class FoundationInitializedDropdownMenuPresenter extends FoundationDropdownMenuPresenter
|
|
||||||
{
|
|
||||||
public function getOpenTagWrapper()
|
|
||||||
{
|
|
||||||
return PHP_EOL . '<ul class="menu">' . PHP_EOL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\CMS\MenuPresenters;
|
||||||
|
|
||||||
|
use Nwidart\Menus\Presenters\Bootstrap\NavbarPresenter;
|
||||||
|
|
||||||
|
class TopMenuPresenter extends NavbarPresenter {
|
||||||
|
public function getOpenTagWrapper()
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCloseTagWrapper()
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ namespace App\CMS\ModuleManager\Providers;
|
|||||||
|
|
||||||
use App\CMS\Repositories\Module as ModuleRepository;
|
use App\CMS\Repositories\Module as ModuleRepository;
|
||||||
use Illuminate\Database\QueryException;
|
use Illuminate\Database\QueryException;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class ModuleManager extends ServiceProvider
|
class ModuleManager extends ServiceProvider
|
||||||
@@ -25,6 +26,12 @@ class ModuleManager extends ServiceProvider
|
|||||||
foreach ($modules as $module) {
|
foreach ($modules as $module) {
|
||||||
if (isset($module->module_settings['providers']) && !empty($module->module_settings['providers'])) {
|
if (isset($module->module_settings['providers']) && !empty($module->module_settings['providers'])) {
|
||||||
foreach ($module->module_settings['providers'] as $provider) {
|
foreach ($module->module_settings['providers'] as $provider) {
|
||||||
|
|
||||||
|
if (!class_exists($provider)) {
|
||||||
|
Log::warning($provider.' does not exists. Skipping');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$this->app->register($provider);
|
$this->app->register($provider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ class InstallModule extends Command
|
|||||||
Cache::forget('enabled-modules');
|
Cache::forget('enabled-modules');
|
||||||
Cache::forget('module-handler-to-id-enumeration');
|
Cache::forget('module-handler-to-id-enumeration');
|
||||||
|
|
||||||
|
exec('php artisan module:enable '.$name);
|
||||||
|
exec('php artisan cache:clear');
|
||||||
exec('composer dump-autoload');
|
exec('composer dump-autoload');
|
||||||
|
|
||||||
// inform user
|
// inform user
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class SetTemplate extends Command
|
|||||||
// run again artisan for publishing resources
|
// run again artisan for publishing resources
|
||||||
// it cannot be done using $this->call, because we need to load different template into service providers
|
// it cannot be done using $this->call, because we need to load different template into service providers
|
||||||
if ($publish) {
|
if ($publish) {
|
||||||
exec('php artisan vendor:publish');
|
exec('php artisan template:publish');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"animate.css": "~3.4.0",
|
"animate.css": "~3.4.0",
|
||||||
"bootstrap": "v4.0.0-alpha.5",
|
"bootstrap": "v4.0.0-alpha.5",
|
||||||
"font-awesome": "~4.5.0",
|
"font-awesome": "~4.7.0",
|
||||||
"jquery": "~3.2.1",
|
"jquery": "~3.2.1",
|
||||||
"metisMenu": "~2.0.3",
|
"metisMenu": "~2.0.3",
|
||||||
"nprogress": "~0.2.0",
|
"nprogress": "~0.2.0",
|
||||||
|
|||||||
+3
-5
@@ -3,11 +3,9 @@
|
|||||||
return [
|
return [
|
||||||
|
|
||||||
'styles' => [
|
'styles' => [
|
||||||
'foundation-drilldown' => App\CMS\MenuPresenters\FoundationDrilldownMenuPresenter::class,
|
'metismenu' => App\CMS\MenuPresenters\MetismenuPresenter::class,
|
||||||
'foundation-dropdown' => App\CMS\MenuPresenters\FoundationDropdownMenuPresenter::class,
|
'profile-menu' => App\CMS\MenuPresenters\ProfileMenuPresenter::class,
|
||||||
'foundation-dropdown-initialized' => App\CMS\MenuPresenters\FoundationInitializedDropdownMenuPresenter::class,
|
'top-menu' => \App\CMS\MenuPresenters\TopMenuPresenter::class
|
||||||
'metismenu' => App\CMS\MenuPresenters\MetismenuPresenter::class,
|
|
||||||
'profile-menu' => App\CMS\MenuPresenters\ProfileMenuPresenter::class,
|
|
||||||
],
|
],
|
||||||
'ordering' => true,
|
'ordering' => true,
|
||||||
|
|
||||||
|
|||||||
@@ -26,13 +26,16 @@ elixir (function (mix) {
|
|||||||
'tinycolor/dist/tinycolor-min.js',
|
'tinycolor/dist/tinycolor-min.js',
|
||||||
'chart.js/dist/Chart.bundle.min.js',
|
'chart.js/dist/Chart.bundle.min.js',
|
||||||
'jquery.are-you-sure/jquery.are-you-sure.js',
|
'jquery.are-you-sure/jquery.are-you-sure.js',
|
||||||
|
'../node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
|
||||||
'../resources/assets/admin/js/*.js',
|
'../resources/assets/admin/js/*.js',
|
||||||
], 'public/js/vendor.js', 'bower_components')
|
], 'public/js/vendor.js', 'bower_components')
|
||||||
.copy ('bower_components/font-awesome/css/font-awesome.min.css', 'public/css')
|
.copy ('bower_components/font-awesome/css/font-awesome.min.css', 'public/css')
|
||||||
|
.copy ('node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css', 'public/css')
|
||||||
.copy ('bower_components/font-awesome/fonts', 'public/fonts')
|
.copy ('bower_components/font-awesome/fonts', 'public/fonts')
|
||||||
.sass (['bootstrap/bootstrap.scss'], 'public/css/admin/bootstrap.css')
|
.sass (['bootstrap/bootstrap.scss'], 'public/css/admin/bootstrap.css')
|
||||||
.styles ([
|
.styles ([
|
||||||
'../../../public/css/admin/bootstrap.css',
|
'../../../public/css/admin/bootstrap.css',
|
||||||
|
'../../../public/css/bootstrap-datepicker.css',
|
||||||
'../../../bower_components/animate.css/animate.css',
|
'../../../bower_components/animate.css/animate.css',
|
||||||
], 'public/css/admin/style.css')
|
], 'public/css/admin/style.css')
|
||||||
.remove ('public/css/admin/theme.scss');
|
.remove ('public/css/admin/theme.scss');
|
||||||
|
|||||||
Generated
+9
-2
@@ -152,6 +152,14 @@
|
|||||||
"inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
"inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bootstrap-datepicker": {
|
||||||
|
"version": "1.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/bootstrap-datepicker/-/bootstrap-datepicker-1.7.1.tgz",
|
||||||
|
"integrity": "sha1-Tuf680iI2+x4NPv52+fEJ34B3a8=",
|
||||||
|
"requires": {
|
||||||
|
"jquery": "3.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"bower": {
|
"bower": {
|
||||||
"version": "1.8.0",
|
"version": "1.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/bower/-/bower-1.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/bower/-/bower-1.8.0.tgz",
|
||||||
@@ -1761,8 +1769,7 @@
|
|||||||
"jquery": {
|
"jquery": {
|
||||||
"version": "3.2.1",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz",
|
||||||
"integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c=",
|
"integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"json-stable-stringify": {
|
"json-stable-stringify": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"lodash": "^4.16.2"
|
"lodash": "^4.16.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"bootstrap-datepicker": "^1.7.1",
|
||||||
"laravel-elixir-remove": "^0.2.1"
|
"laravel-elixir-remove": "^0.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-1
@@ -18,6 +18,11 @@ a:focus {
|
|||||||
opacity: .7;
|
opacity: .7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.collapse.in {
|
||||||
|
margin-bottom: 20px !important;
|
||||||
|
border-bottom: solid 2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.nav.nav-tabs-bordered + .tab-content {
|
.nav.nav-tabs-bordered + .tab-content {
|
||||||
padding-bottom: 20px !important;
|
padding-bottom: 20px !important;
|
||||||
}
|
}
|
||||||
@@ -324,7 +329,7 @@ img {
|
|||||||
|
|
||||||
.card.file-preview .card-block {
|
.card.file-preview .card-block {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 6em;
|
height: 9em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,3 +427,14 @@ img {
|
|||||||
padding-left: 35px;
|
padding-left: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-profile .dropdown-menu > li {
|
||||||
|
width: 100%;
|
||||||
|
padding: 3px 1.5rem;
|
||||||
|
clear: both;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #373a3c;
|
||||||
|
text-align: inherit;
|
||||||
|
white-space: nowrap;
|
||||||
|
background: none;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
@@ -20,6 +20,10 @@ $ (document).ready (function () {
|
|||||||
$ ('form').areYouSure ();
|
$ ('form').areYouSure ();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$ ('.date').datepicker ({
|
||||||
|
format: 'dd. mm. yyyy'
|
||||||
|
});
|
||||||
|
|
||||||
$ ('.checkbox').change (function () {
|
$ ('.checkbox').change (function () {
|
||||||
var e = $ (this);
|
var e = $ (this);
|
||||||
var checked = e.is (':checked');
|
var checked = e.is (':checked');
|
||||||
|
|||||||
@@ -45,7 +45,9 @@
|
|||||||
@lang($page->module->name)
|
@lang($page->module->name)
|
||||||
</a>
|
</a>
|
||||||
<br>
|
<br>
|
||||||
<small>({{$page->templateModel->name}})</small>
|
@if(!is_null($page->templateModel))
|
||||||
|
<small>({{$page->templateModel->name}})</small>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 hidden-md-down">@date($page->created_at)</div>
|
<div class="col-lg-2 hidden-md-down">@date($page->created_at)</div>
|
||||||
<div class="col-xs-2 col-lg-1 text-center">
|
<div class="col-xs-2 col-lg-1 text-center">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@forelse($files as $file)
|
@forelse($files as $file)
|
||||||
<div class="col-sm-4 col-md-3 text-center">
|
<div class="{{$responsiveClass or 'col-sm-4 col-md-3'}} text-center">
|
||||||
@include('admin.snippets.card', [
|
@include('admin.snippets.card', [
|
||||||
'body' => '<a href="'.route('upload.detail', ['id' => $file->id]).'">'.\App\CMS\Helpers\FileManager::getPreview($file).'</a>',
|
'body' => '<a href="'.route('upload.detail', ['id' => $file->id]).'">'.\App\CMS\Helpers\FileManager::getPreview($file).'</a>',
|
||||||
'footerClass' => 'text-right',
|
'footerClass' => 'text-right',
|
||||||
|
|||||||
@@ -22,29 +22,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="header-block header-block-nav">
|
<div class="header-block header-block-nav">
|
||||||
<ul class="nav-profile">
|
|
||||||
@if(count(LaravelLocalization::getSupportedLocales()) > 1)
|
|
||||||
<li class="profile dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button"
|
|
||||||
aria-haspopup="true" aria-expanded="false">
|
|
||||||
@lang(LaravelLocalization::getCurrentLocaleName())
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
@foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties)
|
|
||||||
<a hreflang="{{$localeCode}}"
|
|
||||||
href="{{LaravelLocalization::getLocalizedURL($localeCode) }}"
|
|
||||||
class="dropdown-item">
|
|
||||||
{{ $properties['native'] }}
|
|
||||||
</a>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<li class="profile">
|
|
||||||
<a href="{{route('page.index')}}" target="_blank" class="nav-link" data-toggle="tooltip"
|
<ul class="nav-profile">
|
||||||
data-placement="bottom" title="@lang('common.goToWeb')"><i class="fa fa-fw fa-globe"></i></a>
|
|
||||||
</li>
|
{!! Menu::render('topMenu', 'top-menu') !!}
|
||||||
|
|
||||||
|
|
||||||
<li class="profile dropdown">
|
<li class="profile dropdown">
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<script src="{{asset('/resources/assets/js/vendor/ckeditor/ckeditor.js')}}"></script>
|
@if (!defined('CK_EDITOR_INITIALIZED'))
|
||||||
|
<script src="{{asset('/resources/assets/js/vendor/ckeditor/ckeditor.js')}}"></script>
|
||||||
|
@php define('CK_EDITOR_INITIALIZED', true) @endphp
|
||||||
|
@endif
|
||||||
|
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
CKEDITOR.on ('instanceCreated', function (e) {
|
CKEDITOR.on ('instanceCreated', function (e) {
|
||||||
@@ -19,21 +22,28 @@
|
|||||||
basicEntities: false,
|
basicEntities: false,
|
||||||
entities_greek: false,
|
entities_greek: false,
|
||||||
entities_latin: false,
|
entities_latin: false,
|
||||||
height: 550,
|
height: {{$height or 550}},
|
||||||
removePlugins: 'about,scayt', //elementspath
|
removePlugins: 'about,scayt', //elementspath
|
||||||
extraPlugins: 'justify',
|
extraPlugins: 'justify',
|
||||||
enterMode: CKEDITOR.ENTER_P,
|
enterMode: CKEDITOR.ENTER_P,
|
||||||
toolbarGroups: [
|
@if (!isset($simpleEditor))
|
||||||
{name: 'undo', groups: ['undo']},
|
toolbarGroups: [
|
||||||
{name: 'styles'},
|
{name: 'undo', groups: ['undo']},
|
||||||
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
|
{name: 'styles'},
|
||||||
{name: 'paragraph', groups: ['list', 'indent', 'align', 'blocks']},
|
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
|
||||||
{name: 'links'},
|
{name: 'paragraph', groups: ['list', 'indent', 'align', 'blocks']},
|
||||||
{name: 'editing', groups: ['find', 'selection']},
|
{name: 'links'},
|
||||||
{name: 'insert'},
|
{name: 'editing', groups: ['find', 'selection']},
|
||||||
{name: 'forms'},
|
{name: 'insert'},
|
||||||
{name: 'document', groups: ['mode', 'document', 'doctools']},
|
{name: 'forms'},
|
||||||
{name: 'tools'}
|
{name: 'document', groups: ['mode', 'document', 'doctools']},
|
||||||
]
|
{name: 'tools'}
|
||||||
|
]
|
||||||
|
@else
|
||||||
|
toolbarGroups: [
|
||||||
|
{name: 'undo', groups: ['undo']},
|
||||||
|
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
|
||||||
|
]
|
||||||
|
@endif
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Templates\PragueTennisCamp\Providers;
|
|
||||||
|
|
||||||
use App\CMS\Helpers\Template;
|
|
||||||
use Modules\ContactForm\Widgets\Form\Presenter;
|
|
||||||
use Templates\PragueTennisCamp\Pipeline\AddHotelsCategory;
|
|
||||||
use Templates\PragueTennisCamp\Pipeline\AddTraineeTeamCategory;
|
|
||||||
|
|
||||||
class ServiceProvider extends \Illuminate\Support\ServiceProvider
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Register the service provider.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function register()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function boot()
|
|
||||||
{
|
|
||||||
if (\App::runningInConsole()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Presenter::$template = Template::name('widgets.contact.form');
|
|
||||||
|
|
||||||
$pipeline = app('displayPipeline');
|
|
||||||
$pipeline->add(AddTraineeTeamCategory::class);
|
|
||||||
$pipeline->add(AddHotelsCategory::class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user