diff --git a/modules/backend/behaviors/ImportExportController.php b/modules/backend/behaviors/ImportExportController.php index deca4f24e..4cf14c3a1 100644 --- a/modules/backend/behaviors/ImportExportController.php +++ b/modules/backend/behaviors/ImportExportController.php @@ -273,7 +273,7 @@ class ImportExportController extends ControllerBehavior public function importRender() { - return $this->importExportMakePartial('import'); + return $this->importExportMakePartial('container_import'); } public function importGetModel() @@ -456,7 +456,7 @@ class ImportExportController extends ControllerBehavior public function exportRender() { - return $this->importExportMakePartial('export'); + return $this->importExportMakePartial('container_export'); } public function exportGetModel() diff --git a/modules/backend/behaviors/ListController.php b/modules/backend/behaviors/ListController.php index 400cd6039..8f84b76fb 100644 --- a/modules/backend/behaviors/ListController.php +++ b/modules/backend/behaviors/ListController.php @@ -137,6 +137,7 @@ class ListController extends ControllerBehavior 'showCheckboxes', 'showTree', 'treeExpanded', + 'customViewPath', ]; foreach ($configFieldsToTransfer as $field) { @@ -342,18 +343,8 @@ class ListController extends ControllerBehavior 'toolbar' => null, 'filter' => null, 'list' => null, - 'topPartial' => null, - 'sidePartial' => null ]; - if (isset($listConfig->topPartial)) { - $vars['topPartial'] = $listConfig->topPartial; - } - - if (isset($listConfig->sidePartial)) { - $vars['sidePartial'] = $listConfig->sidePartial; - } - if (isset($this->toolbarWidgets[$definition])) { $vars['toolbar'] = $this->toolbarWidgets[$definition]; } @@ -364,7 +355,23 @@ class ListController extends ControllerBehavior $vars['list'] = $this->listWidgets[$definition]; - return $this->makePartial('list', $vars); + return $this->listMakePartial('container', $vars); + } + + /** + * Controller accessor for making partials within this behavior. + * @param string $partial + * @param array $params + * @return string Partial contents + */ + public function listMakePartial($partial, $params = []) + { + $contents = $this->controller->makePartial('list_'.$partial, $params + $this->vars, false); + if (!$contents) { + $contents = $this->makePartial($partial, $params); + } + + return $contents; } /** diff --git a/modules/backend/behaviors/importexportcontroller/partials/_export.htm b/modules/backend/behaviors/importexportcontroller/partials/_container_export.htm similarity index 96% rename from modules/backend/behaviors/importexportcontroller/partials/_export.htm rename to modules/backend/behaviors/importexportcontroller/partials/_container_export.htm index 298e690e0..f7042e059 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_export.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_container_export.htm @@ -6,4 +6,4 @@ = $exportOptionsFormWidget->render() ?> - \ No newline at end of file + diff --git a/modules/backend/behaviors/importexportcontroller/partials/_import.htm b/modules/backend/behaviors/importexportcontroller/partials/_container_import.htm similarity index 96% rename from modules/backend/behaviors/importexportcontroller/partials/_import.htm rename to modules/backend/behaviors/importexportcontroller/partials/_container_import.htm index 864c7097b..508cb41c5 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_import.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_container_import.htm @@ -6,4 +6,4 @@ = $importOptionsFormWidget->render() ?> - \ No newline at end of file + diff --git a/modules/backend/behaviors/listcontroller/partials/_container.htm b/modules/backend/behaviors/listcontroller/partials/_container.htm new file mode 100644 index 000000000..037ba0629 --- /dev/null +++ b/modules/backend/behaviors/listcontroller/partials/_container.htm @@ -0,0 +1,9 @@ + + = $toolbar->render() ?> + + + + = $filter->render() ?> + + += $list->render() ?> diff --git a/modules/backend/behaviors/listcontroller/partials/_list.htm b/modules/backend/behaviors/listcontroller/partials/_list.htm deleted file mode 100644 index 0c910b69f..000000000 --- a/modules/backend/behaviors/listcontroller/partials/_list.htm +++ /dev/null @@ -1,24 +0,0 @@ - - = $toolbar->render() ?> - - - - = $filter->render() ?> - - - - = $this->makePartial($topPartial) ?> - - - -