FEATURE: ugly commit - rewritten widgets, menu made more compact, added profile menu, few bugfixes etc. Sorry..
This commit is contained in:
@@ -27,28 +27,25 @@ abstract class BaseHandler implements BaseModuleHandler
|
||||
|
||||
// create instance of main menu
|
||||
\Menu::create('mainMenu', function ($menu) {
|
||||
// $menu->route('admin.dashboard', trans('admin/mainMenu.dashboard'), [], 10, ['icon' => 'fa fa-dashboard']);
|
||||
$menu->dropdown(trans('admin/mainMenu.userManagement'), function ($sub) {
|
||||
$sub->route('users.new', trans('admin/mainMenu.newUser'), [], 10, ['icon' => 'fa fa-user-plus']);
|
||||
$sub->route('users.detail', trans('admin/mainMenu.userDetail'), [], 20, ['icon' => 'fa fa-user']);
|
||||
$sub->route('users.overview', trans('admin/mainMenu.usersOverview'), [], 30, ['icon' => 'fa fa-users']);
|
||||
}, 20, ['icon' => 'fa fa-users']);
|
||||
// $menu->route('admin.dashboard', trans('admin/mainMenu.dashboard'), [], 10, ['icon' => 'fa fa-fw fa-dashboard']);
|
||||
|
||||
/**
|
||||
* Content pages
|
||||
*
|
||||
* Submenus can be registered later
|
||||
*/
|
||||
$menu->dropdown(trans('admin/mainMenu.contentPages'), function ($sub) {
|
||||
$modules = \App\Models\Module::where('manages_content', true)
|
||||
->get();
|
||||
$sub->route('content.overview', trans('admin/mainMenu.contentPageOverview'), [], 9999, ['icon' => 'fa fa-fw fa-list']);
|
||||
}, 20, ['icon' => 'fa fa-fw fa-database']);
|
||||
|
||||
if (!empty($modules)) {
|
||||
$sub->dropdown(trans('admin/mainMenu.newContentPage'), function ($sub) use ($modules) {
|
||||
$i = 1;
|
||||
foreach ($modules as $module) {
|
||||
$sub->route('content.new', trans($module->name), ['moduleId' => $module->id], $i++);
|
||||
}
|
||||
}, 10, ['icon' => 'fa fa-plus']);
|
||||
}
|
||||
/**
|
||||
* File manager
|
||||
*/
|
||||
$menu->route('upload.overview', trans('admin/mainMenu.fileManager'), [], 40, ['icon' => 'fa fa-fw fa-folder']);
|
||||
|
||||
$sub->route('content.overview', trans('admin/mainMenu.contentPageOverview'), [], 20, ['icon' => 'fa fa-list']);
|
||||
}, 15, ['icon' => 'fa fa-database']);
|
||||
$menu->route('upload.overview', trans('admin/mainMenu.fileManager'), [], 30, ['icon' => 'fa fa-folder']);
|
||||
/**
|
||||
* Widgets and widget areas
|
||||
*/
|
||||
$menu->dropdown(trans('admin/mainMenu.widgets'), function ($sub) {
|
||||
// create list of all widget types
|
||||
$widgets = WidgetTypes::getWithTranslations();
|
||||
@@ -59,42 +56,61 @@ abstract class BaseHandler implements BaseModuleHandler
|
||||
foreach ($widgets as $type => $name) {
|
||||
$sub->route('widgets.new', $name, ['type' => $type], $i++);
|
||||
}
|
||||
}, 10, ['icon' => 'fa fa-plus']);
|
||||
}, 10, ['icon' => 'fa fa-fw fa-plus']);
|
||||
}
|
||||
|
||||
$sub->route('widgets.overview', trans('admin/mainMenu.widgetsOverview'), [], 20, ['icon' => 'fa fa-list']);
|
||||
$sub->route('widgets.overview', trans('admin/mainMenu.widgetsOverview'), [], 20, ['icon' => 'fa fa-fw fa-list']);
|
||||
|
||||
// menu for widget areas
|
||||
$sub->dropdown(trans('admin/mainMenu.widgetAreas'), function ($sub) {
|
||||
$sub->route('widgetareas.new', trans('admin/mainMenu.newWidgetArea'), [], 1, ['icon' => 'fa fa-plus']);
|
||||
$sub->route('widgetareas.overview', trans('admin/mainMenu.widgetAreaOverview'), [], 2, ['icon' => 'fa fa-list']);
|
||||
}, 50, ['icon' => 'fa fa-object-group']);
|
||||
}, 28, ['icon' => 'fa fa-gears']);
|
||||
$sub->route('widgetareas.new', trans('admin/mainMenu.newWidgetArea'), [], 1, ['icon' => 'fa fa-fw fa-plus']);
|
||||
$sub->route('widgetareas.overview', trans('admin/mainMenu.widgetAreaOverview'), [], 2, ['icon' => 'fa fa-fw fa-list']);
|
||||
}, 50, ['icon' => 'fa fa-fw fa-object-group']);
|
||||
}, 50, ['icon' => 'fa fa-fw fa-puzzle-piece']);
|
||||
|
||||
/**
|
||||
* Templates
|
||||
*/
|
||||
$templatePaths = TemplatePathsHumanReadableRootOnly::getWithTranslations();
|
||||
|
||||
if (!empty($templatePaths)) {
|
||||
$menu->dropdown(trans('admin/mainMenu.templates'), function ($sub) use ($templatePaths) {
|
||||
$i = 1;
|
||||
foreach ($templatePaths as $id => $name) {
|
||||
$sub->route('templates.overview', $name, ['id' => $id], $i++);
|
||||
}
|
||||
}, 29, ['icon' => 'fa fa-folder-open']);
|
||||
}, 60, ['icon' => 'fa fa-fw fa-file-code-o']);
|
||||
}
|
||||
// $menu->dropdown(trans('admin/mainMenu.customFields'), function ($sub) {
|
||||
// $sub->route('customfields.new', trans('admin/mainMenu.customFieldsNew'), [], 10, ['icon' => 'fa fa-code']);
|
||||
// $sub->route('customfields.overview', trans('admin/mainMenu.customFieldsOverview'), [], 50, ['icon' => 'fa fa-code-fork']);
|
||||
// }, 30, ['icon' => 'fa fa-code']);
|
||||
$menu->route('log.overview', trans('admin/mainMenu.actionLog'), [], 40, ['icon' => 'fa fa-history']);
|
||||
$menu->route('settings.overview', trans('admin/mainMenu.settings'), [], 50, ['icon' => 'fa fa-gear']);
|
||||
|
||||
/**
|
||||
* Divide system entries and other links in menu
|
||||
*/
|
||||
$menu->addDivider(9999);
|
||||
|
||||
$menu->dropdown(trans('admin/mainMenu.system'), function ($sub) {
|
||||
$sub->dropdown(trans('admin/mainMenu.userManagement'), function ($sub) {
|
||||
$sub->route('users.new', trans('admin/mainMenu.newUser'), [], 10, ['icon' => 'fa fa-fw fa-user-plus']);
|
||||
$sub->route('users.overview', trans('admin/mainMenu.usersOverview'), [], 30, ['icon' => 'fa fa-fw fa-users']);
|
||||
}, 20, ['icon' => 'fa fa-fw fa-users']);
|
||||
|
||||
// $menu->dropdown(trans('admin/mainMenu.customFields'), function ($sub) {
|
||||
// $sub->route('customfields.new', trans('admin/mainMenu.customFieldsNew'), [], 10, ['icon' => 'fa fa-fw fa-code']);
|
||||
// $sub->route('customfields.overview', trans('admin/mainMenu.customFieldsOverview'), [], 50, ['icon' => 'fa fa-fw fa-code-fork']);
|
||||
// }, 30, ['icon' => 'fa fa-fw fa-code']);
|
||||
|
||||
$sub->route('log.overview', trans('admin/mainMenu.actionLog'), [], 70, ['icon' => 'fa fa-fw fa-history']);
|
||||
$sub->route('settings.overview', trans('admin/mainMenu.settings'), [], 80, ['icon' => 'fa fa-fw fa-gear']);
|
||||
}, 10000, ['icon' => 'fa fa-fw fa-gear']);
|
||||
|
||||
|
||||
});
|
||||
|
||||
// order
|
||||
|
||||
// create menu with user profile
|
||||
\Menu::create('profileMenu', function ($menu) {
|
||||
$menu->route('users.detail', trans('admin/userManagement.profile'));
|
||||
$menu->route('logout', trans('admin/common.logout'));
|
||||
$menu->route('users.detail', trans('admin/userManagement.profile'), [], 10, ['icon' => 'fa fa-fw fa-user icon']);
|
||||
$menu->addDivider(999);
|
||||
$menu->route('logout', trans('admin/common.logout'), [], 1000, ['icon' => 'fa fa-fw fa-power-off icon']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,10 @@
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests;
|
||||
use App\Http\Requests\NewWidgetRequest;
|
||||
use App\Models\Widget;
|
||||
use App\Models\WidgetType;
|
||||
use App\Widgets\Exceptions\MissingParameterException;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class CreateNewWidget extends Controller
|
||||
{
|
||||
@@ -64,7 +61,7 @@ class CreateNewWidget extends Controller
|
||||
|
||||
// redirect with success notification
|
||||
return redirect()
|
||||
->route('widgets.new', ['type' => $type])
|
||||
->route('widgets.overview')
|
||||
->with('success', trans('admin/widgets.successfullyCreated'));
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,13 @@ use Illuminate\Support\Facades\Event;
|
||||
|
||||
class EditWidget extends Controller
|
||||
{
|
||||
/**
|
||||
* Render edit form
|
||||
*
|
||||
* @param $id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getEdit($id)
|
||||
{
|
||||
$widget = Widget::findOrFail($id);
|
||||
@@ -17,6 +24,14 @@ class EditWidget extends Controller
|
||||
return call_user_func([$presenter, 'renderEditForm'], $widget);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save changes into database
|
||||
*
|
||||
* @param EditWidgetRequest $request
|
||||
* @param $widget
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function postEdit(EditWidgetRequest $request, $widget)
|
||||
{
|
||||
// create new widget
|
||||
@@ -53,6 +68,25 @@ class EditWidget extends Controller
|
||||
->with('success', trans('admin/widgets.successfullyEdited'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes widget
|
||||
*
|
||||
* @param $id
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function deleteWidget($id) {
|
||||
// create new widget
|
||||
$widget = Widget::findOrFail($id);
|
||||
|
||||
$widget->delete();
|
||||
|
||||
// redirect with success notification
|
||||
return redirect()
|
||||
->route('widgets.overview')
|
||||
->with('success', trans('admin/widgets.successfullyDeleted'));
|
||||
}
|
||||
|
||||
private function invalidWidget($error)
|
||||
{
|
||||
return redirect()
|
||||
|
||||
@@ -176,6 +176,10 @@ Route::group([
|
||||
Route::get('widgets/edit/{id}', 'EditWidget@getEdit')
|
||||
->name('widgets.edit');
|
||||
|
||||
// delete widget settings
|
||||
Route::get('widgets/delete/{id}', 'EditWidget@deleteWidget')
|
||||
->name('widgets.delete');
|
||||
|
||||
Route::post('widgets/edit/{id}', 'EditWidget@postEdit')
|
||||
->name('widgets.postEdit');
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
namespace App\MenuPresenters;
|
||||
|
||||
use Pingpong\Menus\MenuItem;
|
||||
use Pingpong\Menus\Presenters\Presenter;
|
||||
|
||||
class ProfileMenuPresenter extends Presenter
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc }
|
||||
*/
|
||||
public function getOpenTagWrapper()
|
||||
{
|
||||
return PHP_EOL . '<div class="dropdown-menu profile-dropdown-menu">' . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc }
|
||||
*/
|
||||
public function getCloseTagWrapper()
|
||||
{
|
||||
return PHP_EOL . '</div>' . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc }
|
||||
*/
|
||||
public function getMenuWithoutDropdownWrapper($item)
|
||||
{
|
||||
return '<a href="' . $item->getUrl() . '" class="dropdown-item">' . $item->getIcon() . ' ' . $item->title . '</a>' . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc }
|
||||
*/
|
||||
public function getActiveState(MenuItem $item)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc }
|
||||
*/
|
||||
public function getDividerWrapper()
|
||||
{
|
||||
return '<div class="dropdown-divider"></div>' . PHP_EOL;
|
||||
}
|
||||
|
||||
public function getMultiLevelDropdownWrapper($item)
|
||||
{
|
||||
return null;//$this->getMenuWithDropDownWrapper($item);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc }
|
||||
*/
|
||||
public function getMenuWithDropDownWrapper($item)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,11 @@ class HtmlCode implements WidgetRenderer
|
||||
*/
|
||||
public static function renderAddForm(WidgetType $type)
|
||||
{
|
||||
return view('admin.widgets.htmlCode.new', ['type' => $type]);
|
||||
return view('admin.widgets.htmlCode.new', [
|
||||
'type' => $type,
|
||||
'widget' => new Widget(),
|
||||
'settings' => new \stdClass()
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@ return [
|
||||
'foundation-dropdown' => 'App\MenuPresenters\FoundationDropdownMenuPresenter',
|
||||
'foundation-dropdown-initialized' => 'App\MenuPresenters\FoundationInitializedDropdownMenuPresenter',
|
||||
'metismenu' => 'App\MenuPresenters\MetismenuPresenter',
|
||||
'profile-menu' => 'App\MenuPresenters\ProfileMenuPresenter',
|
||||
],
|
||||
'ordering' => true,
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class Categories extends BaseHandler
|
||||
$menu->dropdown(trans('categories::categories.name'), function ($sub) {
|
||||
$sub->route('categories.new', trans('categories::categories.new'), [], 10, ['icon' => 'fa fa-fw fa-plus']);
|
||||
$sub->route('categories.overview', trans('categories::categories.overview'), [], 30, ['icon' => 'fa fa-fw fa-tags']);
|
||||
}, 70, ['icon' => 'fa fa-fw fa-tags']);
|
||||
}, 55, ['icon' => 'fa fa-fw fa-tags']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -148,7 +148,9 @@ class ContactForm extends Handler
|
||||
{
|
||||
// register links in admin menu
|
||||
$menu = \Menu::instance('mainMenu');
|
||||
$menu->dropdown(trans('contactform::admin/adminMenu.contactForm'), function ($submenu) use ($user) {
|
||||
|
||||
$submenu = $menu->whereTitle(trans('admin/mainMenu.contentPages'));
|
||||
$submenu->dropdown(trans('contactform::admin/adminMenu.contactForm'), function ($submenu) use ($user) {
|
||||
$submenu->route('content.new', trans('contactform::admin/adminMenu.new'), ['moduleId' => self::getModuleId()], 10, ['icon' => 'fa fa-plus']);
|
||||
$submenu->route('content.overview', trans('contactform::admin/adminMenu.overview'), ['moduleId' => self::getModuleId()], 20, ['icon' => 'fa fa-list']);
|
||||
// $submenu->route('emails.sent', trans('contactform::admin/adminMenu.sentMessages'), [], 30, ['icon' => 'fa fa-send']);
|
||||
|
||||
@@ -185,7 +185,13 @@ class Gallery implements AppHandler
|
||||
*/
|
||||
public static function registerAdminMenu(User $user)
|
||||
{
|
||||
// nothing to register
|
||||
$menu = \Menu::instance('mainMenu');
|
||||
$submenu = $menu->whereTitle(trans('admin/mainMenu.contentPages'));
|
||||
$submenu->dropdown(trans('gallery::module.name'), function ($submenu) use ($user) {
|
||||
$submenu->route('content.new', trans('gallery::admin/adminMenu.new'), ['moduleId' => self::getModuleId()], 10, ['icon' => 'fa fa-plus']);
|
||||
$submenu->route('content.overview', trans('gallery::admin/adminMenu.overview'), ['moduleId' => self::getModuleId()], 20, ['icon' => 'fa fa-list']);
|
||||
// $submenu->route('emails.sent', trans('contactform::admin/adminMenu.sentMessages'), [], 30, ['icon' => 'fa fa-send']);
|
||||
}, 25, ['icon' => 'fa fa-camera']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
"new" => "Nová galerie",
|
||||
"overview" => "Všechny galerie",
|
||||
"templatePath" => "Šablony galerie",
|
||||
];
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
'templatePath' => 'Gallery templates'
|
||||
'templatePath' => 'Gallery templates',
|
||||
'new' => 'New gallery',
|
||||
'overview' => 'All galleries'
|
||||
];
|
||||
@@ -16,7 +16,9 @@ class StaticPage extends Handler
|
||||
|
||||
// register links in admin menu
|
||||
$menu = \Menu::instance('mainMenu');
|
||||
$menu->dropdown(trans('staticpages::adminMenu.staticPages'), function ($submenu) use ($user) {
|
||||
$submenu = $menu->whereTitle(trans('admin/mainMenu.contentPages'));
|
||||
|
||||
$submenu->dropdown(trans('staticpages::adminMenu.staticPages'), function ($submenu) use ($user) {
|
||||
$submenu->route('content.new', trans('staticpages::adminMenu.new'), ['moduleId' => self::getModuleId()], 10, ['icon' => 'fa fa-plus']);
|
||||
$submenu->route('content.overview', trans('staticpages::adminMenu.overview'), ['moduleId' => self::getModuleId()], 20, ['icon' => 'fa fa-list']);
|
||||
}, 15, ['icon' => 'fa fa-newspaper-o']);
|
||||
|
||||
+19
-1
@@ -14331,4 +14331,22 @@ img {
|
||||
left: -14px;
|
||||
right: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar .divider {
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.sidebar .nav > li > ul > li a {
|
||||
padding-left: 30px !important;
|
||||
}
|
||||
|
||||
.ace-editor-container {
|
||||
position: relative;
|
||||
}
|
||||
.ace-editor {
|
||||
position: absolute !important;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
@@ -1,49 +1,56 @@
|
||||
<?php
|
||||
return [
|
||||
"alreadyHomepage" => "Domovská stránka",
|
||||
"appearance" => "Vzhled",
|
||||
"basicInfo" => "Základní informace",
|
||||
"category" => "Kategorie",
|
||||
"content" => "Obsah stránky",
|
||||
"deletePage" => "Smazat",
|
||||
"edit" => "Editace :name",
|
||||
"editPlain" => "Editace",
|
||||
"field_meta_description" => "Popis stránky",
|
||||
"field_meta_keywords" => "Klíčová slova",
|
||||
"field_published_from" => "Publikováno od",
|
||||
"field_published_to" => "Publikováno do",
|
||||
"field_title" => "Titulek stránky",
|
||||
"field_url" => "URL",
|
||||
"files" => "Soubory",
|
||||
"homepageProtected" => "Domovská stránka je zobrazena jen pro přihlášené uživatele. Toto může i nemusí být chyba.",
|
||||
"homepageSetup" => "Domovská stránka úspěšně nastavena.",
|
||||
"invalidPage" => "Požadovaná stránka neexistuje.",
|
||||
"invalidStatus" => "Nelze změnit stav stránky na něco nedefinovaného.",
|
||||
"lockUrl" => "Zachovat URL?",
|
||||
"makeDraft" => "Převést na koncept",
|
||||
"makeProtected" => "Zobrazit jen pro přihlášené",
|
||||
"makePublic" => "Publikovat",
|
||||
"metaOptions" => "Meta informace",
|
||||
"new" => "Vytvořit nový :name",
|
||||
"noHomepage" => "Domovská stránka není nastavena (a nebo je nastavena jako Koncept)! Vyberte prosím jinou stránku, nebo stávající publikujte.",
|
||||
"noPagesAvailable" => "Nejsou dostupné žádné stránky. Pro zobrazení přehledu nejprve nějakou vytvořte.",
|
||||
"noParentPage" => "-- Nadřazená stránka nevybrána --",
|
||||
"nothingToEdit" => "Nebyly provedeny žádné změny, proto nedošlo k editaci.",
|
||||
"overview" => "Seznam všech obsahových stránek",
|
||||
"pageDeleted" => "Stránka :name (:url) úspěšně smazána.",
|
||||
"parentPage" => "Nadřazená stránka",
|
||||
"publicationOptions" => "Nastavení publikace",
|
||||
"save" => "Uložit",
|
||||
"setHomepage" => "Nastavit jako domovskou stránku",
|
||||
"showHistory" => "Historie (:count)",
|
||||
"statusChanged" => "Stav úspěšně změněn.",
|
||||
"status_deleted" => "Smazáno",
|
||||
"status_draft" => "Koncept",
|
||||
"status_protected" => "Jen pro přihlášené",
|
||||
"status_public" => "Veřejné",
|
||||
"successfullyCreated" => "Stránka úspěšně vytvořena",
|
||||
"successfullyEdited" => "Úprava úspěšně uložena.",
|
||||
"template" => "Šablona pro tuto stránku",
|
||||
"uploadTitleImage" => "Nahrát titulní obrázek",
|
||||
"viewPage" => "Zobrazit",
|
||||
"actions" => "Akce",
|
||||
"alreadyHomepage" => "Domovská stránka",
|
||||
"appearance" => "Vzhled",
|
||||
"basicInfo" => "Základní informace",
|
||||
"category" => "Kategorie",
|
||||
"content" => "Obsah stránky",
|
||||
"createdAt" => "Vytvořeno",
|
||||
"deletePage" => "Smazat",
|
||||
"edit" => "Editace :name",
|
||||
"editPlain" => "Editace",
|
||||
"field_meta_description" => "Popis stránky",
|
||||
"field_meta_keywords" => "Klíčová slova",
|
||||
"field_published_from" => "Publikováno od",
|
||||
"field_published_to" => "Publikováno do",
|
||||
"field_title" => "Titulek stránky",
|
||||
"field_url" => "URL",
|
||||
"files" => "Soubory",
|
||||
"homepageProtected" => "Domovská stránka je zobrazena jen pro přihlášené uživatele. Toto může i nemusí být chyba.",
|
||||
"homepageSetup" => "Domovská stránka úspěšně nastavena.",
|
||||
"invalidPage" => "Požadovaná stránka neexistuje.",
|
||||
"invalidStatus" => "Nelze změnit stav stránky na něco nedefinovaného.",
|
||||
"lockUrl" => "Zachovat URL?",
|
||||
"makeDraft" => "Převést na koncept",
|
||||
"makeProtected" => "Zobrazit jen pro přihlášené",
|
||||
"makePublic" => "Publikovat",
|
||||
"metaOptions" => "Meta informace",
|
||||
"moduleName" => "Modul",
|
||||
"new" => "Vytvořit nový :name",
|
||||
"noCategory" => "-- Žádná kategorie --",
|
||||
"noHomepage" => "Domovská stránka není nastavena (a nebo je nastavena jako Koncept)! Vyberte prosím jinou stránku, nebo stávající publikujte.",
|
||||
"noPagesAvailable" => "Nejsou dostupné žádné stránky. Pro zobrazení přehledu nejprve nějakou vytvořte.",
|
||||
"noParentPage" => "-- Nadřazená stránka nevybrána --",
|
||||
"noTemplates" => "Nelze vytvořit stránku. Pro tento modul neexistuje žádná šablona, která by šla použít pro vykreslení obsahu.",
|
||||
"nothingToEdit" => "Nebyly provedeny žádné změny, proto nedošlo k editaci.",
|
||||
"overview" => "Seznam všech obsahových stránek",
|
||||
"pageDeleted" => "Stránka :name (:url) úspěšně smazána.",
|
||||
"parentPage" => "Nadřazená stránka",
|
||||
"publicationOptions" => "Nastavení publikace",
|
||||
"save" => "Uložit",
|
||||
"setHomepage" => "Nastavit jako domovskou stránku",
|
||||
"showHistory" => "Historie (:count)",
|
||||
"status" => "Stav",
|
||||
"statusChanged" => "Stav úspěšně změněn.",
|
||||
"status_deleted" => "Smazáno",
|
||||
"status_draft" => "Koncept",
|
||||
"status_protected" => "Jen pro přihlášené",
|
||||
"status_public" => "Veřejné",
|
||||
"successfullyCreated" => "Stránka úspěšně vytvořena",
|
||||
"successfullyEdited" => "Úprava úspěšně uložena.",
|
||||
"template" => "Šablona pro tuto stránku",
|
||||
"title" => "Titulek",
|
||||
"uploadTitleImage" => "Nahrát titulní obrázek",
|
||||
"viewPage" => "Zobrazit",
|
||||
];
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
<?php
|
||||
return [
|
||||
"backToEdit" => "Zpět na editaci obsahu",
|
||||
"backToOverview" => "Zpět na přehled historie",
|
||||
"changedFromTo" => "Změna z <del>:from</del> na <ins>:to</ins>",
|
||||
"columnCategory" => "Kategorie",
|
||||
"columnFile" => "Přiřazené soubory",
|
||||
"columnIs_homepage" => "Domovská stránka",
|
||||
"columnMetaDescription" => "Popis",
|
||||
"columnMetaKeywords" => "Klíčová slova",
|
||||
"columnPageContent" => "Obsah stránky",
|
||||
"columnParentPage" => "Nadřazená stránka",
|
||||
"columnStatus" => "Viditelnost stránky",
|
||||
"columnTemplate" => "Šablona",
|
||||
"columnTitle" => "Titulek",
|
||||
"columnTitlePhotoFilename" => "Titulní obrázek",
|
||||
"columnUrl" => "URL",
|
||||
"deletedFile" => "Odebrán soubor <del>:file</del>.",
|
||||
"diff" => "Rozdíl",
|
||||
"diffPageName" => "Rozdíl v :column",
|
||||
"emptyValue" => "<em>nic</em>",
|
||||
"numOfChanges" => "Jedna změna|:count změny|:count změn",
|
||||
"pageName" => "Historie :name",
|
||||
"setupAsHomepage" => "Nastaveno jako domovská stránka",
|
||||
"uploadedFile" => "Nahrán soubor <ins>:file</ins>.",
|
||||
"backToEdit" => "Zpět na editaci obsahu",
|
||||
"backToOverview" => "Zpět na přehled historie",
|
||||
"changedAt" => "Změna z :time",
|
||||
"changedFromTo" => "Změna z <del>:from</del> na <ins>:to</ins>",
|
||||
"columnCategory" => "Kategorie",
|
||||
"columnFile" => "Přiřazené soubory",
|
||||
"columnIs_homepage" => "Domovská stránka",
|
||||
"columnMetaDescription" => "Popis",
|
||||
"columnMetaKeywords" => "Klíčová slova",
|
||||
"columnPageContent" => "Obsah stránky",
|
||||
"columnParentPage" => "Nadřazená stránka",
|
||||
"columnStatus" => "Viditelnost stránky",
|
||||
"columnTemplate" => "Šablona",
|
||||
"columnTitle" => "Titulek",
|
||||
"columnTitlePhotoFilename" => "Titulní obrázek",
|
||||
"columnUrl" => "URL",
|
||||
"deletedFile" => "Odebrán soubor <del>:file</del>.",
|
||||
"diff" => "Rozdíl",
|
||||
"diffPageName" => "Rozdíl v :column",
|
||||
"emptyValue" => "<em>nic</em>",
|
||||
"numOfChanges" => "Jedna změna|:count změny|:count změn",
|
||||
"pageName" => "Historie :name",
|
||||
"setupAsHomepage" => "Nastaveno jako domovská stránka",
|
||||
"uploadedFile" => "Nahrán soubor <ins>:file</ins>.",
|
||||
];
|
||||
|
||||
@@ -1,29 +1,30 @@
|
||||
<?php
|
||||
return [
|
||||
"actionLog" => "Záznam událostí",
|
||||
"assignWidgets" => "Přidat widget",
|
||||
"contentPageOverview" => "Přehled",
|
||||
"contentPages" => "Stránky",
|
||||
"customFields" => "Uživatelská pole",
|
||||
"customFieldsNew" => "Nové pole",
|
||||
"customFieldsOverview" => "Přehled",
|
||||
"dashboard" => "Nástěnka",
|
||||
"directories" => "Adresáře",
|
||||
"fileManager" => "Správce souborů",
|
||||
"newContentPage" => "Nová stránka",
|
||||
"newUser" => "Nový uživatel",
|
||||
"newWidget" => "Nový widget",
|
||||
"newWidgetArea" => "Nová plocha",
|
||||
"settings" => "Nastavení",
|
||||
"templates" => "Šablony",
|
||||
"uploadFile" => "Nový soubor",
|
||||
"uploadImage" => "Nový obrázek",
|
||||
"uploadedFiles" => "Přehled",
|
||||
"userDetail" => "Můj profil",
|
||||
"userManagement" => "Uživatelé",
|
||||
"usersOverview" => "Přehled",
|
||||
"widgetAreaOverview" => "Seznam všech ploch pro widgety",
|
||||
"widgetAreas" => "Plochy pro widgety",
|
||||
"widgets" => "Widgety",
|
||||
"widgetsOverview" => "Všechny widgety",
|
||||
"actionLog" => "Záznam událostí",
|
||||
"assignWidgets" => "Přidat widget",
|
||||
"contentPageOverview" => "Přehled",
|
||||
"contentPages" => "Stránky",
|
||||
"customFields" => "Uživatelská pole",
|
||||
"customFieldsNew" => "Nové pole",
|
||||
"customFieldsOverview" => "Přehled",
|
||||
"dashboard" => "Nástěnka",
|
||||
"directories" => "Adresáře",
|
||||
"fileManager" => "Správce souborů",
|
||||
"newContentPage" => "Nová stránka",
|
||||
"newUser" => "Nový uživatel",
|
||||
"newWidget" => "Nový widget",
|
||||
"newWidgetArea" => "Nová plocha",
|
||||
"settings" => "Nastavení",
|
||||
"system" => "Systém",
|
||||
"templates" => "Šablony",
|
||||
"uploadFile" => "Nový soubor",
|
||||
"uploadImage" => "Nový obrázek",
|
||||
"uploadedFiles" => "Přehled",
|
||||
"userDetail" => "Můj profil",
|
||||
"userManagement" => "Uživatelé",
|
||||
"usersOverview" => "Přehled",
|
||||
"widgetAreaOverview" => "Seznam všech ploch pro widgety",
|
||||
"widgetAreas" => "Plochy pro widgety",
|
||||
"widgets" => "Widgety",
|
||||
"widgetsOverview" => "Všechny widgety",
|
||||
];
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
<?php
|
||||
return [
|
||||
"addNewUser" => "Přidat nového uživatele",
|
||||
"allStatuses" => "Všechny",
|
||||
"detail" => "Detaily uživatele :name (:email)",
|
||||
"editUser" => "Editace uživatele :name (:email)",
|
||||
"email" => "E-mail",
|
||||
"name" => "Celé jméno",
|
||||
"noActions" => "Uživatel zatím v systému nic neudělal.",
|
||||
"noUsers" => "Žádní uživatelé.",
|
||||
"overview" => "Seznam všech uživatelů",
|
||||
"password" => "Heslo",
|
||||
"passwordLeaveEmpty" => "Nevyplňujte, pokud nechcete změnit heslo.",
|
||||
"profile" => "Profil uživatele",
|
||||
"register" => "Vytvořit uživatele",
|
||||
"registrationSuccessfull" => "Nový úživatel úspěšně přidán.",
|
||||
"role_admin" => "Administrátor",
|
||||
"role_editor" => "Editor",
|
||||
"role_visitor" => "Návštěvník",
|
||||
"roles" => "Prosím, zvolte roli uživatele",
|
||||
"status" => "Stav",
|
||||
"status_active" => "Aktivní",
|
||||
"status_blocked" => "Zablokovaný",
|
||||
"status_deleted" => "Smazaný",
|
||||
"update" => "Upravit informace",
|
||||
"userSuccessfullyEdited" => "Uživatel úspěšně upraven.",
|
||||
"usersActions" => "Akce uživatele",
|
||||
"addNewUser" => "Přidat nového uživatele",
|
||||
"allStatuses" => "Všechny",
|
||||
"detail" => "Detaily uživatele :name (:email)",
|
||||
"edit" => "Upravit uživatele",
|
||||
"editUser" => "Editace uživatele :name (:email)",
|
||||
"email" => "E-mail",
|
||||
"name" => "Celé jméno",
|
||||
"noActions" => "Uživatel zatím v systému nic neudělal.",
|
||||
"noUsers" => "Žádní uživatelé.",
|
||||
"overview" => "Seznam všech uživatelů",
|
||||
"password" => "Heslo",
|
||||
"passwordLeaveEmpty" => "Nevyplňujte, pokud nechcete změnit heslo.",
|
||||
"profile" => "Profil uživatele",
|
||||
"register" => "Vytvořit uživatele",
|
||||
"registrationSuccessfull" => "Nový úživatel úspěšně přidán.",
|
||||
"role_admin" => "Administrátor",
|
||||
"role_editor" => "Editor",
|
||||
"role_visitor" => "Návštěvník",
|
||||
"roles" => "Prosím, zvolte roli uživatele",
|
||||
"status" => "Stav",
|
||||
"status_active" => "Aktivní",
|
||||
"status_blocked" => "Zablokovaný",
|
||||
"status_deleted" => "Smazaný",
|
||||
"update" => "Upravit informace",
|
||||
"userDetail" => "Informace",
|
||||
"userSuccessfullyEdited" => "Uživatel úspěšně upraven.",
|
||||
"usersActions" => "Akce uživatele",
|
||||
];
|
||||
|
||||
@@ -8,6 +8,7 @@ return [
|
||||
"createdAt" => "Vytvořeno",
|
||||
"deleteAssociation" => "Odstranit",
|
||||
"description" => "Popis",
|
||||
"descriptionOfWidgets" => "Widgety se zobrazují v plochách pro widgety. Tyto plochy je možné umístit na libovolné místo na webu.",
|
||||
"edit" => "Upravit",
|
||||
"missingValue" => "Nelze uložit bez hodnoty pro pole :field",
|
||||
"name" => "Jméno",
|
||||
@@ -17,6 +18,7 @@ return [
|
||||
"successfullyAssociated" => "Widget úspěšně vložen do plochy",
|
||||
"successfullyCreated" => "Widget úspěšně vytvořen.",
|
||||
"successfullyDeassociated" => "Úspěšně odebrán widget z plochy",
|
||||
"successfullyDeleted" => "Widget úspěšně smazán",
|
||||
"successfullyEdited" => "Widget úspěšně upraven.",
|
||||
"unassociatedWidgets" => "Seznam nepřiřazených widgetů",
|
||||
"updatedAt" => "Poslední úprava",
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
return [
|
||||
"code" => "HTML kód",
|
||||
"containerClass" => "HTML třída pro obalový element tohoto widgetu",
|
||||
"createNew" => "Vytvořit nový HTML widget",
|
||||
"description" => "Popis",
|
||||
"edit" => "Edituji widget :name",
|
||||
"editExisting" => "Upravit widget",
|
||||
"name" => "Jméno",
|
||||
"new" => "Vytvořit nový HTML widget",
|
||||
"preview" => "Náhled",
|
||||
"successfullyEdited" => "Widget úspěšně upraven",
|
||||
"widgetDescription" => "Jednoduchý widget pro vkládání HTML kódu do obsahu stránky.",
|
||||
"widgetName" => "HTML kód",
|
||||
"code" => "HTML kód",
|
||||
"containerClass" => "HTML třída pro obalový element tohoto widgetu",
|
||||
"createNew" => "Vytvořit nový HTML widget",
|
||||
"description" => "Popis",
|
||||
"edit" => "Edituji widget :name",
|
||||
"editExisting" => "Upravit widget",
|
||||
"name" => "Jméno",
|
||||
"new" => "Vytvořit nový HTML widget",
|
||||
"preview" => "Náhled",
|
||||
"successfullyEdited" => "Widget úspěšně upraven",
|
||||
"widgetDescription" => "Jednoduchý widget pro vkládání HTML kódu do obsahu stránky.",
|
||||
"widgetName" => "HTML kód",
|
||||
'save' => 'Uložit'
|
||||
];
|
||||
|
||||
@@ -26,5 +26,6 @@ return [
|
||||
'contentPages' => 'Web content',
|
||||
'contentPageOverview' => 'Overview',
|
||||
'newContentPage' => 'New content',
|
||||
'directories' => 'Directories'
|
||||
'directories' => 'Directories',
|
||||
'system' => 'System',
|
||||
];
|
||||
@@ -21,6 +21,7 @@ return [
|
||||
'successfullyAssociated' => 'Association successfull',
|
||||
'associationDoesNotExists' => 'This association does not exist',
|
||||
'successfullyDeassociated' => 'Successfully removed from widget area',
|
||||
'widgetExists' => 'Widget :id already exists.'
|
||||
|
||||
'widgetExists' => 'Widget :id already exists.',
|
||||
'descriptionOfWidgets' => 'Widgets are displayed in widget areas.',
|
||||
'successfullyDeleted' => 'Widget successfully deleted'
|
||||
];
|
||||
@@ -11,5 +11,6 @@ return [
|
||||
'createNew' => 'Create new HTML code widget',
|
||||
'editExisting' => 'Update widget',
|
||||
'successfullyEdited' => 'Widget successfully modified',
|
||||
'preview' => 'Preview'
|
||||
'preview' => 'Preview',
|
||||
'save' => 'Save'
|
||||
];
|
||||
@@ -47,15 +47,16 @@
|
||||
style="background-image: url('{{Auth::user()->gravatar(40)}}')"></div>
|
||||
<span class="name">{{Auth::user()->getAttribute('name')}}</span>
|
||||
</a>
|
||||
<div class="dropdown-menu profile-dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||
<a class="dropdown-item" href="#"> <i class="fa fa-user icon"></i> Profile </a>
|
||||
<a class="dropdown-item" href="#"> <i class="fa fa-bell icon"></i> Notifications </a>
|
||||
<a class="dropdown-item" href="#"> <i class="fa fa-gear icon"></i> Settings </a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{{route('logout')}}"> <i
|
||||
class="fa fa-power-off icon"></i> Logout
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{!! Menu::render('profileMenu', 'profile-menu') !!}
|
||||
|
||||
{{--<div class="dropdown-menu profile-dropdown-menu" aria-labelledby="dropdownMenu1">--}}
|
||||
{{--<a class="dropdown-item" href="#"> <i class="fa fa-user icon"></i> Profile </a>--}}
|
||||
{{--<a class="dropdown-item" href="#"> <i class="fa fa-bell icon"></i> Notifications </a>--}}
|
||||
{{--<a class="dropdown-item" href="#"> <i class="fa fa-gear icon"></i> Settings </a>--}}
|
||||
{{--<div class="dropdown-divider"></div>--}}
|
||||
{{--<a class="dropdown-item" href="{{route('logout')}}"> <i class="fa fa-power-off icon"></i> Logout </a>--}}
|
||||
{{--</div>--}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="ace-editor-container large">
|
||||
<textarea class="ace-editor-textarea" name="{{$name}}" id="{{$name}}">{{$value}}</textarea>
|
||||
<textarea class="ace-editor-textarea" name="{{$name}}" id="{{$name}}" rows="5">{{$value}}</textarea>
|
||||
|
||||
<div class="ace-editor" id="{{$name}}Editor">{{$value}}</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/widgetAreas.edit', ['name' => $area->name]))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.area.form', ['action' => {{route('widgetareas.postEdit', ['id' => $area->id])}}])
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<form action="{{$action}}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<label>
|
||||
@lang('admin/widgetAreas.name')
|
||||
|
||||
<input type="text" name="name" value="{{$area->name}}" placeholder="@lang('admin/widgetAreas.name')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('name'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('name') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('admin/widgetAreas.code')
|
||||
|
||||
<input type="text" name="code" disabled="true" value="{{$area->code}}"
|
||||
placeholder="@lang('admin/widgetAreas.code')" />
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('admin/widgetAreas.description')
|
||||
|
||||
<textarea rows="3" name="description"
|
||||
placeholder="@lang('admin/widgetAreas.description')">{{$area->description}}</textarea>
|
||||
|
||||
@if (isset($errors) && $errors->has('description'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('description') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
|
||||
<button type="submit" class="button success">@lang('admin/widgetAreas.editButton')</button>
|
||||
</form>
|
||||
@@ -0,0 +1,7 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/widgetAreas.new'))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.area.form', ['action' => route('widgetareas.postNew')])
|
||||
@endsection
|
||||
@@ -0,0 +1,43 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/widgetAreas.overview'))
|
||||
|
||||
@section('content')
|
||||
<div class="column large-8">
|
||||
@if (count($areas) > 0)
|
||||
<table class="full-width">
|
||||
<tr>
|
||||
<th>@lang('admin/widgetAreas.name')</th>
|
||||
<th>@lang('admin/widgetAreas.code')</th>
|
||||
<th>@lang('admin/widgetAreas.description')</th>
|
||||
<th>@lang('admin/widgetAreas.actions')</th>
|
||||
</tr>
|
||||
@foreach($areas as $area)
|
||||
<tr>
|
||||
<td>{{$area->name}}</td>
|
||||
<td>{{$area->code}}</td>
|
||||
<td>{{str_limit($area->description, 100)}}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{route('widgets.associate', ['widgetArea' => $area->id])}}"><i class="fa fa-plus"></i></a>
|
||||
<a href="{{route('widgetareas.edit', ['id' => $area->id])}}"><i class="fa fa-edit"></i></a>
|
||||
<a href="{{route('widgetareas.delete', ['id' => $area->id])}}"><i
|
||||
class="fa fa-remove confirm"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@else
|
||||
<em>@lang('admin/widgetAreas.noEntries')</em>
|
||||
@endif
|
||||
</div>
|
||||
<div class="column large-4">
|
||||
<h3>@lang('admin/widgetAreas.new')</h3>
|
||||
|
||||
@include('admin.widgets.area.newForm', ['hideMessages' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row pagination">
|
||||
{!! $areas->render() !!}
|
||||
</div>
|
||||
@stop
|
||||
@@ -0,0 +1,79 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@section('pageName', @trans('admin/widgets.overview'))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
|
||||
@if (session('success'))
|
||||
<div class="callout success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div class="callout alert">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="column large-9 tile-overview" data-equalizer>
|
||||
|
||||
<h2>@lang('admin/widgets.overview')</h2>
|
||||
|
||||
@forelse($widgets as $widget)
|
||||
<div class="column large-4">
|
||||
<div class="item" data-equalizer-watch>
|
||||
<h4>{{str_limit($widget->name, 20)}}</h4>
|
||||
<p>
|
||||
{{trans(call_user_func([$widget->widget_type_handler, 'getName']))}}
|
||||
</p>
|
||||
<p>
|
||||
{{str_limit($widget->description, 150)}}
|
||||
</p>
|
||||
|
||||
<div class="controls row text-center">
|
||||
<a href="{{route('widgets.edit', ['id' => $widget->id])}}" class="button column large-6 primary"><i class="fa fa-edit"></i></a>
|
||||
|
||||
@if (in_array($widget->id, $associatedWidgetIds))
|
||||
<a href="{{route('widgets.deleteAssociation', ['widgetId' => $widget->id, 'widgetArea' => $widgetArea->id])}}"
|
||||
class="button column confirm large-6 alert">
|
||||
<i class="fa fa-remove"></i>
|
||||
</a>
|
||||
@else
|
||||
<a href="{{route('widgets.makeAssociation', ['widgetId' => $widget->id, 'widgetArea' => $widgetArea->id])}}"
|
||||
class="button column large-6 success"><i class="fa fa-plus"></i></a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<em>@lang('admin/widgets.noEntries')</em>
|
||||
@endforelse
|
||||
|
||||
<div class="row">
|
||||
{!! $widgets->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="column large-3">
|
||||
<h2>{{$widgetArea->name}}</h2>
|
||||
|
||||
<p>
|
||||
{{$widgetArea->description}}
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>@lang('admin/widgets.createdAt'): {{$widgetArea->created_at}}</li>
|
||||
<li>@lang('admin/widgets.updatedAt'): {{$widgetArea->updated_at}}</li>
|
||||
</ul>
|
||||
|
||||
<a href="{{route('widgetareas.edit', ['id' => $widgetArea->id])}}">@lang('admin/widgetAreas.editButton')</a>
|
||||
|
||||
@if (!empty($associatedWidgetIds))
|
||||
<h3>@lang('admin/widgets.preview')</h3>
|
||||
|
||||
@widgetArea($widgetArea->code)
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@@ -0,0 +1,15 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('widgets/htmlCode.edit', ['name' => $widget->name]))
|
||||
|
||||
@section('content')
|
||||
<div class="col-lg-8">
|
||||
@include('admin.widgets.htmlCode.form', ['action' => route('widgets.postEdit', ['id' => $widget->id])])
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h3>@lang('widgets/htmlCode.preview')</h3>
|
||||
|
||||
@widgetPreview($widget)
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<form action="{{$action}}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<label class="label-control">
|
||||
@lang('widgets/htmlCode.name')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="name" value="{{old('name', $widget->name)}}"
|
||||
placeholder="@lang('widgets/htmlCode.name')" />
|
||||
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/htmlCode.description')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="description" placeholder="@lang('widgets/htmlCode.description')"
|
||||
value="{{old('description', $widget->description)}}" />
|
||||
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/htmlCode.containerClass')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="containerClass" placeholder="@lang('widgets/htmlCode.containerClass')"
|
||||
value="{{old('containerClass', isset($settings->containerClass) ? $settings->containerClass : '')}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/htmlCode.code')
|
||||
</label>
|
||||
|
||||
@include('admin.snippets.aceEditor', [
|
||||
'name' => 'code',
|
||||
'value' => old('code', isset($settings->code) ? $settings->code : ''),
|
||||
'theme' => 'xcode',
|
||||
'mode' => 'html'
|
||||
])
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@lang('widgets/htmlCode.save')
|
||||
</button>
|
||||
</form>
|
||||
@@ -0,0 +1,9 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('widgets/htmlCode.new'))
|
||||
@section('pageDescription', @trans($type->description))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.htmlCode.form', ['action' => route('widgets.postNew', ['type' => $type])])
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@section('pageName', @trans('widgets/menu.edit', ['name' => $widget->name]))
|
||||
|
||||
@section('content')
|
||||
<h1>@lang('widgets/menu.edit', ['name' => $widget->name])</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="column large-8">
|
||||
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postEdit', ['id' => $widget->id])])
|
||||
|
||||
</div>
|
||||
<div class="column large-4">
|
||||
<h3>@lang('widgets/menu.preview')</h3>
|
||||
|
||||
@widgetPreview($widget)
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
@if (!isset($hideMessages))
|
||||
@if (session('success'))
|
||||
<div class="callout success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div class="callout alert">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<form action="{{$formAction}}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<label>
|
||||
@lang('widgets/menu.name')
|
||||
|
||||
<input type="text" name="name" value="{{old("name", $widget->name)}}" placeholder="@lang('widgets/menu.name')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('name'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('name') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('widgets/menu.description')
|
||||
|
||||
<input type="text" name="description" placeholder="@lang('widgets/menu.description')"
|
||||
value="{{old("description", $widget->description)}}" />
|
||||
|
||||
@if (isset($errors) && $errors->has('description'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('description') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
|
||||
<textarea name="moduleSettings" id="menuConfig">{}</textarea>
|
||||
|
||||
<button type="submit" class="button success">@lang('widgets/menu.createNew')</button>
|
||||
</form>
|
||||
|
||||
|
||||
<ul class="tabs" data-tabs id="createMenu">
|
||||
@foreach($extensions as $extension)
|
||||
<li class="tabs-title @if($extension->getId() == reset($extensions)->getId()) is-active @endif">
|
||||
<a href="#{{$extension->getId()}}" @if($extension->getId() == reset($extensions)->getId()) aria-selected="true" @endif>
|
||||
{{trans($extension->getName())}}
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<div class="tabs-content" data-tabs-content="createMenu">
|
||||
@foreach($extensions as $extension)
|
||||
<div class="tabs-panel @if($extension->getId() == reset($extensions)->getId()) is-active @endif" id="{{$extension->getId()}}">
|
||||
<h4>{{$extension->getName()}}</h4>
|
||||
<p>{{$extension->getDescription()}}</p>
|
||||
|
||||
<form action="#" id="menuItem-{{$extension->getId()}}" class="menuItems" data-extension="{{$extension->getId()}}">
|
||||
@include($extension->getFormExtensionTemplate())
|
||||
|
||||
<div class="row">
|
||||
<button class="button" type="submit"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@section('javascripts')
|
||||
<script type="text/javascript">
|
||||
$('.menuItems').submit(function () {
|
||||
var id = $(this).data('extension');
|
||||
var existingSettings = {};
|
||||
|
||||
try {
|
||||
existingSettings = JSON.parse ($ ('#menuConfig').val ());
|
||||
} catch (err) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
$(this).find(':input').each(function () {
|
||||
var name = $(this).attr('name');
|
||||
var value = $(this).val();
|
||||
|
||||
alert('name: '+name+", value: "+value);
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,10 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@section('pageName', @trans('widgets/menu.new'))
|
||||
|
||||
@section('content')
|
||||
<h1>@lang('widgets/menu.new')</h1>
|
||||
|
||||
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postNew', ['type' => $type])])
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<label>
|
||||
@lang('widgets.url')
|
||||
|
||||
<input type="text" name="url" id="urlField"/>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('widgets.anchor')
|
||||
|
||||
<input type="text" name="anchor" id="anchorField"/>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('widgets.openInNewWindow')
|
||||
|
||||
<input type="checkbox" checked="checked" name="openInNewWindow" id="openInNewWindowField"/>
|
||||
</label>
|
||||
@@ -0,0 +1,18 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('widgets/menu.edit', ['name' => $widget->name]))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postEdit', ['id' => $widget->id])])
|
||||
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h3>@lang('widgets/menu.preview')</h3>
|
||||
|
||||
@widgetPreview($widget)
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<form action="{{$formAction}}" id="widget-menu" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="settings" id="widgetSettings" value="{{json_encode($widget->settingsObj->links)}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/menu.name')
|
||||
</label>
|
||||
<input class="form-control" required type="text" name="name" value="{{old("name", $widget->name)}}"
|
||||
placeholder="@lang('widgets/menu.name')" />
|
||||
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/menu.description')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="description" placeholder="@lang('widgets/menu.description')"
|
||||
value="{{old("description", $widget->description)}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/menu.containerClass')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="containerClass" placeholder="@lang('widgets/menu.containerClass')"
|
||||
value="{{old("containerClass")}}" />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<h3>@lang('widgets/menu.addedPages')</h3>
|
||||
|
||||
<div id="menu-items-container">
|
||||
@foreach($widget->settingsObj->links as $pageId => $details)
|
||||
<span class="btn btn-sm btn-info" data-page-id="{{$pageId}}"
|
||||
id="item-{{$pageId}}">{{$details->text}}</span>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<h3>@lang('widgets/menu.availablePages')</h3>
|
||||
|
||||
@foreach ($pages as $page)
|
||||
<a href="#"
|
||||
class="btn btn-sm menu-item @if(isset($widget->settingsObj->links->{$page->id})) btn-secondary @else btn-info @endif "
|
||||
data-page-url="{{$page->url}}" data-page-id="{{$page->id}}"
|
||||
id="page-{{$page->id}}">{{$page->title}}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary">@lang('widgets/menu.save')</button>
|
||||
</form>
|
||||
|
||||
|
||||
@section('javascripts')
|
||||
<script type="text/javascript">
|
||||
$ ('#widget-menu').submit (function () {
|
||||
var items = {};
|
||||
var i = 0;
|
||||
$ ('#menu-items-container').children ().each (function () {
|
||||
var id = $ (this).data ('page-id');
|
||||
items[id] = {
|
||||
id: id,
|
||||
type: 'content',
|
||||
text: $ (this).text (),
|
||||
order: i++,
|
||||
children: {}
|
||||
};
|
||||
});
|
||||
|
||||
// check if menu is not empty
|
||||
if (i == 0) {
|
||||
alert ('@lang('widgets/menu.noLinks')');
|
||||
return false;
|
||||
}
|
||||
|
||||
$ ('#widgetSettings').val (JSON.stringify (items));
|
||||
});
|
||||
|
||||
$ ('.menu-item').click (function () {
|
||||
var url = $ (this).data ('page-url');
|
||||
var text = $ (this).text ();
|
||||
var id = $ (this).data ('page-id');
|
||||
|
||||
if ($ (this).hasClass ('btn-secondary')) {
|
||||
// remove
|
||||
$ ('#item-' + id).remove ();
|
||||
|
||||
$ (this).addClass ('btn-info');
|
||||
$ (this).removeClass ('btn-secondary')
|
||||
} else {
|
||||
// add
|
||||
$ ('#menu-items-container').append ('<span class="btn btn-sm btn-info" id="item-' + id + '" data-page-id="' + id + '">' + text + '</span> ');
|
||||
$ (this).addClass ('btn-secondary');
|
||||
$ (this).removeClass ('btn-info');
|
||||
}
|
||||
|
||||
// distinguish between added and not-added page
|
||||
$ (this).toggleClass ('secondary');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,7 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', trans('widgets/menu.new'))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postNew', ['type' => $type])])
|
||||
@endsection
|
||||
@@ -0,0 +1,8 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('widgets/orbitSlider.edit', ['name' => $widget->name]))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.orbitSlider.form', ['formAction' => route('widgets.postEdit', ['id' => $widget->id])])
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<form action="{{$formAction}}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.name')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="name" value="{{old('name', $widget->name)}}"
|
||||
placeholder="@lang('widgets/orbitSlider.name')" />
|
||||
|
||||
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.description')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="description" placeholder="@lang('widgets/orbitSlider.description')"
|
||||
value="{{old('description', $widget->description)}}" />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-10">
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.imagesPerSlide')
|
||||
</label>
|
||||
|
||||
<select class="form-control" name="imagePerSlide">
|
||||
@foreach($availableColumns as $value => $name)
|
||||
<option value="{{$value}}"
|
||||
@if (old('imagePerSlide', $settings->imagePerSlide) == $value) selected="selected" @endif>
|
||||
{{$name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 text-center">
|
||||
<label>
|
||||
<input class="checkbox" value="1" id="displayBullets"
|
||||
@if(old('displayBullets', $settings->displayBullets)) checked
|
||||
@endif name="displayBullets" type="checkbox">
|
||||
<span>@lang('widgets/orbitSlider.displayBullets')</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h4>@lang('widgets/orbitSlider.extraSettings')</h4>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.containerClass')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="containerClass"
|
||||
placeholder="@lang('widgets/orbitSlider.containerClass')"
|
||||
value="{{old('containerClass', $settings->sliderClass)}}" />
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.slideContainerClass')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="slideContainerClass"
|
||||
placeholder="@lang('widgets/orbitSlider.slideContainerClass')"
|
||||
value="{{old('slideContainerClass', $settings->slideContainerClass)}}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.code')
|
||||
</label>
|
||||
|
||||
@include('admin.snippets.aceEditor', [
|
||||
'name' => 'code',
|
||||
'value' => old('code', isset($settings->code) ? $settings->code : ''),
|
||||
'theme' => 'xcode',
|
||||
'mode' => 'html'
|
||||
])
|
||||
|
||||
@if($settings->directoryId)
|
||||
<div class="row column text-center">
|
||||
<a href="{{route('upload.overview', ['id' => $settings->directoryId])}}"
|
||||
class="button expanded large success">@lang('widgets/orbitSlider.upload')</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary">@lang('widgets/orbitSlider.editExisting')</button>
|
||||
@@ -0,0 +1,10 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@section('pageName', @trans('widgets/htmlCode.new'))
|
||||
|
||||
@section('content')
|
||||
<h1>@lang('widgets/orbitSlider.new')</h1>
|
||||
|
||||
@include('admin.widgets.orbitSlider.form', ['formAction' => route('widgets.postNew', ['type' => $type])])
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/widgets.overview'))
|
||||
@section('pageDescription', @trans('admin/widgets.descriptionOfWidgets'))
|
||||
|
||||
@section('content')
|
||||
@if (count($widgets))
|
||||
<table class="table table-striped full-width">
|
||||
<tr>
|
||||
<th>@lang('admin/widgets.widgetType')</th>
|
||||
<th>@lang('admin/widgets.name')</th>
|
||||
<th>@lang('admin/widgets.description')</th>
|
||||
<th>@lang('admin/widgets.actions')</th>
|
||||
</tr>
|
||||
@foreach($widgets as $widget)
|
||||
<tr>
|
||||
<td>{{trans(call_user_func([$widget->widget_type_handler, 'getName']))}}</td>
|
||||
<td><a href="{{route('widgets.edit', ['id' => $widget->id])}}">{{$widget->name}}</a></td>
|
||||
<td>{{$widget->description}}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{route('widgets.edit', ['id' => $widget->id])}}"><i class="fa fa-fw fa-pencil"></i></a>
|
||||
<a href="{{route('widgets.delete', ['id' => $widget->id])}}"><i class="fa fa-fw remove fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
{!! $widgets->render() !!}
|
||||
@else
|
||||
<div class="alert alert-info">
|
||||
<em>@lang('admin/widgets.noEntries')</em>
|
||||
</div>
|
||||
@endif
|
||||
@stop
|
||||
Reference in New Issue
Block a user