From bae0803e5e36fc42f4e0600e551804e225e5db30 Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 24 May 2019 12:08:39 +0300 Subject: [PATCH] Flextype Box Plugin: Admin #125 #117 - Fieldsets Controller/Views implementation --- .../app/Controllers/FieldsetsController.php | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/site/plugins/admin/app/Controllers/FieldsetsController.php b/site/plugins/admin/app/Controllers/FieldsetsController.php index 359cb0d3..4611a16a 100644 --- a/site/plugins/admin/app/Controllers/FieldsetsController.php +++ b/site/plugins/admin/app/Controllers/FieldsetsController.php @@ -31,7 +31,25 @@ class FieldsetsController extends Controller public function add($request, $response, $args) { - + return $this->view->render($response, + 'plugins/admin/views/templates/extends/fieldsets/add.html', [ + 'menu_item' => 'fieldsets', + 'fieldsets_list' => $this->fieldsets->fetchList(), + 'links' => [ + 'fieldsets' => [ + 'link' => $this->router->pathFor('admin.fieldsets.index'), + 'title' => __('admin_fieldsets'), + 'attributes' => ['class' => 'navbar-item active'] + ], + ], + 'buttons' => [ + 'fieldsets_add' => [ + 'link' => $this->router->pathFor('admin.fieldsets.add'), + 'title' => __('admin_create_new_fieldset'), + 'attributes' => ['class' => 'float-right btn'] + ] + ] + ]); } public function addProcess($request, $response, $args)