From 6a9fc98382d3a71765f683b85e83b7467be89f99 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Thu, 2 Sep 2021 11:52:47 +0200 Subject: [PATCH] chg: [tags] Moved tag helper as plugin tag helper --- plugins/Tags/src/Controller/AppController.php | 10 ---------- {src => plugins/Tags/src}/View/Helper/TagHelper.php | 2 +- src/View/AppView.php | 1 + templates/Organisations/index.php | 7 ++++++- 4 files changed, 8 insertions(+), 12 deletions(-) rename {src => plugins/Tags/src}/View/Helper/TagHelper.php (99%) diff --git a/plugins/Tags/src/Controller/AppController.php b/plugins/Tags/src/Controller/AppController.php index 28c7ae4..5a0bda8 100644 --- a/plugins/Tags/src/Controller/AppController.php +++ b/plugins/Tags/src/Controller/AppController.php @@ -9,15 +9,5 @@ class AppController extends BaseController public function initialize(): void { parent::initialize(); - // $this->loadComponent('RequestHandler'); - // $this->loadComponent('ParamHandler', [ - // 'request' => $this->request - // ]); - // $this->loadComponent('CRUD', [ - // 'request' => $this->request, - // 'table' => $this->{$this->modelClass}, - // 'MetaFields' => $this->MetaFields, - // 'MetaTemplates' => $this->MetaTemplates - // ]); } } \ No newline at end of file diff --git a/src/View/Helper/TagHelper.php b/plugins/Tags/src/View/Helper/TagHelper.php similarity index 99% rename from src/View/Helper/TagHelper.php rename to plugins/Tags/src/View/Helper/TagHelper.php index c027e98..865c6b9 100644 --- a/src/View/Helper/TagHelper.php +++ b/plugins/Tags/src/View/Helper/TagHelper.php @@ -1,6 +1,6 @@ loadHelper('PrettyPrint'); $this->loadHelper('FormFieldMassage'); $this->loadHelper('Paginator', ['templates' => 'cerebrate-pagination-templates']); + $this->loadHelper('Tags.Tag'); } } diff --git a/templates/Organisations/index.php b/templates/Organisations/index.php index da638cb..4a98718 100644 --- a/templates/Organisations/index.php +++ b/templates/Organisations/index.php @@ -71,7 +71,12 @@ echo $this->element('genericElements/IndexTable/index_table', [ [ 'name' => __('Type'), 'data_path' => 'type', - ] + ], + [ + 'name' => __('Tags'), + 'data_path' => 'tags', + 'element' => 'tags', + ], ], 'title' => __('ContactDB Organisation Index'), 'description' => __('A list of organisations known by your Cerebrate instance. This list can get populated either directly, by adding new organisations or by fetching them from trusted remote sources.'),