From 8efaf998300b87e45d5144f5a23bbc81a5ecd0e1 Mon Sep 17 00:00:00 2001 From: arikaim Date: Thu, 2 May 2024 08:55:08 -0400 Subject: [PATCH] = --- .github/FUNDING.yml | 2 +- Editor.php | 6 +- README.md | 4 +- arikaim-package.json | 12 +- composer.json | 4 +- controllers/FilesControlPanel.php | 112 +++++++++--------- controllers/PagesControlPanel.php | 77 ++++++------ .../{EditorPage.php => _EditorPage.php} | 0 view/components/admin/admin.html | 5 +- view/components/admin/admin.json | 3 +- view/components/admin/code/code.json | 4 +- .../admin/code/content/emails/emails.json | 2 +- .../admin/code/content/images/help/help.html | 35 +++--- .../admin/code/content/images/help/help.json | 1 + .../admin/code/content/images/images.html | 4 +- .../admin/editor/components/components.html | 9 -- .../admin/editor/components/components.js | 18 --- .../admin/editor/components/components.json | 5 - .../editor/components/editor/editor.html | 28 ----- .../admin/editor/components/editor/editor.js | 7 -- .../editor/components/editor/editor.json | 9 -- .../editor/components/editor/field/field.html | 9 -- view/components/admin/editor/editor.html | 19 --- view/components/admin/editor/editor.js | 62 ---------- view/components/admin/editor/editor.json | 6 - .../admin/editor/pages/component.json | 7 -- .../admin/editor/pages/dropdown/dropdown.html | 17 --- .../admin/editor/pages/dropdown/dropdown.js | 5 - .../admin/editor/pages/dropdown/dropdown.json | 5 - .../admin/editor/pages/edit/_edit.js | 18 --- .../admin/editor/pages/edit/component.json | 7 -- .../admin/editor/pages/edit/edit.html | 18 --- .../admin/editor/pages/edit/edit.json | 5 - view/components/admin/editor/pages/pages.html | 0 view/components/admin/editor/pages/pages.json | 1 - view/components/admin/messages/messages.json | 2 +- 36 files changed, 136 insertions(+), 392 deletions(-) rename controllers/{EditorPage.php => _EditorPage.php} (100%) delete mode 100644 view/components/admin/editor/components/components.html delete mode 100644 view/components/admin/editor/components/components.js delete mode 100644 view/components/admin/editor/components/components.json delete mode 100644 view/components/admin/editor/components/editor/editor.html delete mode 100644 view/components/admin/editor/components/editor/editor.js delete mode 100644 view/components/admin/editor/components/editor/editor.json delete mode 100644 view/components/admin/editor/components/editor/field/field.html delete mode 100644 view/components/admin/editor/editor.html delete mode 100644 view/components/admin/editor/editor.js delete mode 100644 view/components/admin/editor/editor.json delete mode 100644 view/components/admin/editor/pages/component.json delete mode 100644 view/components/admin/editor/pages/dropdown/dropdown.html delete mode 100644 view/components/admin/editor/pages/dropdown/dropdown.js delete mode 100644 view/components/admin/editor/pages/dropdown/dropdown.json delete mode 100644 view/components/admin/editor/pages/edit/_edit.js delete mode 100644 view/components/admin/editor/pages/edit/component.json delete mode 100644 view/components/admin/editor/pages/edit/edit.html delete mode 100644 view/components/admin/editor/pages/edit/edit.json delete mode 100644 view/components/admin/editor/pages/pages.html delete mode 100644 view/components/admin/editor/pages/pages.json diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 9cd0347..95fe7cc 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: arikaim patreon: # Replace with a single Patreon username open_collective: arikaim-cms ko_fi: arikaim diff --git a/Editor.php b/Editor.php index 5f89a7c..799089b 100644 --- a/Editor.php +++ b/Editor.php @@ -12,7 +12,7 @@ use Arikaim\Core\Extension\Extension; /** - * Theme editor extension + * Template editor extension */ class Editor extends Extension { @@ -22,9 +22,7 @@ class Editor extends Extension * @return void */ public function install() - { - // Editor page - $this->addPageRoute('/admin/editor/{theme}/{page}','EditorPage','showEditor','editor::page-editor',null,'editorPage',false); + { // Control Panel $this->addApiRoute('PUT','/api/admin/editor/load/component/file','EditorControlPanel','loadComponentFile','session'); $this->addApiRoute('PUT','/api/admin/editor/save/component/file','EditorControlPanel','saveComponentFile','session'); diff --git a/README.md b/README.md index c705ddf..6cb819f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -## Arikaim CMS Theme Editor Extension +## Arikaim CMS Template Editor Extension ![version: 1.0.0](https://img.shields.io/github/release/arikaim/theme-editor-extension.svg) ![license: GPL3](https://img.shields.io/badge/License-GPLv3-blue.svg) -Arikaim CMS theme editor extension +Arikaim CMS template editor extension #### Requirements diff --git a/arikaim-package.json b/arikaim-package.json index 48a427a..515baf1 100644 --- a/arikaim-package.json +++ b/arikaim-package.json @@ -1,11 +1,11 @@ { - "title": "Theme Editor", + "title": "Template Editor", "name": "editor", "package-type": "extension", "type": "user", - "description": "Theme editor.", - "short-description": "Theme editor.", - "version": "1.3.0", + "description": "Template editor.", + "short-description": "Template editor.", + "version": "1.3.1", "repository": "https://github.com/arikaim/theme-editor-extension.git", "position": "10", "require": { @@ -17,9 +17,9 @@ ] }, "admin-menu": { - "title": "Theme Editor", + "title": "Editor", "icon": "edit", - "page-title": "Theme Editor", + "page-title": "Template Editor", "page-icon": "edit", "component": "editor::admin" } diff --git a/composer.json b/composer.json index 8d85b6e..a69aef7 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "arikaim/theme-editor-extension", - "description": "Arikaim CMS theme editor extension", - "keywords": ["Extension", "Arikaim CMS theme editor extension","Theme Editor","Arikaim","CMS"], + "description": "Arikaim CMS template editor extension", + "keywords": ["Extension", "Arikaim CMS template editor extension","Template Editor","Arikaim","CMS"], "type": "arikaim-extension", "license": "GPL-3.0-or-later", "authors": [{ diff --git a/controllers/FilesControlPanel.php b/controllers/FilesControlPanel.php index c8fe7b0..36b820e 100644 --- a/controllers/FilesControlPanel.php +++ b/controllers/FilesControlPanel.php @@ -37,35 +37,34 @@ public function init() */ public function loadFileController($request, $response, $data) { - $this->onDataValid(function($data) { - $theme = $data->get('theme'); - $type = $data->get('type','css'); - $fileName = $data->get('name'); - - $packageManager = $this->get('packages')->create('template'); - $package = $packageManager->createPackage($theme); - if (\is_object($package) == false) { - $this->error('errors.theme_name'); - return false; - } - $properties = $package->getProperties(true); - $filePath = $properties['path'] . $type . DIRECTORY_SEPARATOR . $fileName; - - $fileContent = File::read($filePath); - - $this->setResponse(($fileContent != null),function() use($fileName,$theme,$fileContent,$type) { - $this - ->message('file.load') - ->field('theme',$theme) - ->field('type',$type) - ->field('file_name',$fileName) - ->field('content',$fileContent); - },'errors.load'); - }); $data ->addRule('text:min=2','theme') ->addRule('text:min=1','file_name') - ->validate(); + ->validate(true); + + $theme = $data->get('theme'); + $type = $data->get('type','css'); + $fileName = $data->get('name'); + + $packageManager = $this->get('packages')->create('template'); + $package = $packageManager->createPackage($theme); + if (\is_object($package) == false) { + $this->error('errors.theme_name'); + return false; + } + $properties = $package->getProperties(true); + $filePath = $properties['path'] . $type . DIRECTORY_SEPARATOR . $fileName; + + $fileContent = File::read($filePath); + + $this->setResponse(($fileContent != null),function() use($fileName,$theme,$fileContent,$type) { + $this + ->message('file.load') + ->field('theme',$theme) + ->field('type',$type) + ->field('file_name',$fileName) + ->field('content',$fileContent); + },'errors.load'); } /** @@ -78,39 +77,38 @@ public function loadFileController($request, $response, $data) */ public function saveFileController($request, $response, $data) { - $this->onDataValid(function($data) { - $theme = $data->get('theme'); - $type = $data->get('type','css'); - $fileName = $data->get('file_name'); - $content = $data->get('content',''); - - $packageManager = $this->get('packages')->create('template'); - $package = $packageManager->createPackage($theme); - if (\is_object($package) == false) { - $this->error('errors.theme_name'); - return false; - } - $properties = $package->getProperties(true); - $filePath = $properties['path'] . $type . DIRECTORY_SEPARATOR . $fileName; - - if (File::isWritable($filePath) == false) { - File::setWritable($filePath); - } - - $result = File::write($filePath,$content); - - $this->setResponse($result,function() use($fileName,$theme,$content,$type) { - $this - ->message('file.save') - ->field('theme',$theme) - ->field('type',$type) - ->field('file_name',$fileName) - ->field('content',$content); - },'errors.file.save'); - }); $data ->addRule('text:min=2','theme') ->addRule('text:min=1','file_name') - ->validate(); + ->validate(true); + + $theme = $data->get('theme'); + $type = $data->get('type','css'); + $fileName = $data->get('file_name'); + $content = $data->get('content',''); + + $packageManager = $this->get('packages')->create('template'); + $package = $packageManager->createPackage($theme); + if (\is_object($package) == false) { + $this->error('errors.theme_name'); + return false; + } + $properties = $package->getProperties(true); + $filePath = $properties['path'] . $type . DIRECTORY_SEPARATOR . $fileName; + + if (File::isWritable($filePath) == false) { + File::setWritable($filePath); + } + + $result = File::write($filePath,$content); + + $this->setResponse($result,function() use($fileName,$theme,$content,$type) { + $this + ->message('file.save') + ->field('theme',$theme) + ->field('type',$type) + ->field('file_name',$fileName) + ->field('content',$content); + },'errors.file.save'); } } diff --git a/controllers/PagesControlPanel.php b/controllers/PagesControlPanel.php index 385fb0d..7302a92 100644 --- a/controllers/PagesControlPanel.php +++ b/controllers/PagesControlPanel.php @@ -34,50 +34,51 @@ public function init() * @param \Psr\Http\Message\ServerRequestInterface $request * @param \Psr\Http\Message\ResponseInterface $response * @param Validator $data - * @return Psr\Http\Message\ResponseInterface + * @return mixed */ public function saveMetatagsController($request, $response, $data) { - $this->onDataValid(function($data) { - $theme = $data->get('theme'); - $language = $data->get('language'); - $componentName = $data->get('component_name'); - $component = \str_replace('_','.',$componentName); - - $packageManager = $this->get('packages')->create('template'); - $template = $packageManager->createPackage($theme); - if (\is_object($template) == false) { - $this->error('errors.theme_name'); - return false; - } - - $translation = $template->readTranslation($component,$language,'pages'); - if ($translation === false) { - $this->error('errors.translation.file'); - return false; - } - - $translation['head']['title'] = $data->get('title',''); - $translation['head']['description'] = $data->get('description',''); - $translation['head']['keywords'] = $data->get('keywords',''); - - $path = $template->getComponentPath($componentName,'pages'); - $fileName = $template->resolveTranslationFileName($path,$language); - - $result = File::write($fileName,Utils::jsonEncode($translation)); - - $this->setResponse($result,function() use($language,$theme,$componentName) { - $this - ->message('metatags.save') - ->field('theme',$theme) - ->field('component',$componentName) - ->field('language',$language); - },'errors.metatags.save'); - }); $data ->addRule('text:min=2','theme') ->addRule('text:min=2','language') ->addRule('text:min=1','component_name') - ->validate(); + ->validate(true); + + $theme = $data->get('theme'); + $language = $data->get('language'); + $componentName = $data->get('component_name'); + $component = \str_replace('_','.',$componentName); + + $packageManager = $this->get('packages')->create('template'); + $template = $packageManager->createPackage($theme); + if (\is_object($template) == false) { + $this->error('errors.theme_name'); + return false; + } + + $translation = $template->readTranslation($component,$language,'pages'); + if ($translation === false) { + $this->error('errors.translation.file'); + return false; + } + + $translation['head']['title'] = $data->get('title',''); + $translation['head']['description'] = $data->get('description',''); + $translation['head']['keywords'] = $data->get('keywords',''); + + $path = $template->getComponentPath($componentName,'pages'); + $fileName = $template->resolveTranslationFileName($path,$language); + + File::setWritable($fileName); + + $result = File::write($fileName,Utils::jsonEncode($translation)); + + $this->setResponse($result,function() use($language,$theme,$componentName) { + $this + ->message('metatags.save') + ->field('theme',$theme) + ->field('component',$componentName) + ->field('language',$language); + },'errors.metatags.save'); } } diff --git a/controllers/EditorPage.php b/controllers/_EditorPage.php similarity index 100% rename from controllers/EditorPage.php rename to controllers/_EditorPage.php diff --git a/view/components/admin/admin.html b/view/components/admin/admin.html index daa62d0..ff19467 100644 --- a/view/components/admin/admin.html +++ b/view/components/admin/admin.html @@ -1,9 +1,8 @@ {{ component('semantic~tabs',{ items: [ - { id: 'editor_tab', title: labels.editor, icon: 'edit', component: 'editor::admin.editor', active: true }, - { id: 'cpde_tab', title: labels.code, icon: 'code', component: 'editor::admin.code'} + { id: 'editor_tab', title: labels.editor, icon: 'edit', component: 'editor::admin.code', active: true } ], menu: { component: 'system:admin.extensions.menu.actions', extension: 'editor' }, - content: { component: 'editor::admin.editor' } + content: { component: 'editor::admin.code' } }) }} \ No newline at end of file diff --git a/view/components/admin/admin.json b/view/components/admin/admin.json index 45eca4e..8956d36 100644 --- a/view/components/admin/admin.json +++ b/view/components/admin/admin.json @@ -1,6 +1,5 @@ { "labels": { - "editor": "Editor", - "code": "Code" + "editor": "Editor" } } \ No newline at end of file diff --git a/view/components/admin/code/code.json b/view/components/admin/code/code.json index 80deb62..5a83795 100644 --- a/view/components/admin/code/code.json +++ b/view/components/admin/code/code.json @@ -1,9 +1,7 @@ { "labels": { - "theme": "Theme", + "theme": "Template", "mode": "Mode", - "simple": "Simple", - "advanced": "Advanced", "text": "Text", "languages": "Languages" } diff --git a/view/components/admin/code/content/emails/emails.json b/view/components/admin/code/content/emails/emails.json index c10da70..f723ce2 100644 --- a/view/components/admin/code/content/emails/emails.json +++ b/view/components/admin/code/content/emails/emails.json @@ -8,6 +8,6 @@ "translations": "Language translations" }, "messages": { - "empty": "No emails in theme." + "empty": "No emails in template." } } \ No newline at end of file diff --git a/view/components/admin/code/content/images/help/help.html b/view/components/admin/code/content/images/help/help.html index 669791d..86a071f 100644 --- a/view/components/admin/code/content/images/help/help.html +++ b/view/components/admin/code/content/images/help/help.html @@ -1,17 +1,22 @@ -{{ component('semantic~segment-title',{ title: title, icon: 'info' }) }} -
-
-
- -
-
- {{ file_name }} -
+
+
+ {% component 'semantic~panel' %} +
+
+
+ +
+
+ {{ file_name }} +
+
+

{{ labels.code }}

+ {{ component('semantic~code',{ + language: 'twig', + content: ' ' + }) + }} +
+ {% endcomponent %}
-

{{ labels.code }}

- {{ component('semantic~code',{ - language: 'twig', - content: ' ' - }) - }}
\ No newline at end of file diff --git a/view/components/admin/code/content/images/help/help.json b/view/components/admin/code/content/images/help/help.json index c6eb5f7..2910edf 100644 --- a/view/components/admin/code/content/images/help/help.json +++ b/view/components/admin/code/content/images/help/help.json @@ -1,5 +1,6 @@ { "title": "Image Details", + "icon": "info", "labels": { "code": "Template Code" } diff --git a/view/components/admin/code/content/images/images.html b/view/components/admin/code/content/images/images.html index a742a73..88b9e08 100644 --- a/view/components/admin/code/content/images/images.html +++ b/view/components/admin/code/content/images/images.html @@ -24,10 +24,10 @@ file-name="{{ file.basename }}"> - + src="{{ getTemplateUrl(theme_name,'/images/' ~ file.basename,false) }}">
diff --git a/view/components/admin/editor/components/components.html b/view/components/admin/editor/components/components.html deleted file mode 100644 index b6ba89e..0000000 --- a/view/components/admin/editor/components/components.html +++ /dev/null @@ -1,9 +0,0 @@ -
- - {{ component('icons~edit',{ size: 'h-10 w-10', class: 'text-green-500' }) }} - - {{ edit_component_html }} -
\ No newline at end of file diff --git a/view/components/admin/editor/components/components.js b/view/components/admin/editor/components/components.js deleted file mode 100644 index 00e9960..0000000 --- a/view/components/admin/editor/components/components.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -arikaim.component.onLoaded(function() { - arikaim.ui.button('.edit-component',function(button) { - var componentName = $(button).attr('component'); - console.log(componentName); - - $('#component_editor').show(); - - arikaim.page.loadContent({ - id: 'component_editor', - component: 'editor::admin.editor.components.editor', - params: { - component_name: componentName - } - }); - }); -}); \ No newline at end of file diff --git a/view/components/admin/editor/components/components.json b/view/components/admin/editor/components/components.json deleted file mode 100644 index d00feb2..0000000 --- a/view/components/admin/editor/components/components.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "tooltips": { - "edit": "Edit Component" - } -} \ No newline at end of file diff --git a/view/components/admin/editor/components/editor/editor.html b/view/components/admin/editor/components/editor/editor.html deleted file mode 100644 index 6807bbc..0000000 --- a/view/components/admin/editor/components/editor/editor.html +++ /dev/null @@ -1,28 +0,0 @@ -{% set props = componentProperties(component_name,current_language) %} -
- {{ component('semantic~panel.title',{ title: title }) }} -

- {{ component_name }} -

-
-

- {{ labels.props }} -

-
-
- {% for key, field in props['context']['_editor']['props'] %} - {{ component('editor::admin.editor.components.editor.field',{ - key: key, - value: props['properties'][key], - field: field - }) - }} - {% endfor %} - {{ component('semantic~form.footer') }} -
-
-

- {{ labels.styles }} -

-
-
\ No newline at end of file diff --git a/view/components/admin/editor/components/editor/editor.js b/view/components/admin/editor/components/editor/editor.js deleted file mode 100644 index 28771db..0000000 --- a/view/components/admin/editor/components/editor/editor.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -arikaim.component.onLoaded(function() { - arikaim.ui.button('.panel-close-button',function(button) { - $('#component_editor').hide(); - }); -}); \ No newline at end of file diff --git a/view/components/admin/editor/components/editor/editor.json b/view/components/admin/editor/components/editor/editor.json deleted file mode 100644 index 57f94f0..0000000 --- a/view/components/admin/editor/components/editor/editor.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "title": "Edit Component", - "tooltips": { - }, - "labels": { - "props": "Properties", - "styles": "Styles" - } -} \ No newline at end of file diff --git a/view/components/admin/editor/components/editor/field/field.html b/view/components/admin/editor/components/editor/field/field.html deleted file mode 100644 index 9d33958..0000000 --- a/view/components/admin/editor/components/editor/field/field.html +++ /dev/null @@ -1,9 +0,0 @@ -
- - - {% if field.type == 'text' %} - - {% endif %} -
\ No newline at end of file diff --git a/view/components/admin/editor/editor.html b/view/components/admin/editor/editor.html deleted file mode 100644 index 6dc47be..0000000 --- a/view/components/admin/editor/editor.html +++ /dev/null @@ -1,19 +0,0 @@ -
-
-
- - {{ labels.theme }} - - {{ component('system:admin.templates.dropdown',{ skip: ['system'], selected: selected_theme }) }} - - - - -
-
-
-
- -
\ No newline at end of file diff --git a/view/components/admin/editor/editor.js b/view/components/admin/editor/editor.js deleted file mode 100644 index 8db1cb8..0000000 --- a/view/components/admin/editor/editor.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Arikaim - * @copyright Copyright (c) - * @license http://www.arikaim.com/license - * http://www.arikaim.com - */ -'use strict'; - -function ThemeEditor() { - var self = this; - - this.getCurrentTheme = function() { - return $('#templates_dropdown').dropdown('get value'); - }; - - this.init = function() { - $('#templates_dropdown').dropdown({ - onChange: function(name) { - self.laodPageSelector(name); - options.save('editor.current.theme',name); - } - }); - }; - - this.laodPageSelector = function(theme) { - $('#page_label').show(); - - arikaim.page.loadContent({ - id: 'page_selector', - component: 'editor::admin.editor.pages.dropdown', - params: { - theme_name: theme - } - },function(result) { - $('.page-dropdown').dropdown({ - onChange: function(page) { - self.loadEditor(self.getCurrentTheme(),page); - } - }); - }); - }; - - this.loadEditor = function(theme, page) { - arikaim.page.loadContent({ - id: 'page_editor', - component: 'editor::admin.editor.pages.edit', - params: { - theme: theme, - page_name: page, - full_screen_button: true - } - },function(result) { - - }); - } -} - -var themeEditor = new ThemeEditor(); - -arikaim.component.onLoaded(function() { - themeEditor.init(); -}); \ No newline at end of file diff --git a/view/components/admin/editor/editor.json b/view/components/admin/editor/editor.json deleted file mode 100644 index 9adb31a..0000000 --- a/view/components/admin/editor/editor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "labels": { - "theme": "Theme", - "page": "Page" - } -} \ No newline at end of file diff --git a/view/components/admin/editor/pages/component.json b/view/components/admin/editor/pages/component.json deleted file mode 100644 index 4fd2567..0000000 --- a/view/components/admin/editor/pages/component.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "access": { - "auth": "session", - "redirect": "/admin", - "permission": "ControlPanel:full" - } -} \ No newline at end of file diff --git a/view/components/admin/editor/pages/dropdown/dropdown.html b/view/components/admin/editor/pages/dropdown/dropdown.html deleted file mode 100644 index d4e6038..0000000 --- a/view/components/admin/editor/pages/dropdown/dropdown.html +++ /dev/null @@ -1,17 +0,0 @@ -{% set template = package('template').createPackage(theme_name) %} -{% set parent_component = parent_component|default('') %} -{% set pages = template.getPages(parent_component) %} - \ No newline at end of file diff --git a/view/components/admin/editor/pages/dropdown/dropdown.js b/view/components/admin/editor/pages/dropdown/dropdown.js deleted file mode 100644 index 2fd79c0..0000000 --- a/view/components/admin/editor/pages/dropdown/dropdown.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -arikaim.component.onLoaded(function() { - //$('.page-dropdown').dropdown({}); -}); \ No newline at end of file diff --git a/view/components/admin/editor/pages/dropdown/dropdown.json b/view/components/admin/editor/pages/dropdown/dropdown.json deleted file mode 100644 index e229541..0000000 --- a/view/components/admin/editor/pages/dropdown/dropdown.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "labels": { - "empty": "Select Theme Page" - } -} \ No newline at end of file diff --git a/view/components/admin/editor/pages/edit/_edit.js b/view/components/admin/editor/pages/edit/_edit.js deleted file mode 100644 index 00e9960..0000000 --- a/view/components/admin/editor/pages/edit/_edit.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -arikaim.component.onLoaded(function() { - arikaim.ui.button('.edit-component',function(button) { - var componentName = $(button).attr('component'); - console.log(componentName); - - $('#component_editor').show(); - - arikaim.page.loadContent({ - id: 'component_editor', - component: 'editor::admin.editor.components.editor', - params: { - component_name: componentName - } - }); - }); -}); \ No newline at end of file diff --git a/view/components/admin/editor/pages/edit/component.json b/view/components/admin/editor/pages/edit/component.json deleted file mode 100644 index 4fd2567..0000000 --- a/view/components/admin/editor/pages/edit/component.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "access": { - "auth": "session", - "redirect": "/admin", - "permission": "ControlPanel:full" - } -} \ No newline at end of file diff --git a/view/components/admin/editor/pages/edit/edit.html b/view/components/admin/editor/pages/edit/edit.html deleted file mode 100644 index da322b2..0000000 --- a/view/components/admin/editor/pages/edit/edit.html +++ /dev/null @@ -1,18 +0,0 @@ -
- {% if full_screen_button == true %} - - - - {% endif %} -
-
-
- {{ page_content }} -
- -
diff --git a/view/components/admin/editor/pages/edit/edit.json b/view/components/admin/editor/pages/edit/edit.json deleted file mode 100644 index 984627c..0000000 --- a/view/components/admin/editor/pages/edit/edit.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "labels": { - "full": "Full screen" - } -} \ No newline at end of file diff --git a/view/components/admin/editor/pages/pages.html b/view/components/admin/editor/pages/pages.html deleted file mode 100644 index e69de29..0000000 diff --git a/view/components/admin/editor/pages/pages.json b/view/components/admin/editor/pages/pages.json deleted file mode 100644 index 9e26dfe..0000000 --- a/view/components/admin/editor/pages/pages.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/view/components/admin/messages/messages.json b/view/components/admin/messages/messages.json index 9fadbb7..0cb3dcf 100644 --- a/view/components/admin/messages/messages.json +++ b/view/components/admin/messages/messages.json @@ -11,6 +11,6 @@ "metatags": { "save": "Can't save page metatags." }, - "theme_name": "Not valid theme name" + "theme_name": "Not valid template name" } } \ No newline at end of file