diff --git a/Plugin.php b/Plugin.php index e773f98..858604e 100644 --- a/Plugin.php +++ b/Plugin.php @@ -3,6 +3,7 @@ namespace Silva\Adrema; use Backend; +use Silva\Adrema\Components\EventOverview; use Silva\Adrema\Models\Settings; use System\Classes\PluginBase; @@ -47,10 +48,8 @@ class Plugin extends PluginBase */ public function registerComponents() { - return []; // Remove this line to activate - return [ - 'Silva\Adrema\Components\MyComponent' => 'myComponent', + EventOverview::class => 'adrema_event_overview', ]; } diff --git a/assets/vendor/adrema-form b/assets/vendor/adrema-form index f76b46b..93df5ba 160000 --- a/assets/vendor/adrema-form +++ b/assets/vendor/adrema-form @@ -1 +1 @@ -Subproject commit f76b46bc9fe159324e58783ff945595b5ba5e488 +Subproject commit 93df5bac1d1a7ed971a5d98477b25514a75a59e0 diff --git a/components/EventOverview.php b/components/EventOverview.php new file mode 100644 index 0000000..42ce204 --- /dev/null +++ b/components/EventOverview.php @@ -0,0 +1,41 @@ + 'EventOverview Component', + 'description' => 'No description provided yet...' + ]; + } + + public function onRun(): void + { + $this->addJs('assets/vendor/adrema-form/dist/main.js'); + $this->settings = [ + 'primary_color' => Settings::get('primary_color'), + ]; + } + + /** + * @link https://docs.octobercms.com/3.x/element/inspector-types.html + */ + public function defineProperties() + { + return []; + } +} diff --git a/components/eventoverview/default.htm b/components/eventoverview/default.htm new file mode 100644 index 0000000..1b3bc95 --- /dev/null +++ b/components/eventoverview/default.htm @@ -0,0 +1,40 @@ +{% set iconClass="w-3 h-3 flex-none text-dpsgred-700 mr-2" %} + +