Merge branch 'multilanguage' into dev
This commit is contained in:
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use App\Models\Language;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class AddLanguage extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'language:add {code} {translation} {native} {script?}';
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Insert new language into database';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$code = $this->argument('code');
|
||||||
|
$translation = $this->argument('translation');
|
||||||
|
$native = $this->argument('native');
|
||||||
|
$script = $this->argument('script');
|
||||||
|
|
||||||
|
// check if language does not exist
|
||||||
|
$exist = Language::find($code);
|
||||||
|
|
||||||
|
if ($exist) {
|
||||||
|
$this->error('Language ' . $code . ' already exists!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Language::create([
|
||||||
|
'code' => $code,
|
||||||
|
'name' => $translation,
|
||||||
|
'native' => $native,
|
||||||
|
'script' => $script ? $script : 'Latn'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->line('Successfully installed.');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -36,6 +36,10 @@ class Translations extends Command
|
|||||||
$defaultLocalesDir = $dir . '/' . $defaultLocales;
|
$defaultLocalesDir = $dir . '/' . $defaultLocales;
|
||||||
$currentLocalesDir = $dir . '/' . $currentLocales;
|
$currentLocalesDir = $dir . '/' . $currentLocales;
|
||||||
|
|
||||||
|
if (!is_dir($currentLocalesDir)) {
|
||||||
|
File::makeDirectory($currentLocalesDir);
|
||||||
|
}
|
||||||
|
|
||||||
$this->compareTranslationsInDirectory($defaultLocalesDir, $currentLocalesDir);
|
$this->compareTranslationsInDirectory($defaultLocalesDir, $currentLocalesDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Console;
|
namespace App\Console;
|
||||||
|
|
||||||
|
use App\Console\Commands\AddLanguage;
|
||||||
use Illuminate\Console\Scheduling\Schedule;
|
use Illuminate\Console\Scheduling\Schedule;
|
||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ class Kernel extends ConsoleKernel
|
|||||||
Commands\TranslateAll::class,
|
Commands\TranslateAll::class,
|
||||||
Commands\InitDatabaseSchema::class,
|
Commands\InitDatabaseSchema::class,
|
||||||
Commands\SetTheme::class,
|
Commands\SetTheme::class,
|
||||||
|
AddLanguage::class
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ use App\Models\WidgetArea;
|
|||||||
use App\Models\WidgetInWidgetArea;
|
use App\Models\WidgetInWidgetArea;
|
||||||
use Illuminate\Database\QueryException;
|
use Illuminate\Database\QueryException;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
class AssociateWidget extends Controller
|
class AssociateWidget extends Controller
|
||||||
{
|
{
|
||||||
@@ -18,7 +19,8 @@ class AssociateWidget extends Controller
|
|||||||
{
|
{
|
||||||
$area = WidgetArea::findOrFail($widgetArea);
|
$area = WidgetArea::findOrFail($widgetArea);
|
||||||
$associatedWidgetIds = WidgetInWidgetArea::getWidgetIdsFromArea($area->id);
|
$associatedWidgetIds = WidgetInWidgetArea::getWidgetIdsFromArea($area->id);
|
||||||
$widgets = Widget::paginate(25);
|
$widgets = Widget::where('language', LaravelLocalization::getCurrentLocale())
|
||||||
|
->paginate(25);
|
||||||
|
|
||||||
return view('admin.widgets.association', [
|
return view('admin.widgets.association', [
|
||||||
'widgetArea' => $area,
|
'widgetArea' => $area,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use App\Models\Module;
|
|||||||
use App\Models\Template;
|
use App\Models\Template;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
|
||||||
class CreateNewContent extends Controller
|
class CreateNewContent extends Controller
|
||||||
@@ -56,7 +57,8 @@ class CreateNewContent extends Controller
|
|||||||
'templates' => $templates,
|
'templates' => $templates,
|
||||||
'moduleId' => $moduleId,
|
'moduleId' => $moduleId,
|
||||||
'page' => $this->content,
|
'page' => $this->content,
|
||||||
'rootPages' => $this->content->getOverview()->get(),
|
'rootPages' => $this->content->getOverview()
|
||||||
|
->get(),
|
||||||
'moduleName' => trans($module->name),
|
'moduleName' => trans($module->name),
|
||||||
'extraData' => call_user_func([$module->handler, 'loadExtraData'], $this->content),
|
'extraData' => call_user_func([$module->handler, 'loadExtraData'], $this->content),
|
||||||
'formSectionNames' => call_user_func([$module->handler, 'getExtendedFormSections']),
|
'formSectionNames' => call_user_func([$module->handler, 'getExtendedFormSections']),
|
||||||
@@ -86,6 +88,7 @@ class CreateNewContent extends Controller
|
|||||||
|
|
||||||
// setup basic info
|
// setup basic info
|
||||||
$page->user_id = \Auth::user()->id;
|
$page->user_id = \Auth::user()->id;
|
||||||
|
$page->language = LaravelLocalization::getLocale();
|
||||||
$page->title = $request->title;
|
$page->title = $request->title;
|
||||||
$page->url = Str::slug($request->url);
|
$page->url = Str::slug($request->url);
|
||||||
$page->published_from = $request->publishedFrom;
|
$page->published_from = $request->publishedFrom;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ use App\Models\File;
|
|||||||
use App\Models\Template;
|
use App\Models\Template;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
|
||||||
class EditContent extends Controller
|
class EditContent extends Controller
|
||||||
@@ -223,7 +224,7 @@ class EditContent extends Controller
|
|||||||
|
|
||||||
// change url to something unique
|
// change url to something unique
|
||||||
$oldURL = $page->url;
|
$oldURL = $page->url;
|
||||||
$page->url = uniqid($page->url.'_deleted');
|
$page->url = uniqid($page->url . '_deleted');
|
||||||
$page->save();
|
$page->save();
|
||||||
|
|
||||||
list ($revision, $changedColumns) = $page->updateWithHistory(['status' => 'status'], ['status' => Content::STATUS_DELETED]);
|
list ($revision, $changedColumns) = $page->updateWithHistory(['status' => 'status'], ['status' => Content::STATUS_DELETED]);
|
||||||
@@ -274,6 +275,7 @@ class EditContent extends Controller
|
|||||||
|
|
||||||
// disable any other existing homepage
|
// disable any other existing homepage
|
||||||
Content::where('is_homepage', 1)
|
Content::where('is_homepage', 1)
|
||||||
|
->where('language', LaravelLocalization::getCurrentLocale())
|
||||||
->update(['is_homepage' => 0]);
|
->update(['is_homepage' => 0]);
|
||||||
|
|
||||||
// set new homepage
|
// set new homepage
|
||||||
|
|||||||
@@ -4,30 +4,39 @@ namespace App\Http\Controllers\Admin;
|
|||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests;
|
use App\Http\Requests;
|
||||||
|
use App\Models\Settings as SettingsModel;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
class Settings extends Controller
|
class Settings extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \App\Models\Settings
|
* @var SettingsModel
|
||||||
*/
|
*/
|
||||||
protected $settings;
|
protected $settings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings constructor.
|
* Settings constructor.
|
||||||
*
|
*
|
||||||
* @param \App\Models\Settings $settings
|
* @param SettingsModel $settings
|
||||||
*/
|
*/
|
||||||
public function __construct(\App\Models\Settings $settings)
|
public function __construct(SettingsModel $settings)
|
||||||
{
|
{
|
||||||
$this->settings = $settings;
|
$this->settings = $settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get overview (with form) for editing settings
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||||
|
*/
|
||||||
public function getOverview()
|
public function getOverview()
|
||||||
{
|
{
|
||||||
$sections = App::make('registerSettingsExtension')
|
$sections = App::make('registerSettingsExtension')
|
||||||
->get();
|
->get();
|
||||||
$settings = $this->settings->getAll();
|
|
||||||
|
// load all settings with language info
|
||||||
|
$settings = $this->settings->getAllWithLanguage();
|
||||||
|
|
||||||
return view('admin.settings.overview', [
|
return view('admin.settings.overview', [
|
||||||
'formSections' => $sections,
|
'formSections' => $sections,
|
||||||
@@ -35,35 +44,39 @@ class Settings extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save all settings (ignore empty ones)
|
||||||
|
*
|
||||||
|
* When settings used to be non-empty string and user deletes it, key is also deleted from database
|
||||||
|
*
|
||||||
|
* @param Requests\SaveSettingsRequest $request
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
|
*/
|
||||||
public function saveSettings(Requests\SaveSettingsRequest $request)
|
public function saveSettings(Requests\SaveSettingsRequest $request)
|
||||||
{
|
{
|
||||||
$data = $request->all();
|
$data = $request->all();
|
||||||
|
$commonSettings = isset($data['commonSettings']) ? $data['commonSettings'] : [];
|
||||||
|
|
||||||
// remove CSRF token field
|
// remove CSRF token field
|
||||||
unset($data['_token']);
|
unset($data['_token'], $data['commonSettings']);
|
||||||
|
|
||||||
$settings = $this->settings->getAll();
|
|
||||||
$updated = 0;
|
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
if (isset($settings->$key)) {
|
// select language for this setting key
|
||||||
if ($settings->$key != $value) {
|
$language = isset($commonSettings[$key]) ? null : LaravelLocalization::getCurrentLocale();
|
||||||
$updated++;
|
$setting = SettingsModel::firstOrNew(['language' => $language, 'key' => $key]);
|
||||||
\App\Models\Settings::where('key', $key)
|
|
||||||
->update(['value' => $value]);
|
if ($setting->value == $value) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
\App\Models\Settings::create(['key' => $key, 'value' => $value]);
|
// set value and save or delete
|
||||||
$updated++;
|
$setting->value = $value;
|
||||||
}
|
empty($value) ? $setting->delete() : $setting->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($updated > 0) {
|
|
||||||
return redirect()
|
return redirect()
|
||||||
->route('settings.overview')
|
->route('settings.overview')
|
||||||
->with('success', trans('admin/settings.successfullySaved'));
|
->with('success', trans('admin/settings.successfullySaved'));
|
||||||
} else {
|
|
||||||
return redirect()
|
|
||||||
->route('settings.overview')
|
|
||||||
->with('error', trans('admin/settings.nothingToSave'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,14 @@
|
|||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
use App\Models\Widget;
|
use App\Models\Widget;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
class WidgetsOverview extends Controller
|
class WidgetsOverview extends Controller
|
||||||
{
|
{
|
||||||
public function getOverview()
|
public function getOverview()
|
||||||
{
|
{
|
||||||
$widgets = Widget::paginate(25);
|
$widgets = Widget::where('language', LaravelLocalization::getCurrentLocale())
|
||||||
|
->paginate(25);
|
||||||
|
|
||||||
return view('admin.widgets.overview', ['widgets' => $widgets]);
|
return view('admin.widgets.overview', ['widgets' => $widgets]);
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-7
@@ -3,6 +3,10 @@
|
|||||||
namespace App\Http;
|
namespace App\Http;
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||||
|
use Illuminate\Routing\Middleware\ThrottleRequests;
|
||||||
|
use Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter;
|
||||||
|
use Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes;
|
||||||
|
use Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect;
|
||||||
|
|
||||||
class Kernel extends HttpKernel
|
class Kernel extends HttpKernel
|
||||||
{
|
{
|
||||||
@@ -23,11 +27,11 @@ class Kernel extends HttpKernel
|
|||||||
*/
|
*/
|
||||||
protected $middlewareGroups = [
|
protected $middlewareGroups = [
|
||||||
'web' => [
|
'web' => [
|
||||||
\App\Http\Middleware\EncryptCookies::class,
|
Middleware\EncryptCookies::class,
|
||||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||||
\Illuminate\Session\Middleware\StartSession::class,
|
\Illuminate\Session\Middleware\StartSession::class,
|
||||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
Middleware\VerifyCsrfToken::class,
|
||||||
],
|
],
|
||||||
'api' => [
|
'api' => [
|
||||||
'throttle:60,1',
|
'throttle:60,1',
|
||||||
@@ -41,10 +45,13 @@ class Kernel extends HttpKernel
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $routeMiddleware = [
|
protected $routeMiddleware = [
|
||||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
'auth' => Middleware\Authenticate::class,
|
||||||
'onlyAdmin' => \App\Http\Middleware\RequireAdminRole::class,
|
'onlyAdmin' => Middleware\RequireAdminRole::class,
|
||||||
'adminMenu' => \App\Http\Middleware\AdminMenuRegistrator::class,
|
'adminMenu' => Middleware\AdminMenuRegistrator::class,
|
||||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
'guest' => Middleware\RedirectIfAuthenticated::class,
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
'throttle' => ThrottleRequests::class,
|
||||||
|
'localize' => LaravelLocalizationRoutes::class,
|
||||||
|
'localizationRedirect' => LaravelLocalizationRedirectFilter::class,
|
||||||
|
'localeSessionRedirect' => LocaleSessionRedirect::class
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-6
@@ -4,15 +4,21 @@
|
|||||||
* This routing groups is used for routing along public part of website
|
* This routing groups is used for routing along public part of website
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
Route::pattern('id', '\d+');
|
Route::pattern('id', '\d+');
|
||||||
Route::pattern('url', '[0-9\-a-z]+');
|
Route::pattern('url', '[0-9\-a-z]+');
|
||||||
|
|
||||||
/*******************************************************************************/
|
/*******************************************************************************/
|
||||||
|
|
||||||
/**
|
Route::group([
|
||||||
|
'prefix' => LaravelLocalization::setLocale(),
|
||||||
|
'middleware' => ['localeSessionRedirect', 'localizationRedirect']
|
||||||
|
], function () {
|
||||||
|
/**
|
||||||
* This route group serves to handle request in admin
|
* This route group serves to handle request in admin
|
||||||
*/
|
*/
|
||||||
Route::group([
|
Route::group([
|
||||||
'middleware' => ['web', 'auth', 'adminMenu'],
|
'middleware' => ['web', 'auth', 'adminMenu'],
|
||||||
'namespace' => 'Admin',
|
'namespace' => 'Admin',
|
||||||
'prefix' => 'admin'
|
'prefix' => 'admin'
|
||||||
@@ -244,15 +250,15 @@ Route::group([
|
|||||||
->with('success', trans('admin/common.logoutSuccessfull'));
|
->with('success', trans('admin/common.logoutSuccessfull'));
|
||||||
})
|
})
|
||||||
->name('logout');
|
->name('logout');
|
||||||
});
|
});
|
||||||
|
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This section must be specified as last one
|
* This section must be specified as last one
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Route::group(['middleware' => ['web']], function () {
|
Route::group(['middleware' => ['web']], function () {
|
||||||
|
|
||||||
Route::get('/', 'Visitor\Homepage@getIndex')
|
Route::get('/', 'Visitor\Homepage@getIndex')
|
||||||
->name('page.index');
|
->name('page.index');
|
||||||
@@ -274,4 +280,5 @@ Route::group(['middleware' => ['web']], function () {
|
|||||||
// route for all content pages. This rule must be specified last (because it matches every route)
|
// route for all content pages. This rule must be specified last (because it matches every route)
|
||||||
Route::get('{url}', 'Visitor\ContentPage@getPage')
|
Route::get('{url}', 'Visitor\ContentPage@getPage')
|
||||||
->name('page.content');
|
->name('page.content');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
@@ -5,6 +5,7 @@ namespace App\Models;
|
|||||||
use App\Enumerations\ContentStatuses;
|
use App\Enumerations\ContentStatuses;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Content
|
* Class Content
|
||||||
@@ -15,6 +16,7 @@ class Content extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'user_id',
|
'user_id',
|
||||||
'parent_id',
|
'parent_id',
|
||||||
|
'language',
|
||||||
'module_handler',
|
'module_handler',
|
||||||
'published_from',
|
'published_from',
|
||||||
'published_to',
|
'published_to',
|
||||||
@@ -53,6 +55,7 @@ class Content extends Model
|
|||||||
public function getHomepage()
|
public function getHomepage()
|
||||||
{
|
{
|
||||||
return $this->getPageQuery()
|
return $this->getPageQuery()
|
||||||
|
->where('language', LaravelLocalization::getCurrentLocale())
|
||||||
->where('is_homepage', 1)
|
->where('is_homepage', 1)
|
||||||
->first();
|
->first();
|
||||||
}
|
}
|
||||||
@@ -68,6 +71,7 @@ class Content extends Model
|
|||||||
{
|
{
|
||||||
return $this->getPageQuery()
|
return $this->getPageQuery()
|
||||||
->where('url', $url)
|
->where('url', $url)
|
||||||
|
->where('language', LaravelLocalization::getCurrentLocale())
|
||||||
->first();
|
->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,6 +85,7 @@ class Content extends Model
|
|||||||
if (!$this->subpagesInit) {
|
if (!$this->subpagesInit) {
|
||||||
$this->subpages = $this->getPageQuery()
|
$this->subpages = $this->getPageQuery()
|
||||||
->where('parent_id', $this->id)
|
->where('parent_id', $this->id)
|
||||||
|
->where('language', LaravelLocalization::getCurrentLocale())
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
// convert JSON settings into stdClass
|
// convert JSON settings into stdClass
|
||||||
@@ -142,6 +147,7 @@ class Content extends Model
|
|||||||
public function rootPages()
|
public function rootPages()
|
||||||
{
|
{
|
||||||
$rootPages = $this->getPageQuery()
|
$rootPages = $this->getPageQuery()
|
||||||
|
->where('language', LaravelLocalization::getCurrentLocale())
|
||||||
->where('parent_id', null);
|
->where('parent_id', null);
|
||||||
|
|
||||||
if ($this->id) {
|
if ($this->id) {
|
||||||
@@ -166,6 +172,7 @@ class Content extends Model
|
|||||||
$query = DB::table('contents')
|
$query = DB::table('contents')
|
||||||
->select('contents.*', 'modules.name AS module_name')
|
->select('contents.*', 'modules.name AS module_name')
|
||||||
->where('contents.status', '<>', self::STATUS_DELETED)
|
->where('contents.status', '<>', self::STATUS_DELETED)
|
||||||
|
->where('contents.language', LaravelLocalization::getCurrentLocale())
|
||||||
->join('modules', 'modules.handler', '=', 'contents.module_handler')
|
->join('modules', 'modules.handler', '=', 'contents.module_handler')
|
||||||
->orderBy('created_at', 'DESC');
|
->orderBy('created_at', 'DESC');
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Language extends Model
|
||||||
|
{
|
||||||
|
public $timestamps = false;
|
||||||
|
public $primaryKey = 'code';
|
||||||
|
protected $fillable = [
|
||||||
|
'code',
|
||||||
|
'name',
|
||||||
|
'script',
|
||||||
|
'native'
|
||||||
|
];
|
||||||
|
protected $guarded = [];
|
||||||
|
}
|
||||||
+38
-3
@@ -3,12 +3,26 @@
|
|||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
class Settings extends Model
|
class Settings extends Model
|
||||||
{
|
{
|
||||||
protected $table = 'settings';
|
protected $table = 'settings';
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
protected $fillable = ['key', 'value'];
|
protected $fillable = ['key', 'value', 'language'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepares common query for selecting settings
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
protected function getSettingsQuery()
|
||||||
|
{
|
||||||
|
return Settings::select(['key', 'value', 'language'])
|
||||||
|
->where('language', LaravelLocalization::getCurrentLocale())
|
||||||
|
->orWhere('language', null)
|
||||||
|
->orderBy('language', 'DESC');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load all settings
|
* Load all settings
|
||||||
@@ -17,12 +31,33 @@ class Settings extends Model
|
|||||||
*/
|
*/
|
||||||
public function getAll()
|
public function getAll()
|
||||||
{
|
{
|
||||||
$settings = Settings::select(['key', 'value'])
|
$settings = $this->getSettingsQuery()
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
return $this->returnPairs($settings);
|
return $this->returnPairs($settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all settings with language info
|
||||||
|
*
|
||||||
|
* @return \stdClass
|
||||||
|
*/
|
||||||
|
public function getAllWithLanguage()
|
||||||
|
{
|
||||||
|
$settings = $this->getSettingsQuery()
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$data = new \stdClass();
|
||||||
|
foreach ($settings as $conf) {
|
||||||
|
$data->{$conf->key} = [
|
||||||
|
'val' => $conf->value,
|
||||||
|
'lang' => $conf->language
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load only config for views
|
* Load only config for views
|
||||||
*
|
*
|
||||||
@@ -30,7 +65,7 @@ class Settings extends Model
|
|||||||
*/
|
*/
|
||||||
public function getForView()
|
public function getForView()
|
||||||
{
|
{
|
||||||
$settings = Settings::select(['key', 'value'])
|
$settings = $this->getSettingsQuery()
|
||||||
->where('load_into_views', 1)
|
->where('load_into_views', 1)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Models;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Widget
|
* Class Widget
|
||||||
@@ -39,6 +40,7 @@ class Widget extends Model
|
|||||||
// create new widget
|
// create new widget
|
||||||
$widget = new Widget();
|
$widget = new Widget();
|
||||||
$widget->widget_type_handler = $widgetType->handler;
|
$widget->widget_type_handler = $widgetType->handler;
|
||||||
|
$widget->language = LaravelLocalization::getCurrentLocale();
|
||||||
$widget->user_id = \Auth::user()->id;
|
$widget->user_id = \Auth::user()->id;
|
||||||
$widget->name = $data->name;
|
$widget->name = $data->name;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Models;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class WidgetArea
|
* Class WidgetArea
|
||||||
@@ -25,6 +26,7 @@ class WidgetArea extends Model
|
|||||||
->where('code', $uniqueCode)
|
->where('code', $uniqueCode)
|
||||||
->join('widget_in_widget_area', 'widget_in_widget_area.widget_area_id', '=', 'widget_areas.id')
|
->join('widget_in_widget_area', 'widget_in_widget_area.widget_area_id', '=', 'widget_areas.id')
|
||||||
->join('widgets', 'widget_in_widget_area.widget_id', '=', 'widgets.id')
|
->join('widgets', 'widget_in_widget_area.widget_id', '=', 'widgets.id')
|
||||||
|
->where('language', LaravelLocalization::getCurrentLocale())
|
||||||
->orderBy('widget_in_widget_area.position');
|
->orderBy('widget_in_widget_area.position');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,6 +67,7 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
// register PingPong module extension
|
// register PingPong module extension
|
||||||
$this->app->register('Pingpong\Modules\ModulesServiceProvider');
|
$this->app->register('Pingpong\Modules\ModulesServiceProvider');
|
||||||
$this->app->register('Pingpong\Menus\MenusServiceProvider');
|
$this->app->register('Pingpong\Menus\MenusServiceProvider');
|
||||||
|
$this->app->register(LaravelLocalizationServiceProvider::class);
|
||||||
|
|
||||||
// create singletons for registering widgets
|
// create singletons for registering widgets
|
||||||
$this->app->singleton('registerWidget', function ($app) {
|
$this->app->singleton('registerWidget', function ($app) {
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?php namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
use Symfony\Component\Translation\Translator;
|
||||||
|
|
||||||
|
class LaravelLocalizationServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
|
||||||
|
$languages = DB::table('languages')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$supportedLocales = [
|
||||||
|
config('app.locale') => [
|
||||||
|
'native' => env('LOCALE_NATIVE_NAME'),
|
||||||
|
'script' => env('LOCALE_SCRIPT'),
|
||||||
|
'name' => env('LOCALE_TRANSLATED_NAME'),
|
||||||
|
]
|
||||||
|
];
|
||||||
|
foreach ($languages as $language) {
|
||||||
|
$supportedLocales[$language->code] = [
|
||||||
|
'native' => $language->native,
|
||||||
|
'name' => $language->name,
|
||||||
|
'script' => $language->script
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
config([
|
||||||
|
'laravellocalization.supportedLocales' => $supportedLocales,
|
||||||
|
'laravellocalization.useAcceptLanguageHeader' => true,
|
||||||
|
'laravellocalization.hideDefaultLocaleInURL' => true
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
\App::setLocale(LaravelLocalization::getCurrentLocale());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace App\Widgets\Menu;
|
namespace App\Widgets\Menu;
|
||||||
|
|
||||||
use App\Http\Requests\Request;
|
use App\Models\Content;
|
||||||
use App\Widgets\Contracts\WidgetRenderer;
|
use App\Widgets\Contracts\WidgetRenderer;
|
||||||
use App\Widgets\Exceptions\MissingParameterException;
|
use App\Widgets\Exceptions\MissingParameterException;
|
||||||
use App\Widgets\NonInstallableWidget;
|
use App\Widgets\NonInstallableWidget;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
class Menu extends NonInstallableWidget
|
class Menu extends NonInstallableWidget
|
||||||
{
|
{
|
||||||
@@ -50,8 +51,17 @@ class Menu extends NonInstallableWidget
|
|||||||
throw new MissingParameterException('settings');
|
throw new MissingParameterException('settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$links = json_decode($data->settings);
|
||||||
|
$pages = self::selectContentPages(array_keys((array)$links));
|
||||||
|
|
||||||
|
foreach ($links as $link) {
|
||||||
|
if (!isset($pages[$link->id])) {
|
||||||
|
unset($links->{$link->id});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$settings = [
|
$settings = [
|
||||||
'links' => json_decode($data->settings),
|
'links' => $links,
|
||||||
'containerClass' => $data->containerClass
|
'containerClass' => $data->containerClass
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -59,4 +69,18 @@ class Menu extends NonInstallableWidget
|
|||||||
|
|
||||||
return $widget;
|
return $widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function selectContentPages($ids)
|
||||||
|
{
|
||||||
|
$pages = Content::where('status', '!=', Content::STATUS_DELETED)
|
||||||
|
->where('language', LaravelLocalization::getCurrentLocale())
|
||||||
|
->whereIn('id', $ids)
|
||||||
|
->get();
|
||||||
|
$used = [];
|
||||||
|
foreach ($pages as $page) {
|
||||||
|
$used[$page->id] = $page;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $used;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,23 +8,10 @@ use App\Widgets\Contracts\WidgetRenderer;
|
|||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\Request;
|
use Illuminate\Support\Facades\Request;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
class Menu implements WidgetRenderer
|
class Menu implements WidgetRenderer
|
||||||
{
|
{
|
||||||
protected static function selectContentPages($ids)
|
|
||||||
{
|
|
||||||
$pages = Content::where('status', '!=', Content::STATUS_DELETED)
|
|
||||||
->whereIn('id', $ids)
|
|
||||||
->get();
|
|
||||||
$used = [];
|
|
||||||
|
|
||||||
foreach ($pages as $page) {
|
|
||||||
$used[$page->id] = $page;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $used;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method used for displaying widget.
|
* Method used for displaying widget.
|
||||||
*
|
*
|
||||||
@@ -41,7 +28,7 @@ class Menu implements WidgetRenderer
|
|||||||
$pageIds = array_keys($links);
|
$pageIds = array_keys($links);
|
||||||
|
|
||||||
// get pages
|
// get pages
|
||||||
$pages = self::selectContentPages($pageIds);
|
$pages = \App\Widgets\Menu\Menu::selectContentPages($pageIds);
|
||||||
|
|
||||||
// sort links using "order"
|
// sort links using "order"
|
||||||
uasort($links, function ($a, $b) {
|
uasort($links, function ($a, $b) {
|
||||||
|
|||||||
+2
-1
@@ -11,7 +11,8 @@
|
|||||||
"laravel/framework": "5.2.*",
|
"laravel/framework": "5.2.*",
|
||||||
"pingpong/modules": "~2.0",
|
"pingpong/modules": "~2.0",
|
||||||
"pingpong/menus": "^2.2",
|
"pingpong/menus": "^2.2",
|
||||||
"watson/sitemap": "^2.0"
|
"watson/sitemap": "^2.0",
|
||||||
|
"mcamara/laravel-localization": "^1.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
|
|||||||
Generated
+62
-14
@@ -4,8 +4,8 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "64dd6115505ac9f62926d5fccc14704d",
|
"hash": "3a1cbb52ac8547058b740bac891b3b82",
|
||||||
"content-hash": "8cefeb3bdf109c79d77ac6cb303a1a96",
|
"content-hash": "f274b2d31a4a37163ddd90984815797d",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "classpreloader/classpreloader",
|
"name": "classpreloader/classpreloader",
|
||||||
@@ -796,12 +796,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "9d853b9b2db24849b68ce219d80fc68165807810"
|
"reference": "f6a4db472ca9013e56d8a7065c9fd64383a3d4d4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/9d853b9b2db24849b68ce219d80fc68165807810",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/f6a4db472ca9013e56d8a7065c9fd64383a3d4d4",
|
||||||
"reference": "9d853b9b2db24849b68ce219d80fc68165807810",
|
"reference": "f6a4db472ca9013e56d8a7065c9fd64383a3d4d4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -918,7 +918,7 @@
|
|||||||
"framework",
|
"framework",
|
||||||
"laravel"
|
"laravel"
|
||||||
],
|
],
|
||||||
"time": "2016-07-21 15:40:02"
|
"time": "2016-07-22 22:19:36"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravelcollective/html",
|
"name": "laravelcollective/html",
|
||||||
@@ -1057,6 +1057,54 @@
|
|||||||
],
|
],
|
||||||
"time": "2016-07-21 09:35:56"
|
"time": "2016-07-21 09:35:56"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "mcamara/laravel-localization",
|
||||||
|
"version": "1.1.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/mcamara/laravel-localization.git",
|
||||||
|
"reference": "239d711d1f861e333e6de73d98dabdf94500512e"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/239d711d1f861e333e6de73d98dabdf94500512e",
|
||||||
|
"reference": "239d711d1f861e333e6de73d98dabdf94500512e",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"laravel/framework": "~5.2",
|
||||||
|
"php": ">=5.5.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"orchestra/testbench": "3.2.*"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [],
|
||||||
|
"psr-0": {
|
||||||
|
"Mcamara\\LaravelLocalization": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Marc Cámara",
|
||||||
|
"email": "mcamara88@gmail.com",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Easy localization for Laravel",
|
||||||
|
"homepage": "https://github.com/mcamara/laravel-localization",
|
||||||
|
"keywords": [
|
||||||
|
"laravel",
|
||||||
|
"localization",
|
||||||
|
"php"
|
||||||
|
],
|
||||||
|
"time": "2016-07-11 12:59:33"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
"version": "1.x-dev",
|
"version": "1.x-dev",
|
||||||
@@ -3551,28 +3599,28 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/environment",
|
"name": "sebastian/environment",
|
||||||
"version": "dev-master",
|
"version": "1.3.x-dev",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||||
"reference": "a13903bf5fd0239748fe322dfbdd5f5720ab20e6"
|
"reference": "622c5dc0a8036cfc4ccd73c7b1b668a431e69d96"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a13903bf5fd0239748fe322dfbdd5f5720ab20e6",
|
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/622c5dc0a8036cfc4ccd73c7b1b668a431e69d96",
|
||||||
"reference": "a13903bf5fd0239748fe322dfbdd5f5720ab20e6",
|
"reference": "622c5dc0a8036cfc4ccd73c7b1b668a431e69d96",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.6 || ^7.0"
|
"php": "^5.3.3 || ^7.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^5.0"
|
"phpunit/phpunit": "^4.8 || ^5.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.0.x-dev"
|
"dev-master": "1.3.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -3597,7 +3645,7 @@
|
|||||||
"environment",
|
"environment",
|
||||||
"hhvm"
|
"hhvm"
|
||||||
],
|
],
|
||||||
"time": "2016-06-11 08:54:23"
|
"time": "2016-06-11 08:21:19"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/exporter",
|
"name": "sebastian/exporter",
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ return [
|
|||||||
Illuminate\Translation\TranslationServiceProvider::class,
|
Illuminate\Translation\TranslationServiceProvider::class,
|
||||||
Illuminate\Validation\ValidationServiceProvider::class,
|
Illuminate\Validation\ValidationServiceProvider::class,
|
||||||
Illuminate\View\ViewServiceProvider::class,
|
Illuminate\View\ViewServiceProvider::class,
|
||||||
|
Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider::class,
|
||||||
// this class must be before ModulesServiceProvider from PingPong, because it handles files module.json
|
// this class must be before ModulesServiceProvider from PingPong, because it handles files module.json
|
||||||
App\Providers\ModuleManager::class,
|
App\Providers\ModuleManager::class,
|
||||||
Pingpong\Modules\ModulesServiceProvider::class,
|
Pingpong\Modules\ModulesServiceProvider::class,
|
||||||
@@ -209,6 +210,7 @@ return [
|
|||||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||||
'URL' => Illuminate\Support\Facades\URL::class,
|
'URL' => Illuminate\Support\Facades\URL::class,
|
||||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||||
|
'LaravelLocalization' => Mcamara\LaravelLocalization\Facades\LaravelLocalization::class,
|
||||||
'View' => Illuminate\Support\Facades\View::class,
|
'View' => Illuminate\Support\Facades\View::class,
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ return [
|
|||||||
'username' => env('DB_USERNAME', 'forge'),
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8',
|
||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_general_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class MakeLangEnumerations extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('languages', function (Blueprint $table) {
|
||||||
|
$table->string('code', 8)
|
||||||
|
->primary();
|
||||||
|
$table->string('name')
|
||||||
|
->comment('Translated name for given language');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::drop('languages');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddFieldsIntoLanguages extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('languages', function (Blueprint $table) {
|
||||||
|
$table->string('script', 16)
|
||||||
|
->default('Latn')
|
||||||
|
->comment('ISO code for locale script (Latn, Arab, ...)');
|
||||||
|
$table->string('native')
|
||||||
|
->comment('Native name for language');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('languages', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('script');
|
||||||
|
$table->dropColumn('native');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddLanguageToContentPages extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$platform = Schema::getConnection()
|
||||||
|
->getDoctrineSchemaManager()
|
||||||
|
->getDatabasePlatform();
|
||||||
|
$platform->registerDoctrineTypeMapping('enum', 'string');
|
||||||
|
|
||||||
|
DB::raw('ALTER TABLE `languages`
|
||||||
|
CHANGE `code` `code` varchar(8) COLLATE \'utf8_general_ci\' NOT NULL FIRST,
|
||||||
|
CHANGE `name` `name` varchar(255) COLLATE \'utf8_general_ci\' NOT NULL COMMENT \'Translated name for given language\' AFTER `code`,
|
||||||
|
CHANGE `script` `script` varchar(16) COLLATE \'utf8_general_ci\' NOT NULL DEFAULT \'Latn\' COMMENT \'ISO code for locale script (Latn, Arab, ...)\' AFTER `name`,
|
||||||
|
CHANGE `native` `native` varchar(255) COLLATE \'utf8_general_ci\' NOT NULL COMMENT \'Native name for language\' AFTER `script`,
|
||||||
|
COLLATE \'utf8_general_ci\';');
|
||||||
|
|
||||||
|
Schema::table('contents', function (Blueprint $table) {
|
||||||
|
$table->string('language', 8)
|
||||||
|
->after('template')
|
||||||
|
->default(\App::getLocale());
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('contents', function (Blueprint $table) {
|
||||||
|
$table->index('language')
|
||||||
|
->change();
|
||||||
|
|
||||||
|
$table->unique(['language', 'url']);
|
||||||
|
|
||||||
|
$doctrine = Schema::getConnection()
|
||||||
|
->getDoctrineSchemaManager()
|
||||||
|
->listTableDetails('contents');
|
||||||
|
|
||||||
|
// remove unique index from URL column
|
||||||
|
if ($doctrine->hasIndex('url_UNIQUE')) {
|
||||||
|
$table->dropUnique('url_UNIQUE');
|
||||||
|
} else {
|
||||||
|
$table->dropUnique('contents_url_unique');
|
||||||
|
}
|
||||||
|
|
||||||
|
$table->foreign('language')
|
||||||
|
->references('code')
|
||||||
|
->on('languages')
|
||||||
|
->onDelete('cascade')
|
||||||
|
->onUpdate('cascade');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('contents', function (Blueprint $table) {
|
||||||
|
$table->dropForeign('contents_language_foreign');
|
||||||
|
$table->dropIndex('contents_language_index');
|
||||||
|
$table->dropUnique('contents_language_url_unique');
|
||||||
|
$table->dropColumn('language');
|
||||||
|
$table->unique('url');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddLanguageIntoWidgets extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('widgets', function (Blueprint $table) {
|
||||||
|
$table->string('language', 8)
|
||||||
|
->after('widget_type_handler')
|
||||||
|
->default(\App::getLocale());
|
||||||
|
|
||||||
|
$table->foreign('language')
|
||||||
|
->references('code')
|
||||||
|
->on('languages')
|
||||||
|
->onDelete('cascade')
|
||||||
|
->onUpdate('cascade');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('widgets', function (Blueprint $table) {
|
||||||
|
$table->dropForeign('widgets_language_foreign');
|
||||||
|
$table->dropColumn('language');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class AddLanguageIntoSettings extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
DB::raw("ALTER TABLE `settings`
|
||||||
|
CHANGE `language` `language` varchar(8) COLLATE 'utf8_general_ci' NULL AFTER `id`,
|
||||||
|
CHANGE `key` `key` varchar(64) COLLATE 'utf8_general_ci' NOT NULL COMMENT 'User readable key for accessing value of this config. Config will be available under this key also in views.' AFTER `language`,
|
||||||
|
CHANGE `value` `value` text COLLATE 'utf8_general_ci' NOT NULL COMMENT 'Value of config.' AFTER `key`,
|
||||||
|
COLLATE 'utf8_general_ci';");
|
||||||
|
|
||||||
|
Schema::table('settings', function (Blueprint $table) {
|
||||||
|
$table->string('language', 8)
|
||||||
|
->after('id')
|
||||||
|
->nullable(true)
|
||||||
|
->default(null);
|
||||||
|
|
||||||
|
$table->dropUnique('settings_key_unique');
|
||||||
|
$table->unique(['key', 'language']);
|
||||||
|
|
||||||
|
$table->foreign('language')
|
||||||
|
->references('code')
|
||||||
|
->on('languages')
|
||||||
|
->onDelete('set null')
|
||||||
|
->onUpdate('cascade');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('settings', function (Blueprint $table) {
|
||||||
|
$table->dropForeign('settings_language_foreign');
|
||||||
|
$table->dropColumn('language');
|
||||||
|
$table->dropUnique('settings_key_language_unique');
|
||||||
|
$table->unique('key');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
<label>
|
<label>
|
||||||
@lang('contactform::admin/settings.recaptchaSiteKey')
|
@lang('contactform::admin/settings.recaptchaSiteKey')
|
||||||
|
|
||||||
<input type="text" name="recaptchaSiteKey" value="{{old('recaptchaSiteKey', isset($settings->recaptchaSiteKey) ? $settings->recaptchaSiteKey : null)}}" />
|
<input type="text" name="recaptchaSiteKey" value="{{old('recaptchaSiteKey', isset($settings->recaptchaSiteKey) ? $settings->recaptchaSiteKey['val'] : null)}}" />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
@lang('contactform::admin/settings.recaptchaSecret')
|
@lang('contactform::admin/settings.recaptchaSecret')
|
||||||
|
|
||||||
<input type="text" name="recaptchaSecret" value="{{old('recaptchaSecret', isset($settings->recaptchaSecret) ? $settings->recaptchaSecret : null)}}" />
|
<input type="text" name="recaptchaSecret" value="{{old('recaptchaSecret', isset($settings->recaptchaSecret) ? $settings->recaptchaSecret['val'] : null)}}" />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<em><a href="https://www.google.com/recaptcha/admin#list" target="_blank">reCAPTCHA</a></em>
|
<em><a href="https://www.google.com/recaptcha/admin#list" target="_blank">reCAPTCHA</a></em>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'overview' => 'Seznam všech obsahových stránek',
|
||||||
|
];
|
||||||
@@ -11,6 +11,7 @@ return [
|
|||||||
'successfullySaved' => 'Settings successfully saved',
|
'successfullySaved' => 'Settings successfully saved',
|
||||||
'nothingToSave' => 'You have submitted unchanged form. Try to change some attribute first.',
|
'nothingToSave' => 'You have submitted unchanged form. Try to change some attribute first.',
|
||||||
'meta' => 'Meta information',
|
'meta' => 'Meta information',
|
||||||
|
'commonSettings' => 'Use for all languages?',
|
||||||
'socialSites' => 'Social networks',
|
'socialSites' => 'Social networks',
|
||||||
'social' => [
|
'social' => [
|
||||||
'facebook' => 'Facebook profile',
|
'facebook' => 'Facebook profile',
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'lang' => [
|
||||||
|
'english' => 'English',
|
||||||
|
'czech' => 'Czech'
|
||||||
|
]
|
||||||
|
];
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'welcome' => 'Welcome to my page'
|
|
||||||
];
|
|
||||||
@@ -10,5 +10,6 @@ return [
|
|||||||
'new' => 'New menu',
|
'new' => 'New menu',
|
||||||
'edit' => 'Edit menu',
|
'edit' => 'Edit menu',
|
||||||
'preview' => 'Menu preview',
|
'preview' => 'Menu preview',
|
||||||
'availablePages' => 'Available pages'
|
'availablePages' => 'Available pages',
|
||||||
|
'noLinks' => 'Cannot save menu without any link!',
|
||||||
];
|
];
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
@yield('head_meta')
|
@yield('head_meta')
|
||||||
<title>@yield('pageName', @trans('admin/common.admin')) | {{$pageName}}</title>
|
<title>@yield('pageName', @trans('admin/common.admin')) | {{isset($pageName) ? $pageName : ''}}</title>
|
||||||
<link rel="stylesheet" href="{{asset('resources/assets/css/foundation.min.css')}}" />
|
<link rel="stylesheet" href="{{asset('resources/assets/css/foundation.min.css')}}" />
|
||||||
<link rel="stylesheet" href="{{asset('resources/assets/css/font-awesome.min.css')}}" />
|
<link rel="stylesheet" href="{{asset('resources/assets/css/font-awesome.min.css')}}" />
|
||||||
<link rel="stylesheet" href="{{asset('resources/assets/css/admin.css')}}" />
|
<link rel="stylesheet" href="{{asset('resources/assets/css/admin.css')}}" />
|
||||||
@@ -17,7 +17,21 @@
|
|||||||
|
|
||||||
<header class="row nav top-bar">
|
<header class="row nav top-bar">
|
||||||
<section class="logo columns small-1 medium-3 large-2">
|
<section class="logo columns small-1 medium-3 large-2">
|
||||||
|
<ul class="dropdown menu language_bar_chooser" data-dropdown-menu>
|
||||||
|
<li>
|
||||||
|
<a href="#">@lang(LaravelLocalization::getCurrentLocaleName())</a>
|
||||||
|
<ul class="menu">
|
||||||
|
@foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties)
|
||||||
|
<li @if(LaravelLocalization::getCurrentLocale() == $localeCode) class="active" @endif>
|
||||||
|
<a rel="alternate" hreflang="{{$localeCode}}"
|
||||||
|
href="{{LaravelLocalization::getLocalizedURL($localeCode) }}">
|
||||||
|
{{ $properties['native'] }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="heading columns small-10 medium-8 large-8">
|
<section class="heading columns small-10 medium-8 large-8">
|
||||||
@@ -48,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer class="row text-center">
|
<footer class="row text-center">
|
||||||
© {{$pageName}} {{date('Y')}}
|
© {{isset($pageName) ? $pageName : ''}} {{date('Y')}}
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
<script src="{{asset('resources/assets/js/vendor/jquery.min.js')}}"></script>
|
<script src="{{asset('resources/assets/js/vendor/jquery.min.js')}}"></script>
|
||||||
|
|||||||
@@ -1,17 +1,27 @@
|
|||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.pageName')
|
@lang('admin/settings.pageName')
|
||||||
|
|
||||||
<input type="text" name="pageName" value="{{old('pageName', $settings->pageName)}}" />
|
<input type="text" name="pageName" value="{{old('pageName', isset($settings->pageName) ? $settings->pageName['val'] : '')}}" />
|
||||||
|
|
||||||
|
@if (isset($errors) && $errors->has('pageName'))
|
||||||
|
<div class="callout alert">
|
||||||
|
{{ $errors->first('pageName') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.author')
|
@lang('admin/settings.author')
|
||||||
|
|
||||||
<input type="text" name="author" value="{{old('author', $settings->author)}}" />
|
<input type="text" name="author" value="{{old('author', isset($settings->author) ? $settings->author['val'] : '')}}" />
|
||||||
|
|
||||||
|
@include('admin.settings.snippets.commonSettings', ['field' => 'author'])
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.googleAnalyticsCode')
|
@lang('admin/settings.googleAnalyticsCode')
|
||||||
|
|
||||||
<input type="text" name="googleAnalyticsCode" value="{{old('googleAnalyticsCode', $settings->googleAnalyticsCode)}}" />
|
<input type="text" name="googleAnalyticsCode" value="{{old('googleAnalyticsCode', isset($settings->googleAnalyticsCode) ? $settings->googleAnalyticsCode['val'] : '')}}" />
|
||||||
|
|
||||||
|
@include('admin.settings.snippets.commonSettings', ['field' => 'googleAnalyticsCode'])
|
||||||
</label>
|
</label>
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.metaKeywords')
|
@lang('admin/settings.metaKeywords')
|
||||||
|
|
||||||
<input type="text" name="metaKeywords" value="{{old('metaKeywords', $settings->metaKeywords)}}" />
|
<input type="text" name="metaKeywords"
|
||||||
|
value="{{old('metaKeywords', isset($settings->metaKeywords) ? $settings->metaKeywords['val'] : '')}}" />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.metaDescription')
|
@lang('admin/settings.metaDescription')
|
||||||
|
|
||||||
<textarea name="metaDescription" rows="3">{{old('metaDescription', $settings->metaDescription)}}</textarea>
|
<textarea name="metaDescription"
|
||||||
|
rows="3">{{old('metaDescription', isset($settings->metaDescription) ? $settings->metaDescription['val'] : '')}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
@@ -1,29 +1,29 @@
|
|||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.social.facebook')
|
@lang('admin/settings.social.facebook')
|
||||||
|
|
||||||
<input type="text" name="facebookProfile" value="{{old('facebookProfile', isset($settings->facebookProfile) ? $settings->facebookProfile : '')}}" />
|
<input type="text" name="facebookProfile" value="{{old('facebookProfile', isset($settings->facebookProfile) ? $settings->facebookProfile['val'] : '')}}" />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.social.twitter')
|
@lang('admin/settings.social.twitter')
|
||||||
|
|
||||||
<input type="text" name="twitterProfile" value="{{old('twitterProfile', isset($settings->twitterProfile) ? $settings->twitterProfile : '')}}" />
|
<input type="text" name="twitterProfile" value="{{old('twitterProfile', isset($settings->twitterProfile) ? $settings->twitterProfile['val'] : '')}}" />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.social.pinterest')
|
@lang('admin/settings.social.pinterest')
|
||||||
|
|
||||||
<input type="text" name="pinterestProfile" value="{{old('pinterestProfile', isset($settings->pinterestProfile) ? $settings->pinterestProfile : '')}}" />
|
<input type="text" name="pinterestProfile" value="{{old('pinterestProfile', isset($settings->pinterestProfile) ? $settings->pinterestProfile['val'] : '')}}" />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.social.gplus')
|
@lang('admin/settings.social.gplus')
|
||||||
|
|
||||||
<input type="text" name="gplusProfile" value="{{old('gplusProfile', isset($settings->gplusProfile) ? $settings->gplusProfile : '')}}" />
|
<input type="text" name="gplusProfile" value="{{old('gplusProfile', isset($settings->gplusProfile) ? $settings->gplusProfile['val'] : '')}}" />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
@lang('admin/settings.social.instagram')
|
@lang('admin/settings.social.instagram')
|
||||||
|
|
||||||
<input type="text" name="instagramProfile" value="{{old('instagramProfile', isset($settings->instagramProfile) ? $settings->instagramProfile : '')}}" />
|
<input type="text" name="instagramProfile" value="{{old('instagramProfile', isset($settings->instagramProfile) ? $settings->instagramProfile['val'] : '')}}" />
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<input type="checkbox" name="commonSettings[{{$field}}]" value="1"
|
||||||
|
@if(!isset($settings->{$field}) || $settings->{$field}['lang'] == null)
|
||||||
|
checked
|
||||||
|
@endif />
|
||||||
|
@lang('admin/settings.commonSettings')
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
// check if menu is not empty
|
// check if menu is not empty
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
alert ('@lang('widget/menu.noLinks')');
|
alert ('@lang('widgets/menu.noLinks')');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (!empty($widgets))
|
@if (count($widgets))
|
||||||
<table class="full-width">
|
<table class="full-width">
|
||||||
<tr>
|
<tr>
|
||||||
<th>@lang('admin/widgets.widgetType')</th>
|
<th>@lang('admin/widgets.widgetType')</th>
|
||||||
|
|||||||
Vendored
Reference in New Issue
Block a user