Skip to content

Commit

Permalink
Admin 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jan 7, 2021
1 parent 0b85758 commit 5e02a10
Show file tree
Hide file tree
Showing 30 changed files with 226 additions and 238 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<a name="1.8.0"></a>
# [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

<a name="1.7.1"></a>
# [1.7.1](https://github.com/flextype-plugins/admin) (2021-01-03)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down
11 changes: 1 addition & 10 deletions app/Controllers/ApiAccessController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@

class ApiAccessController
{

/**
* __construct
*/
public function __construct()
{

}

/**
* Access Index page
*
Expand Down Expand Up @@ -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
Expand Down
20 changes: 6 additions & 14 deletions app/Controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@

class ApiController
{
/**
* __construct
*/
public function __construct()
{

}

/**
* Index page for API's
*
Expand All @@ -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' => [
Expand Down
9 changes: 0 additions & 9 deletions app/Controllers/ApiFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@

class ApiFilesController
{

/**
* __construct
*/
public function __construct()
{

}

/**
* files Index page
*
Expand Down
4 changes: 2 additions & 2 deletions app/Controllers/EntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
10 changes: 6 additions & 4 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -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: [email protected]
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion templates/content/entries/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="button-dropdown">
<input type="submit" id="create" name="create" value="{{ tr('admin_create') }}" class="button">
<a href="javascript:;" class="button js-dropdown-btn" data-dropdown="dropdown-list-create-new-entry">
<i class="icon icon--white">{{ icon('fas fa-sort-down') }}</i>
<i class="icon icon--white">{{ icon('sort-down', 'fontawesome|solid') }}</i>
</a>
<div id="dropdown-list-create-new-entry" class="dropdown">
<input type="submit" id="create-and-edit" name="create-and-edit" value="{{ tr('admin_create_and_edit') }}" class="dropdown__item">
Expand Down
Loading

0 comments on commit 5e02a10

Please sign in to comment.