FEATURE: make own page for template overview

This commit is contained in:
Michal Kváček
2017-09-15 13:32:09 +02:00
parent 4d68156a73
commit ba55702585
14 changed files with 151 additions and 100 deletions
+1 -9
View File
@@ -111,15 +111,7 @@ abstract class BaseHandler implements BaseModuleHandler
* Templates
*/
if ($user->can('manage', Template::class)) {
$templatePaths = TemplatePathsHumanReadableRootOnly::getWithTranslations();
if (!empty($templatePaths)) {
$sub->dropdown(trans('admin/mainMenu.templates'), function ($sub) use ($templatePaths) {
$i = 1;
foreach ($templatePaths as $id => $name) {
$sub->route('templates.overview', $name, ['id' => $id], $i++);
}
}, 60, ['icon' => 'fa fa-fw fa-file-code-o']);
}
$sub->route('templates.index', trans('admin/mainMenu.templates'), [], 70, ['icon' => 'fa fa-fw fa-file-code-o']);
}
if ($user->can('manage', ActionLog::class)) {