FEATURE: remove static pages and move it into own repository
This commit is contained in:
@@ -1,12 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'name' => 'StaticPages',
|
|
||||||
'translatedName' => 'staticpages::module.name',
|
|
||||||
'translatedDescription' => 'staticpages::module.description',
|
|
||||||
'alias' => 'staticpages',
|
|
||||||
'handler' => '\\Modules\\StaticPages\\Handlers\\StaticPage',
|
|
||||||
'providers' => [\Modules\Staticpages\Providers\StaticPagesServiceProvider::class],
|
|
||||||
'files' => ['start.php'],
|
|
||||||
'order' => 0,
|
|
||||||
];
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Modules\StaticPages\Handlers;
|
|
||||||
|
|
||||||
use App\CMS\Contracts\Content\ContentTitles;
|
|
||||||
use App\CMS\Handlers\AdminHandler;
|
|
||||||
use App\Models\Content\Content;
|
|
||||||
use App\Models\User;
|
|
||||||
|
|
||||||
class StaticPage extends AdminHandler implements ContentTitles
|
|
||||||
{
|
|
||||||
public static function registerAdminMenu(User $user)
|
|
||||||
{
|
|
||||||
// register links in admin menu
|
|
||||||
$menu = \Menu::instance('mainMenu');
|
|
||||||
$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'), ['module' => config('staticpages.alias')], 10, ['icon' => 'fa fa-plus']);
|
|
||||||
$submenu->route('content.overview', trans('staticpages::adminMenu.overview'), ['module' => config('staticpages.alias')], 20, ['icon' => 'fa fa-list']);
|
|
||||||
}, 15, ['icon' => 'fa fa-newspaper-o']);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Does this module support categories?
|
|
||||||
*
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public static function supportCategories()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<?php namespace Modules\Staticpages\Providers;
|
|
||||||
|
|
||||||
use App\CMS\Modules\ServiceProviders\ServiceProvider;
|
|
||||||
|
|
||||||
class StaticPagesServiceProvider extends ServiceProvider
|
|
||||||
{
|
|
||||||
protected function setModuleAlias()
|
|
||||||
{
|
|
||||||
$this->alias = 'staticpages';
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function setModulePath()
|
|
||||||
{
|
|
||||||
$this->path = __DIR__;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
"new" => "Nová stránka",
|
|
||||||
"overview" => "Seznam všech statických stránek",
|
|
||||||
"templatePath" => "Statické stránky",
|
|
||||||
];
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
"new" => "Vytvořit novou",
|
|
||||||
"overview" => "Přehled",
|
|
||||||
"staticPages" => "Statické stránky",
|
|
||||||
];
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
"allPages" => "Všechny statické stránky",
|
|
||||||
"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",
|
|
||||||
"newPage" => "Vytvářím novou stránku",
|
|
||||||
];
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'overview' => 'List of all static pages',
|
|
||||||
'templatePath' => 'Static pages',
|
|
||||||
'new' => 'nova stranka'
|
|
||||||
];
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'staticPages' => 'Static pages',
|
|
||||||
'new' => 'Create new',
|
|
||||||
'overview' => 'Overview'
|
|
||||||
];
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'name' => 'Static pages',
|
|
||||||
'description' => 'Static pages are intended for displaying static content on webpage.',
|
|
||||||
'allPages' => 'All static pages',
|
|
||||||
'editPage' => 'Editing static page',
|
|
||||||
'newPage' => 'Create new static page'
|
|
||||||
];
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
"new" => "Nová stránka",
|
|
||||||
"overview" => "Zoznam všetkých statických stránok",
|
|
||||||
"templatePath" => "Statické stránky",
|
|
||||||
];
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
"new" => "Vytvoriť novú",
|
|
||||||
"overview" => "Prehľad",
|
|
||||||
"staticPages" => "Statické stránky",
|
|
||||||
];
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
"description" => "Statické stránky sú určené k zobrazovaniu statického obsahu na webe.",
|
|
||||||
"name" => "Statické stránky",
|
|
||||||
];
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
<?php
|
|
||||||
Reference in New Issue
Block a user