From 9723470fac14c0a1e0f7fe1919987f40792cf885 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 26 May 2019 00:33:39 +0300 Subject: [PATCH] Flextype Box Plugin: Admin #125 #117 - Templates Controller/Views implementation --- .../app/Controllers/TemplatesController.php | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/site/plugins/admin/app/Controllers/TemplatesController.php b/site/plugins/admin/app/Controllers/TemplatesController.php index 00648363..f6eefcc6 100644 --- a/site/plugins/admin/app/Controllers/TemplatesController.php +++ b/site/plugins/admin/app/Controllers/TemplatesController.php @@ -8,7 +8,26 @@ class TemplatesController extends Controller { public function index($request, $response, $args) { - + return $this->view->render($response, + 'plugins/admin/views/templates/extends/templates/index.html', [ + 'menu_item' => 'templates', + 'templates_list' => $this->themes->getTemplates(), + 'partials_list' => $this->themes->getPartials(), + 'links' => [ + 'templates' => [ + 'link' => $this->router->pathFor('admin.templates.index'), + 'title' => __('admin_templates'), + 'attributes' => ['class' => 'navbar-item active'] + ], + ], + 'buttons' => [ + 'templates_create' => [ + 'link' => $this->router->pathFor('admin.templates.add'), + 'title' => __('admin_create_new_template'), + 'attributes' => ['class' => 'float-right btn'] + ], + ] + ]); } public function add($request, $response, $args)