FEATURE: add basic article list

This commit is contained in:
Michal Kváček
2016-09-07 00:47:57 +02:00
parent 5b7b81ff4d
commit 44677aea78
27 changed files with 173 additions and 64 deletions
+9 -3
View File
@@ -103,14 +103,20 @@ class Article extends Handler
$menu = \Menu::instance('mainMenu');
$menu->dropdown(trans('article::module.name'), function ($sub) {
$blogSubmenu = $menu->whereTitle(trans('article::module.blog'));
if (!$blogSubmenu) {
$blogSubmenu = $menu->dropdown(trans('article::module.blog'), function ($sub) {
}, 20, ['icon' => 'fa fa-fw fa-book']);
}
$blogSubmenu->dropdown(trans('article::module.name'), function ($sub) {
$sub->route('content.new', trans('article::article.new'), ['id' => self::getModuleId()], 10, ['icon' => 'fa fa-fw fa-pencil']);
$sub->route('content.overview', trans('article::article.overview'), ['id' => self::getModuleId()], 30, ['icon' => 'fa fa-fw fa-book']);
}, 10, ['icon' => 'fa fa-fw fa-book']);
$menu->dropdown(trans('article::module.comments'), function ($sub) {
$blogSubmenu->dropdown(trans('article::module.comments'), function ($sub) {
$sub->route('comments.overview', trans('article::module.commentsOverview'), [], 10, ['icon' => 'fa fa-fw fa-commenting-o']);
}, 10, ['icon' => 'fa fa-fw fa-comments-o']);
}, 20, ['icon' => 'fa fa-fw fa-comments-o']);
}
public static function getModuleId()
@@ -0,0 +1,8 @@
<?php
return [
"approve" => "Schválit komentář a zobrazovat ho u článku",
"approved" => "Komentář úspěšně schválen",
"commentedArticle" => "Komentovaný článek",
"createdAt" => "Vloženo :date",
"deleted" => "Komentář smazán",
];
@@ -1,8 +1,9 @@
<?php
return [
"allArticles" => "Všechny články",
"blog" => "Blog",
"comments" => "Komentáře",
"commentsOverview" => "Všechny komentáře",
"description" => "Základní submodul pro blog. Tento modul umožňuje psát články.",
"name" => "Článek",
"name" => "Články",
];
@@ -1,8 +1,9 @@
<?php
return [
'name' => 'Article',
'name' => 'Articles',
'description' => 'Base submodule for blog',
'comments' => 'Comments',
'commentsOverview' => 'All comments',
'allArticles' => 'All articles'
'allArticles' => 'All articles',
'blog' => 'Blog'
];