FEATURE: move static pages into own repository
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
<?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,
|
||||
];
|
||||
@@ -0,0 +1,66 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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__;
|
||||
}
|
||||
}
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
"new" => "Nová stránka",
|
||||
"overview" => "Seznam všech statických stránek",
|
||||
"templatePath" => "Statické stránky",
|
||||
];
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
"new" => "Vytvořit novou",
|
||||
"overview" => "Přehled",
|
||||
"staticPages" => "Statické stránky",
|
||||
];
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
<?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",
|
||||
];
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
'overview' => 'List of all static pages',
|
||||
'templatePath' => 'Static pages',
|
||||
'new' => 'nova stranka'
|
||||
];
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
'staticPages' => 'Static pages',
|
||||
'new' => 'Create new',
|
||||
'overview' => 'Overview'
|
||||
];
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
<?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'
|
||||
];
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
"new" => "Nová stránka",
|
||||
"overview" => "Zoznam všetkých statických stránok",
|
||||
"templatePath" => "Statické stránky",
|
||||
];
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
"new" => "Vytvoriť novú",
|
||||
"overview" => "Prehľad",
|
||||
"staticPages" => "Statické stránky",
|
||||
];
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
return [
|
||||
"description" => "Statické stránky sú určené k zobrazovaniu statického obsahu na webe.",
|
||||
"name" => "Statické stránky",
|
||||
];
|
||||
Reference in New Issue
Block a user