Initial commit
This commit is contained in:
commit
b82041937e
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "assets/vendor/adrema-form"]
|
||||||
|
path = assets/vendor/adrema-form
|
||||||
|
url = https://git.zoomyboy.de/silva/adrema-form
|
|
@ -0,0 +1,105 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Silva\Adrema;
|
||||||
|
|
||||||
|
use Backend;
|
||||||
|
use Silva\Adrema\Models\Settings;
|
||||||
|
use System\Classes\PluginBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin Information File
|
||||||
|
*
|
||||||
|
* @link https://docs.octobercms.com/3.x/extend/system/plugins.html
|
||||||
|
*/
|
||||||
|
class Plugin extends PluginBase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* pluginDetails about this plugin.
|
||||||
|
*/
|
||||||
|
public function pluginDetails()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => 'adrema',
|
||||||
|
'description' => 'No description provided yet...',
|
||||||
|
'author' => 'silva',
|
||||||
|
'icon' => 'icon-leaf'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* register method, called when the plugin is first registered.
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* boot method, called right before the request route.
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* registerComponents used by the frontend.
|
||||||
|
*/
|
||||||
|
public function registerComponents()
|
||||||
|
{
|
||||||
|
return []; // Remove this line to activate
|
||||||
|
|
||||||
|
return [
|
||||||
|
'Silva\Adrema\Components\MyComponent' => 'myComponent',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* registerPermissions used by the backend.
|
||||||
|
*/
|
||||||
|
public function registerPermissions()
|
||||||
|
{
|
||||||
|
return []; // Remove this line to activate
|
||||||
|
|
||||||
|
return [
|
||||||
|
'silva.adrema.some_permission' => [
|
||||||
|
'tab' => 'adrema',
|
||||||
|
'label' => 'Some permission'
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* registerPermissions used by the backend.
|
||||||
|
*/
|
||||||
|
public function registerSettings()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'settings' => [
|
||||||
|
'label' => 'Adrema',
|
||||||
|
'description' => 'setting_description',
|
||||||
|
'category' => 'CATEGORY_CMS',
|
||||||
|
'icon' => 'icon-cog',
|
||||||
|
'class' => Settings::class,
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* registerNavigation used by the backend.
|
||||||
|
*/
|
||||||
|
public function registerNavigation()
|
||||||
|
{
|
||||||
|
return []; // Remove this line to activate
|
||||||
|
|
||||||
|
return [
|
||||||
|
'adrema' => [
|
||||||
|
'label' => 'adrema',
|
||||||
|
'url' => Backend::url('silva/adrema/mycontroller'),
|
||||||
|
'icon' => 'icon-leaf',
|
||||||
|
'permissions' => ['silva.adrema.*'],
|
||||||
|
'order' => 500,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit f76b46bc9fe159324e58783ff945595b5ba5e488
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "silva/adrema-plugin",
|
||||||
|
"type": "october-plugin",
|
||||||
|
"description": "No description provided yet...",
|
||||||
|
"require": {
|
||||||
|
"composer/installers": "~1.0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"setting_description": "App für DPSG-NaMi",
|
||||||
|
"url_pattern_comment": "Die Page-URL, auf der einzelne Veranstaltungen angezeigt werden. {slug} wird mit dem Bezeichner der Veranstaltung ersetzt.",
|
||||||
|
"url_pattern_label": "URL für einzelne Veranstaltungen",
|
||||||
|
"base_url_label": "Base-URL",
|
||||||
|
"base_url_comment": "Die Domain (app_url), auf der deine Adrema läuft"
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Silva\Adrema\Models;
|
||||||
|
|
||||||
|
use System\Models\SettingModel;
|
||||||
|
|
||||||
|
class Settings extends SettingModel
|
||||||
|
{
|
||||||
|
use \October\Rain\Database\Traits\Validation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string table name
|
||||||
|
*/
|
||||||
|
public $settingsCode = 'silva_adrema_settings';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string field file
|
||||||
|
*/
|
||||||
|
public $settingsFields = 'fields.yaml';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array<string, string> rules for validation
|
||||||
|
*/
|
||||||
|
public $rules = [];
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
# ===================================
|
||||||
|
# Form Field Definitions
|
||||||
|
# ===================================
|
||||||
|
|
||||||
|
fields:
|
||||||
|
base_url:
|
||||||
|
label: base_url_label
|
||||||
|
comment: base_url_comment
|
||||||
|
|
||||||
|
primary_color:
|
||||||
|
label: primary_color_label
|
||||||
|
comment: primary_color_comment
|
||||||
|
type: colorpicker
|
||||||
|
|
||||||
|
secondary_color:
|
||||||
|
label: secondary_color_label
|
||||||
|
comment: secondary_color_comment
|
||||||
|
type: colorpicker
|
||||||
|
|
||||||
|
font_color:
|
||||||
|
label: font_color_label
|
||||||
|
comment: font_color_comment
|
||||||
|
type: colorpicker
|
||||||
|
|
||||||
|
circle_color:
|
||||||
|
label: circle_color_label
|
||||||
|
comment: circle_color_comment
|
||||||
|
type: colorpicker
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php namespace Silva\Adrema\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Schema\Blueprint;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CreateSettingsTable Migration
|
||||||
|
*
|
||||||
|
* @link https://docs.octobercms.com/3.x/extend/database/structure.html
|
||||||
|
*/
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* up builds the migration
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('silva_adrema_settings', function(Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* down reverses the migration
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('silva_adrema_settings');
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
v1.0.1: First version of adrema
|
Loading…
Reference in New Issue