FEATURE: add unlimited depth of subpages

This commit is contained in:
Michal Kváček
2016-04-05 21:42:22 +02:00
parent 9570ad3da3
commit 7446e2f4ef
3 changed files with 10 additions and 2 deletions
@@ -56,7 +56,7 @@ class CreateNewContent extends Controller
'templates' => $templates,
'moduleId' => $moduleId,
'page' => $this->content,
'rootPages' => $this->content->rootPages(),
'rootPages' => $this->content->getOverview()->get(),
'moduleName' => trans($module->name),
'extraData' => call_user_func([$module->handler, 'loadExtraData'], $this->content),
'formSectionNames' => call_user_func([$module->handler, 'getExtendedFormSections']),
+3 -1
View File
@@ -64,7 +64,9 @@ class EditContent extends Controller
return view('admin.content.edit', [
'contentStatuses' => $statuses,
'page' => $page,
'rootPages' => $page->rootPages(),
'rootPages' => $page->getOverview()
->where('contents.id', '!=', $page->id)
->get(),
'templates' => $templates,
'extraData' => call_user_func([$page->module_handler, 'loadExtraData'], $page),
'formSectionNames' => call_user_func([$page->module_handler, 'getExtendedFormSections']),