Merge branch 'dev' into doucovanineratovice.cz
This commit is contained in:
@@ -27,6 +27,7 @@ class Files extends Search
|
|||||||
$token = $this->tokenize($term);
|
$token = $this->tokenize($term);
|
||||||
|
|
||||||
return File::where('original_filename', 'LIKE', $token)
|
return File::where('original_filename', 'LIKE', $token)
|
||||||
|
->orWhere('name', 'LIKE', $token)
|
||||||
->orWhere('keywords', 'LIKE', $token)
|
->orWhere('keywords', 'LIKE', $token)
|
||||||
->orWhere('description', 'LIKE', $token)
|
->orWhere('description', 'LIKE', $token)
|
||||||
->orWhere('mime_type', 'LIKE', $token)
|
->orWhere('mime_type', 'LIKE', $token)
|
||||||
|
|||||||
@@ -46,4 +46,12 @@ class CurrentTemplate
|
|||||||
|
|
||||||
return $template->handler;
|
return $template->handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset currently set template and load another one on next call of get() method.
|
||||||
|
*/
|
||||||
|
public static function reset()
|
||||||
|
{
|
||||||
|
self::$initialized = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -149,12 +149,12 @@ class CreateNewContent extends Controller
|
|||||||
|
|
||||||
$page->title_photo = $file ? $file['filename'] : null;
|
$page->title_photo = $file ? $file['filename'] : null;
|
||||||
|
|
||||||
// let template to modify request and content page
|
|
||||||
call_user_func_array([CurrentTemplate::handler(), 'beforeSave'], [&$page, $request]);
|
|
||||||
|
|
||||||
// save module-specific stuff
|
// save module-specific stuff
|
||||||
call_user_func_array([$module->handler, 'createNew'], [&$page, $request]);
|
call_user_func_array([$module->handler, 'createNew'], [&$page, $request]);
|
||||||
|
|
||||||
|
// let template to modify request and content page
|
||||||
|
call_user_func_array([CurrentTemplate::handler(), 'beforeSave'], [&$page, $request]);
|
||||||
|
|
||||||
// save content of page before (possible) uploading related files
|
// save content of page before (possible) uploading related files
|
||||||
$page->save();
|
$page->save();
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class EditContent extends Controller
|
|||||||
|
|
||||||
// something was changed, inform user
|
// something was changed, inform user
|
||||||
return redirect()
|
return redirect()
|
||||||
->route('content.edit', ['id' => $page->id])
|
->route('content.overview')
|
||||||
->with('success', trans('admin/contents.successfullyEdited'));
|
->with('success', trans('admin/contents.successfullyEdited'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class EditUser extends Controller
|
|||||||
Event::fire(new EditUserEvent($user));
|
Event::fire(new EditUserEvent($user));
|
||||||
|
|
||||||
return redirect()
|
return redirect()
|
||||||
->route('users.detail', ['id' => $id])
|
->back()
|
||||||
->with('success', trans('admin/userManagement.userSuccessfullyEdited'));
|
->with('success', trans('admin/userManagement.userSuccessfullyEdited'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,6 @@ class CreateNewContentRequest extends Request
|
|||||||
'titlePhoto' => 'image',
|
'titlePhoto' => 'image',
|
||||||
'title' => 'required',
|
'title' => 'required',
|
||||||
'url' => 'required|unique:contents,url',
|
'url' => 'required|unique:contents,url',
|
||||||
'template' => 'required|exists:templates,template_name',
|
|
||||||
'status' => 'required|in:draft,protected,public',
|
'status' => 'required|in:draft,protected,public',
|
||||||
'title_photo' => 'exists:files,id',
|
'title_photo' => 'exists:files,id',
|
||||||
'parentPage' => 'exists:contents,id',
|
'parentPage' => 'exists:contents,id',
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ class EditContentRequest extends Request
|
|||||||
return [
|
return [
|
||||||
'title' => 'required',
|
'title' => 'required',
|
||||||
'url' => 'required|unique:contents,url,' . $this->id,
|
'url' => 'required|unique:contents,url,' . $this->id,
|
||||||
'template' => 'required|exists:templates,template_name',
|
|
||||||
'published_from' => 'date',
|
'published_from' => 'date',
|
||||||
'published_to' => 'date',
|
'published_to' => 'date',
|
||||||
'title_photo' => 'exists:files,id',
|
'title_photo' => 'exists:files,id',
|
||||||
|
|||||||
@@ -2,13 +2,14 @@
|
|||||||
namespace Modules\ContactForm\Handlers;
|
namespace Modules\ContactForm\Handlers;
|
||||||
|
|
||||||
use App\Enumerations\ModulesHandlerToId;
|
use App\Enumerations\ModulesHandlerToId;
|
||||||
|
use App\Handlers\Contracts\ContentTitles;
|
||||||
use App\Handlers\Handler;
|
use App\Handlers\Handler;
|
||||||
use App\Http\Controllers\Admin\Contents\EditContent;
|
use App\Http\Controllers\Admin\Contents\EditContent;
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
use App\Models\Content;
|
use App\Models\Content;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
|
||||||
class ContactForm extends Handler
|
class ContactForm extends Handler implements ContentTitles
|
||||||
{
|
{
|
||||||
public static function getHistoryHandler()
|
public static function getHistoryHandler()
|
||||||
{
|
{
|
||||||
@@ -29,7 +30,7 @@ class ContactForm extends Handler
|
|||||||
$settings = [
|
$settings = [
|
||||||
'phone' => $request->phone,
|
'phone' => $request->phone,
|
||||||
'email' => $request->email,
|
'email' => $request->email,
|
||||||
'contactEmail' => $request->ContactEmail,
|
'contactEmail' => $request->contactEmail,
|
||||||
'subject' => $request->subject,
|
'subject' => $request->subject,
|
||||||
'companyName' => $request->companyName,
|
'companyName' => $request->companyName,
|
||||||
'address' => $request->address,
|
'address' => $request->address,
|
||||||
@@ -171,4 +172,38 @@ class ContactForm extends Handler
|
|||||||
{
|
{
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get translated title for pages overview of given type.
|
||||||
|
*
|
||||||
|
* This value is used for rendering list of all content pages of given type in administration.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getOverviewTitle()
|
||||||
|
{
|
||||||
|
return trans('contactform::module.allForms');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Title displayed above for for creating new content page
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getCreateNewTitle()
|
||||||
|
{
|
||||||
|
return trans('contactform::module.newForm');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Title for form displayed for editin content page
|
||||||
|
*
|
||||||
|
* @param Content $content
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public static function getEditTitle(Content $content)
|
||||||
|
{
|
||||||
|
return trans('contactform::module.editForm');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
|
"allForms" => "Všechny formuláře",
|
||||||
"description" => "Jednoduchý kontaktní formulář",
|
"description" => "Jednoduchý kontaktní formulář",
|
||||||
|
"editForm" => "Upravuji formulář",
|
||||||
"name" => "Kontaktní formulář",
|
"name" => "Kontaktní formulář",
|
||||||
|
"newForm" => "Vytvořit nový kontaktní formulář",
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'name' => 'Contact form',
|
'name' => 'Contact form',
|
||||||
'description' => 'Simple contact form'
|
'description' => 'Simple contact form',
|
||||||
|
'allForms' => 'All contact forms',
|
||||||
|
'newForm' => 'Create new contact form',
|
||||||
|
'editForm' => 'Editing contact form'
|
||||||
];
|
];
|
||||||
@@ -2,13 +2,14 @@
|
|||||||
namespace Modules\StaticPages\Handlers;
|
namespace Modules\StaticPages\Handlers;
|
||||||
|
|
||||||
use App\Enumerations\ModulesHandlerToId;
|
use App\Enumerations\ModulesHandlerToId;
|
||||||
|
use App\Handlers\Contracts\ContentTitles;
|
||||||
use App\Handlers\Handler;
|
use App\Handlers\Handler;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
use App\Models\Content;
|
use App\Models\Content;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
|
||||||
class StaticPage extends Handler
|
class StaticPage extends Handler implements ContentTitles
|
||||||
{
|
{
|
||||||
public static function registerAdminMenu(User $user)
|
public static function registerAdminMenu(User $user)
|
||||||
{
|
{
|
||||||
@@ -97,4 +98,39 @@ class StaticPage extends Handler
|
|||||||
{
|
{
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get translated title for pages overview of given type.
|
||||||
|
*
|
||||||
|
* This value is used for rendering list of all content pages of given type in administration.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getOverviewTitle()
|
||||||
|
{
|
||||||
|
return trans('staticpages::module.allPages');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Title displayed above for for creating new content page
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getCreateNewTitle()
|
||||||
|
{
|
||||||
|
return trans('staticpages::module.newPage');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Title for form displayed for editin content page
|
||||||
|
*
|
||||||
|
* @param Content $content
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public static function getEditTitle(Content $content)
|
||||||
|
{
|
||||||
|
return trans('staticpages::module.editPage');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
|
"allPages" => "Všechny statické stránky",
|
||||||
"description" => "Statické stránky jsou určeny k zobrazování statického obsahu na stránkách.",
|
"description" => "Statické stránky jsou určeny k zobrazování statického obsahu na stránkách.",
|
||||||
|
"editPage" => "Upravuji statickou stránku",
|
||||||
"name" => "Statické stránky",
|
"name" => "Statické stránky",
|
||||||
|
"newPage" => "Vytvářím novou stránku",
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'name' => 'Static pages',
|
'name' => 'Static pages',
|
||||||
'description' => 'Static pages are intended for displaying static content on webpage.'
|
'description' => 'Static pages are intended for displaying static content on webpage.',
|
||||||
|
'allPages' => 'All static pages',
|
||||||
|
'editPage' => 'Editing static page',
|
||||||
|
'newPage' => 'Create new static page'
|
||||||
];
|
];
|
||||||
+83
@@ -14407,4 +14407,87 @@ img {
|
|||||||
|
|
||||||
.card.file-preview .card-block img {
|
.card.file-preview .card-block img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.25em 0.4em;
|
||||||
|
font-size: 75%;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
vertical-align: baseline;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn .tag {
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.tag:focus, a.tag:hover {
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-pill {
|
||||||
|
padding-right: 0.6em;
|
||||||
|
padding-left: 0.6em;
|
||||||
|
border-radius: 10rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-default {
|
||||||
|
background-color: #818a91;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-default[href]:focus, .tag-default[href]:hover {
|
||||||
|
background-color: #687077;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-primary {
|
||||||
|
background-color: #0275d8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-primary[href]:focus, .tag-primary[href]:hover {
|
||||||
|
background-color: #025aa5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-success {
|
||||||
|
background-color: #5cb85c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-success[href]:focus, .tag-success[href]:hover {
|
||||||
|
background-color: #449d44;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-info {
|
||||||
|
background-color: #5bc0de;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-info[href]:focus, .tag-info[href]:hover {
|
||||||
|
background-color: #31b0d5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-warning {
|
||||||
|
background-color: #f0ad4e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-warning[href]:focus, .tag-warning[href]:hover {
|
||||||
|
background-color: #ec971f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-danger {
|
||||||
|
background-color: #d9534f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-danger[href]:focus, .tag-danger[href]:hover {
|
||||||
|
background-color: #c9302c;
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@ return [
|
|||||||
"assignWidget" => "Přiřadil widget :widgetName (#:widgetId) do plochy :widgetAreaName (#:widgetAreaId)",
|
"assignWidget" => "Přiřadil widget :widgetName (#:widgetId) do plochy :widgetAreaName (#:widgetAreaId)",
|
||||||
"changeSettings" => "Změna nastavení",
|
"changeSettings" => "Změna nastavení",
|
||||||
"createNewContent" => "Vytvořena nová obsahová stránka. Titulek <strong>:title</strong>, url :url a ID #:id",
|
"createNewContent" => "Vytvořena nová obsahová stránka. Titulek <strong>:title</strong>, url :url a ID #:id",
|
||||||
|
"createUser" => "Vytvořen nový uživatel :name s e-mailem :email.",
|
||||||
"deleteContent" => 'Smazána stránka ":title", url "url a ID #:id. Tato změna je zaznamenána v revizi :revision.',
|
"deleteContent" => 'Smazána stránka ":title", url "url a ID #:id. Tato změna je zaznamenána v revizi :revision.',
|
||||||
"deleteCustomField" => "a",
|
"deleteCustomField" => "a",
|
||||||
"deleteWidgetArea" => "Smazal plochu pro widget :name",
|
"deleteWidgetArea" => "Smazal plochu pro widget :name",
|
||||||
@@ -18,6 +19,7 @@ return [
|
|||||||
"nameAssignWidget" => "Přiřazení widgetu",
|
"nameAssignWidget" => "Přiřazení widgetu",
|
||||||
"nameChangeSettings" => "Změna nastavení",
|
"nameChangeSettings" => "Změna nastavení",
|
||||||
"nameCreateNewContent" => "Vytvoření nové stránky",
|
"nameCreateNewContent" => "Vytvoření nové stránky",
|
||||||
|
"nameCreateUser" => "Vytvořen uživatel",
|
||||||
"nameDeleteContent" => "Smazání stránky",
|
"nameDeleteContent" => "Smazání stránky",
|
||||||
"nameDeleteCustomField" => "Smazání uživatelského pole",
|
"nameDeleteCustomField" => "Smazání uživatelského pole",
|
||||||
"nameDeleteWidgetArea" => "Smazání plochy pro widgety",
|
"nameDeleteWidgetArea" => "Smazání plochy pro widgety",
|
||||||
|
|||||||
@@ -38,5 +38,5 @@ return [
|
|||||||
"updatedAt" => "Poslední změna",
|
"updatedAt" => "Poslední změna",
|
||||||
"upload" => "Nahrát nový soubor",
|
"upload" => "Nahrát nový soubor",
|
||||||
"uploadSuccessfull" => "Soubor úspěšně nahrán|:count soubory úspěšně nahrány|:count souborů úspěšně nahráno",
|
"uploadSuccessfull" => "Soubor úspěšně nahrán|:count soubory úspěšně nahrány|:count souborů úspěšně nahráno",
|
||||||
"url" => "Veřejá URL",
|
"url" => "Veřejná URL",
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ return [
|
|||||||
'login' => 'Logged in',
|
'login' => 'Logged in',
|
||||||
'logout' => 'Logged out',
|
'logout' => 'Logged out',
|
||||||
'userEdit' => 'Updated user :name (:email)',
|
'userEdit' => 'Updated user :name (:email)',
|
||||||
|
'createUser' => 'Created user :name (:email)',
|
||||||
'newCustomField' => 'Added new custom field with ID #:id and name ":name"',
|
'newCustomField' => 'Added new custom field with ID #:id and name ":name"',
|
||||||
'editCustomField' => 'Edited custom field with ID #:id and name ":name"',
|
'editCustomField' => 'Edited custom field with ID #:id and name ":name"',
|
||||||
'deleteCustomField' => 'Deleted custom field ID #:id and name ":name"',
|
'deleteCustomField' => 'Deleted custom field ID #:id and name ":name"',
|
||||||
@@ -42,6 +43,7 @@ return [
|
|||||||
'nameEditWidgetArea' => 'Edit widget area',
|
'nameEditWidgetArea' => 'Edit widget area',
|
||||||
'nameInvalidEditContentAttempt' => 'Tried to edit invalid page',
|
'nameInvalidEditContentAttempt' => 'Tried to edit invalid page',
|
||||||
'nameCreateNewContent' => 'Created new page',
|
'nameCreateNewContent' => 'Created new page',
|
||||||
|
'nameCreateUser' => 'Created new user',
|
||||||
'nameDeleteContent' => 'Deleted page',
|
'nameDeleteContent' => 'Deleted page',
|
||||||
'namePublishContent' => 'Published page',
|
'namePublishContent' => 'Published page',
|
||||||
'nameDraftFromContent' => 'Made draft from published page',
|
'nameDraftFromContent' => 'Made draft from published page',
|
||||||
|
|||||||
@@ -24,26 +24,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
@if (count($templates))
|
||||||
<div class="col-lg-12">
|
<div class="row">
|
||||||
<label class="control-label">
|
<div class="col-lg-12">
|
||||||
@lang('admin/contents.template')
|
<label class="control-label">
|
||||||
</label>
|
@lang('admin/contents.template')
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
<select class="form-control" name="template">
|
<select class="form-control" name="template">
|
||||||
@foreach($templates as $template)
|
@foreach($templates as $template)
|
||||||
<option value="{{$template->template_name}}"
|
<option value="{{$template->template_name}}"
|
||||||
@if(old('template', $page->template) == $template->template_name) selected @endif>
|
@if(old('template', $page->template) == $template->template_name) selected @endif>
|
||||||
{{$template->name}}
|
{{$template->name}}
|
||||||
@if($template->description != '')
|
@if($template->description != '')
|
||||||
- {{str_limit($template->description, 60)}}
|
- {{str_limit($template->description, 60)}}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@include('admin.snippets.hasError', ['field' => 'template'])
|
@include('admin.snippets.hasError', ['field' => 'template'])
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
@endif
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<div class="col-xs-2 col-lg-1">@lang('admin/contents.actions')</div>
|
<div class="col-xs-2 col-lg-1">@lang('admin/contents.actions')</div>
|
||||||
</div>
|
</div>
|
||||||
@foreach($pages as $page)
|
@foreach($pages as $page)
|
||||||
<div class="row p-tb-15">
|
<div class="row p-tb-15 @if($page->is_homepage) bold @endif">
|
||||||
<div class="col-md-1 hidden-sm-down text-center with-placeholder">
|
<div class="col-md-1 hidden-sm-down text-center with-placeholder">
|
||||||
<a href="{{route('content.edit', ['id' => $page->id])}}">
|
<a href="{{route('content.edit', ['id' => $page->id])}}">
|
||||||
@if(!view()->exists(\App\Helpers\Template::name($page->template, false)))
|
@if(!view()->exists(\App\Helpers\Template::name($page->template, false)))
|
||||||
@@ -40,7 +40,8 @@
|
|||||||
title="@lang('admin/contents.invalidTemplateSelected')"></i>
|
title="@lang('admin/contents.invalidTemplateSelected')"></i>
|
||||||
@else
|
@else
|
||||||
@if(!empty($page->title_photo))
|
@if(!empty($page->title_photo))
|
||||||
<img src="@thumbnail($page->title_photo)" class="placeholder" alt="{{$page->title}}" />
|
<img src="@thumbnail($page->title_photo)" class="placeholder"
|
||||||
|
alt="{{$page->title}}" />
|
||||||
@else
|
@else
|
||||||
<img src="{{asset('resources/assets/admin/img/placeholder.png')}}"
|
<img src="{{asset('resources/assets/admin/img/placeholder.png')}}"
|
||||||
class="placeholder"
|
class="placeholder"
|
||||||
@@ -54,7 +55,11 @@
|
|||||||
{{$page->title}}
|
{{$page->title}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 col-md-3 hidden-sm-down">{{$statuses[$page->status]}}</div>
|
<div class="col-lg-2 col-md-3 hidden-sm-down">
|
||||||
|
<span class="tag @if($page->status == \App\Models\Content::STATUS_PUBLIC) tag-success
|
||||||
|
@elseif ($page->status == \App\Models\Content::STATUS_DRAFT) tag-danger
|
||||||
|
@else tag-warning @endif">{{$statuses[$page->status]}}</span>
|
||||||
|
</div>
|
||||||
<div class="col-lg-2 col-md-3 hidden-sm-down">
|
<div class="col-lg-2 col-md-3 hidden-sm-down">
|
||||||
<a href="{{route('content.overview', ['moduleId' => $page->module_id])}}">
|
<a href="{{route('content.overview', ['moduleId' => $page->module_id])}}">
|
||||||
{{trans($page->module_name)}}
|
{{trans($page->module_name)}}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<div class="row">
|
|
||||||
@forelse($files as $file)
|
@forelse($files as $file)
|
||||||
|
|
||||||
<div class="col-sm-4 col-md-3 text-center">
|
<div class="col-sm-4 col-md-3 text-center">
|
||||||
@include('admin.snippets.card', [
|
@include('admin.snippets.card', [
|
||||||
'body' => '<a href="'.route('upload.detail', ['id' => $file->id]).'">'.\App\Helpers\FileManager::getPreview($file).'</a>',
|
'body' => '<a href="'.route('upload.detail', ['id' => $file->id]).'">'.\App\Helpers\FileManager::getPreview($file).'</a>',
|
||||||
@@ -17,5 +15,4 @@
|
|||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
<em>@lang('admin/fileManager.noFiles')</em>
|
<em>@lang('admin/fileManager.noFiles')</em>
|
||||||
</div>
|
</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
</div>
|
|
||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
@section('pageHeading', trans('admin/userManagement.profile'))
|
@section('pageHeading', trans('admin/userManagement.profile'))
|
||||||
@section('pageDescription', @trans('admin/userManagement.detail', ['name' => $user->name, 'email' => $user->email]))
|
@section('pageDescription', @trans('admin/userManagement.detail', ['name' => $user->name, 'email' => $user->email]))
|
||||||
|
@section('headerButtons')
|
||||||
|
<a href="{{route('users.overview')}}" class="btn btn-secondary btn-sm rounded" title="@lang('admin/userManagement.overview')">
|
||||||
|
<i class="fa fa-list"></i>
|
||||||
|
</a>
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
@extends('admin.layoutWithNavigation')
|
@extends('admin.layoutWithNavigation')
|
||||||
|
|
||||||
@section('pageHeading', @trans('admin/userManagement.editUser', ['name' => str_limit($user->name, 20), 'email' => $user->email]))
|
@section('pageHeading', @trans('admin/userManagement.editUser', ['name' => str_limit($user->name, 20), 'email' => $user->email]))
|
||||||
|
@section('headerButtons')
|
||||||
|
<a href="{{route('users.overview')}}" class="btn btn-secondary btn-sm rounded" title="@lang('admin/userManagement.overview')">
|
||||||
|
<i class="fa fa-list"></i>
|
||||||
|
</a>
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
namespace Templates\Base\OnePage\Handlers;
|
namespace Templates\Base\OnePage\Handlers;
|
||||||
|
|
||||||
use App\Handlers\Contracts\TemplateHandler;
|
use App\Handlers\Contracts\TemplateHandler;
|
||||||
|
use App\Helpers\CurrentTemplate;
|
||||||
use App\Helpers\PageRenderer;
|
use App\Helpers\PageRenderer;
|
||||||
use App\Helpers\Settings;
|
use App\Helpers\Settings;
|
||||||
use App\Helpers\Template;
|
use App\Helpers\Template;
|
||||||
@@ -10,7 +11,12 @@ use App\Models\Content;
|
|||||||
use App\Models\Module;
|
use App\Models\Module;
|
||||||
use App\Models\Settings as SettingsModel;
|
use App\Models\Settings as SettingsModel;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use App\Models\Widget;
|
||||||
|
use App\Models\WidgetArea;
|
||||||
|
use App\Models\WidgetInWidgetArea;
|
||||||
|
use App\Models\WidgetType;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Templates\Base\OnePage\Widgets\OnePageMenu\OnePageMenu;
|
||||||
|
|
||||||
abstract class OnePage implements TemplateHandler
|
abstract class OnePage implements TemplateHandler
|
||||||
{
|
{
|
||||||
@@ -133,6 +139,32 @@ abstract class OnePage implements TemplateHandler
|
|||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
ActionLogType::create($type);
|
ActionLogType::create($type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// try to create onepage menu widget
|
||||||
|
$widgetName = OnePageMenu::getName();
|
||||||
|
$widgetDescription = OnePageMenu::getDescription();
|
||||||
|
|
||||||
|
CurrentTemplate::reset();
|
||||||
|
|
||||||
|
// create row in widget types
|
||||||
|
WidgetType::create([
|
||||||
|
'handler' => OnePageMenu::class,
|
||||||
|
'name' => $widgetName,
|
||||||
|
'module_id' => null,
|
||||||
|
'template_id' => CurrentTemplate::get()->id,
|
||||||
|
'description' => $widgetDescription
|
||||||
|
]);
|
||||||
|
|
||||||
|
$area = WidgetArea::create(['name' => 'Top menu', 'code' => 'topMenu', 'deletable' => 0]);
|
||||||
|
$widget = Widget::create([
|
||||||
|
'widget_type_handler' => OnePageMenu::class,
|
||||||
|
'name' => 'Menu',
|
||||||
|
'settings' => '{"containerClass": null}',
|
||||||
|
'deletable' => 0
|
||||||
|
]);
|
||||||
|
|
||||||
|
// bind widget with widget area
|
||||||
|
WidgetInWidgetArea::create(['widget_id' => $widget->id, 'widget_area_id' => $area->id, 'position' => 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user