diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dbff65b..cae278f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ + +# [1.8.0](https://github.com/flextype-plugins/admin) (2021-01-07) + +### Features + +* **core** update code base for new Twig 2.0.0 +* **core** update code base for new Icon 2.0.0 + # [1.7.1](https://github.com/flextype-plugins/admin) (2021-01-03) diff --git a/README.md b/README.md index 5e7d6666..a8f30d43 100755 --- a/README.md +++ b/README.md @@ -15,11 +15,11 @@ The following dependencies need to be installed for Form Admin Plugin. | Item | Version | Download | |---|---|---| | [flextype](https://github.com/flextype/flextype) | 0.9.15 | [download](https://github.com/flextype/flextype/releases) | -| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) | +| [twig](https://github.com/flextype-plugins/twig) | >=2.0.0 | [download](https://github.com/flextype-plugins/twig/releases) | | [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) | | [form-admin](https://github.com/flextype-plugins/form-admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/form-admin/releases) | | [jquery](https://github.com/flextype-plugins/jquery) | >=1.0.0 | [download](https://github.com/flextype-plugins/jquery/releases) | -| [icon](https://github.com/flextype-plugins/icon) | >=1.0.0 | [download](https://github.com/flextype-plugins/icon/releases) | +| [icon](https://github.com/flextype-plugins/icon) | >=2.0.0 | [download](https://github.com/flextype-plugins/icon/releases) | | [acl](https://github.com/flextype-plugins/acl) | >=1.0.0 | [download](https://github.com/flextype-plugins/acl/releases) | | [accounts-admin](https://github.com/flextype-plugins/accounts-admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/accounts-admin/releases) | | [phpmailer](https://github.com/flextype-plugins/phpmailer) | >=1.0.0 | [download](https://github.com/flextype-plugins/phpmailer/releases) | diff --git a/app/Controllers/ApiAccessController.php b/app/Controllers/ApiAccessController.php index 83f985db..1234baa6 100644 --- a/app/Controllers/ApiAccessController.php +++ b/app/Controllers/ApiAccessController.php @@ -18,15 +18,6 @@ class ApiAccessController { - - /** - * __construct - */ - public function __construct() - { - - } - /** * Access Index page * @@ -57,7 +48,7 @@ public function index(Request $request, Response $response) : Response 'link' => flextype('router')->pathFor('admin.api.index'), 'title' => __('admin_api'), ], - 'api_Access' => [ + 'api_access' => [ 'link' => flextype('router')->pathFor('admin.api_access.index'), 'title' => __('admin_access'), 'active' => true diff --git a/app/Controllers/ApiController.php b/app/Controllers/ApiController.php index d3f7b15e..52bbf6e8 100644 --- a/app/Controllers/ApiController.php +++ b/app/Controllers/ApiController.php @@ -18,14 +18,6 @@ class ApiController { - /** - * __construct - */ - public function __construct() - { - - } - /** * Index page for API's * @@ -42,27 +34,27 @@ public function index(Request $request, Response $response) : Response 'api_list' => [ 'entries' => [ 'title' => __('admin_entries'), - 'icon' => 'fas fa-database' + 'icon' => ['name' => 'database', 'set' => 'fontawesome|solid'], ], 'registry' => [ 'title' => __('admin_registry'), - 'icon' => 'fas fa-archive' + 'icon' => ['name' => 'archive', 'set' => 'fontawesome|solid'], ], 'images' => [ 'title' => __('admin_images'), - 'icon' => 'far fa-images' + 'icon' => ['name' => 'images', 'set' => 'fontawesome|solid'], ], 'files' => [ 'title' => __('admin_files'), - 'icon' => 'fas fa-file' + 'icon' => ['name' => 'file', 'set' => 'fontawesome|solid'], ], 'folders' => [ 'title' => __('admin_folders'), - 'icon' => 'fas fa-folder' + 'icon' => ['name' => 'folder', 'set' => 'fontawesome|solid'], ], 'access' => [ 'title' => __('admin_access'), - 'icon' => 'fas fa-user-shield' + 'icon' => ['name' => 'user-shield', 'set' => 'fontawesome|solid'], ], ], 'links' => [ diff --git a/app/Controllers/ApiFilesController.php b/app/Controllers/ApiFilesController.php index 422832af..3f657a1d 100644 --- a/app/Controllers/ApiFilesController.php +++ b/app/Controllers/ApiFilesController.php @@ -18,15 +18,6 @@ class ApiFilesController { - - /** - * __construct - */ - public function __construct() - { - - } - /** * files Index page * diff --git a/app/Controllers/EntriesController.php b/app/Controllers/EntriesController.php index 0b7ebacb..3b47f973 100644 --- a/app/Controllers/EntriesController.php +++ b/app/Controllers/EntriesController.php @@ -997,7 +997,7 @@ public function uploadMediaFileProcess(Request $request, Response $response) : R */ public function getMediaList(string $id, bool $path = false) : array { - $base_url = \Slim\Http\Uri::createFromEnvironment(new \Slim\Http\Environment($_SERVER))->getBaseUrl(); + $baseUrl = \Slim\Http\Uri::createFromEnvironment(new \Slim\Http\Environment($_SERVER))->getBaseUrl(); $files = []; if (!Filesystem::has(PATH['project'] . '/media/entries/' . $id)) { @@ -1009,7 +1009,7 @@ public function getMediaList(string $id, bool $path = false) : array if (strpos($file, strtolower($file_ext), 1)) { if ($file !== 'entry.md') { if ($path) { - $files[$base_url . '/' . $id . '/' . $file] = $base_url . '/' . $id . '/' . $file; + $files[$baseUrl . '/' . $id . '/' . $file] = $baseUrl . '/' . $id . '/' . $file; } else { $files[$file] = $file; } diff --git a/dependencies.php b/dependencies.php index f90ad82a..a62be1ed 100644 --- a/dependencies.php +++ b/dependencies.php @@ -19,10 +19,10 @@ I18n::$locale = flextype('registry')->get('flextype.settings.locale'); // Add Admin Navigation -flextype('registry')->set('plugins.admin.settings.navigation.content.entries', ['title' => __('admin_entries'), 'icon' => 'fas fa-database', 'link' => flextype('router')->pathFor('admin.entries.index')]); -flextype('registry')->set('plugins.admin.settings.navigation.extends.plugins', ['title' => __('admin_plugins'),'icon' => 'fas fa-plug', 'link' => flextype('router')->pathFor('admin.plugins.index')]); -flextype('registry')->set('plugins.admin.settings.navigation.system.tools', ['title' => __('admin_tools'),'icon' => 'fas fa-toolbox', 'link' => flextype('router')->pathFor('admin.tools.index')]); -flextype('registry')->set('plugins.admin.settings.navigation.system.api', ['title' => __('admin_api'),'icon' => 'fas fa-network-wired', 'link' => flextype('router')->pathFor('admin.api.index')]); +flextype('registry')->set('plugins.admin.settings.navigation.content.entries', ['title' => __('admin_entries'), 'icon' => ['name' => 'database', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.entries.index')]); +flextype('registry')->set('plugins.admin.settings.navigation.extends.plugins', ['title' => __('admin_plugins'),'icon' => ['name' => 'plug', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.plugins.index')]); +flextype('registry')->set('plugins.admin.settings.navigation.system.tools', ['title' => __('admin_tools'),'icon' => ['name' => 'toolbox', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.tools.index')]); +flextype('registry')->set('plugins.admin.settings.navigation.system.api', ['title' => __('admin_api'),'icon' => ['name' => 'network-wired', 'set' => 'fontawesome|solid'], 'link' => flextype('router')->pathFor('admin.api.index')]); /** * Add Assets diff --git a/package.json b/package.json index 63a3a9e1..2615af60 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Admin", - "version": "1.7.1", + "version": "1.8.0", "description": "Admin theme for Flextype", "homepage": "https://flextype.org", "author": "Sergey Romanenko", diff --git a/plugin.yaml b/plugin.yaml index 5e9cc2db..2996ba81 100755 --- a/plugin.yaml +++ b/plugin.yaml @@ -1,7 +1,9 @@ name: Admin -version: 1.7.1 +version: 1.8.0 description: Admin Panel plugin for Flextype. -icon: fab fa-fort-awesome +icon: + name: fort-awesome + set: "fontawesome|brands" author: name: Sergey Romanenko email: support@flextype.org @@ -15,8 +17,8 @@ license: MIT dependencies: flextype: 0.9.15 - twig: '>=1.0.0' - icon: '>=1.0.0' + twig: '>=2.0.0' + icon: '>=2.0.0' form: '>=1.0.0' form-admin: '>=1.0.0' jquery: '>=1.0.0' diff --git a/templates/content/entries/add.html b/templates/content/entries/add.html index 46de66fc..3e1a0bf9 100644 --- a/templates/content/entries/add.html +++ b/templates/content/entries/add.html @@ -45,7 +45,7 @@